← All tasks
cppmlpack/mlpack #2581Not a task: not reproduced

Refactor CMake binding configuration

envgap__mlpack__mlpack-2581

01 / FAILURE SIGNATURE

As reported upstream

No identifying execution failure has been captured.
Not a benchmark task.
  • In a clean container the reported failure did not reproduce, or the known fix did not make the project run.

02 / ENVIRONMENT RECIPE

Base commit
38844c39d221950112775048739a6feb1db4cb1e
Manifest
src/mlpack/CMakeLists.txt
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

mlpack/mlpack #2581 · read the original issue
### What is the desired addition or change?



This comes out of the discussion for the R bindings: https://github.com/mlpack/mlpack/pull/2556#discussion_r470272755



At the end of `src/mlpack/CMakeLists.txt`, there is a section for each binding type.  It would be cleaner if we instead created macros like `post_markdown_setup()` for each of the existing binding languages (Julia, Go, Python) in each binding directory's `CMakeLists.txt` (i.e. `src/mlpack/bindings/*/CMakeLists.txt`), and then simply called those macros.



### What is the motivation for this feature?



A cleaner CMake configuration. :)



### If applicable, describe how this feature would be implemented.



So, in an ideal world, there would be a block at the end of `src/mlpack/CMakeLists.txt` like this:



```

post_python_setup()

post_julia_setup()

post_go_setup()

post_markdown_setup()

```



and that would be the only code in that file related to the bindings.



### Additional information?



This is a pretty simple refactoring, so it could be a nice starter task for anyone looking to get involved with mlpack.  Some CMake knowledge is probably necessary, but CMake isn't too hard to learn. :)
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]