Refactor CMake with JRL CMake Modules v2 - #437
Conversation
bd8de6d to
c36d61e
Compare
930496b to
e4a6dd2
Compare
9920160 to
7ce7cbf
Compare
f85e65e to
e238efe
Compare
b2617af to
b0388c0
Compare
7f6f202 to
3d05dbd
Compare
28e0fd5 to
b09f8a3
Compare
a104370 to
93c8745
Compare
jorisv
left a comment
There was a problem hiding this comment.
When running tests, following tests are failing on Linux with pixi:
33 - proxsuite-test-cpp.dense_maros_meszaros (SEGFAULT)
34 - proxsuite-test-cpp.vectorized.dense_maros_meszaros (SEGFAULT)
35 - proxsuite-test-cpp.sparse_maros_meszaros (SEGFAULT)
36 - proxsuite-test-cpp.vectorized.sparse_maros_meszaros (SEGFAULT)It is now supported on cmeel https://pypi.org/project/cmeel-cereal/
mimics jrl-v1
| jrl_option(PROXSUITE_EXPORT_PACKAGE "Generate the CMake export files" ${PROJECT_IS_TOP_LEVEL}) | ||
| jrl_option(BUILD_TESTING "Build the tests" OFF) | ||
| jrl_option(BUILD_EXAMPLES "Build the examples" OFF) | ||
| jrl_option(BUILD_BENCHMARKS "Build the benchmarks" OFF) |
There was a problem hiding this comment.
| jrl_option(BUILD_BENCHMARKS "Build the benchmarks" OFF) | |
| jrl_option(BUILD_BENCHMARK "Build the benchmarks" OFF) |
|
|
||
| jrl_option(PROXSUITE_EXPORT_PACKAGE "Generate the CMake export files" ${PROJECT_IS_TOP_LEVEL}) | ||
| jrl_option(BUILD_TESTING "Build the tests" OFF) | ||
| jrl_option(BUILD_EXAMPLES "Build the examples" OFF) |
There was a problem hiding this comment.
| jrl_option(BUILD_EXAMPLES "Build the examples" OFF) | |
| jrl_option(PROXSUITE_BUILD_EXAMPLES "Build the examples" OFF) |
BUILD_EXAMPLES is a new options
| jrl_option(BUILD_EXAMPLES "Build the examples" OFF) | ||
| jrl_option(BUILD_BENCHMARKS "Build the benchmarks" OFF) | ||
| jrl_option(BUILD_DOCUMENTATION "Build the documentation" OFF) | ||
| jrl_option(BUILD_MAROS_MESZAROS_TESTS "Build the Maros-Meszaros tests, needs matio library" OFF) |
There was a problem hiding this comment.
| jrl_option(BUILD_MAROS_MESZAROS_TESTS "Build the Maros-Meszaros tests, needs matio library" OFF) | |
| jrl_option(PROXSUITE_BUILD_MAROS_MESZAROS_TESTS "Build the Maros-Meszaros tests, needs matio library" OFF) |
BUILD_MAROS_MESZAROS_TESTS is a new option.
| jrl_option(ENABLE_WARNINGS "Enable warnings during compilation" OFF) | ||
| jrl_option(ENABLE_WARNINGS_AS_ERRORS "Treat all warnings as errors" OFF) |
There was a problem hiding this comment.
| jrl_option(ENABLE_WARNINGS "Enable warnings during compilation" OFF) | |
| jrl_option(ENABLE_WARNINGS_AS_ERRORS "Treat all warnings as errors" OFF) | |
| jrl_option(PROXSUITE_ENABLE_WARNINGS "Enable warnings during compilation" OFF) | |
| jrl_option(PROXSUITE_ENABLE_WARNINGS_AS_ERRORS "Treat all warnings as errors" OFF) |
ENABLE_WARNINGS* are new options.
ENABLE_WARNINGS activate jrl_target_set_default_compile_options on proxsuite traget. I think this should be done by default, why setting an option ?
There was a problem hiding this comment.
We don't want to export the warnings in the final package (it's an INTERFACE library).
These options are only meant for proxsuite dev purposes.
| jrl_option(TEST_JULIA_INTERFACE "Run the julia examples as unittest" OFF) | ||
| jrl_option(BUILD_WITH_OPENMP_SUPPORT "Build the library with the OpenMP support" OFF) | ||
| jrl_option(LINK_PYTHON_INTERFACE_TO_OPENMP "Link OpenMP to the Python interface" ON CONDITION "BUILD_WITH_OPENMP_SUPPORT" FALLBACK OFF) | ||
| jrl_option(BUILD_WITH_SERIALIZATION "Build with serialization support" ON) |
There was a problem hiding this comment.
| jrl_option(BUILD_WITH_SERIALIZATION "Build with serialization support" ON) | |
| jrl_option(PROXSUITE_BUILD_WITH_SERIALIZATION "Build with serialization support" ON) |
New option
| jrl_option(LINK_PYTHON_INTERFACE_TO_OPENMP "Link OpenMP to the Python interface" ON CONDITION "BUILD_WITH_OPENMP_SUPPORT" FALLBACK OFF) | ||
| jrl_option(BUILD_WITH_SERIALIZATION "Build with serialization support" ON) | ||
| jrl_option(GENERATE_PYTHON_STUBS "Generate Python stubs" OFF) | ||
| jrl_option(PYTHON_BINDING_CUSTOM_INSTALL_DIR "Override the default <current-python-install-sitelib>/<project-name>" "") |
| jrl_option(INSTALL_DOCUMENTATION "Install the documentation" OFF) | ||
| jrl_option(INITIALIZE_EIGEN_WITH_NAN "Initialize Eigen objects with NAN values" OFF) | ||
| jrl_option(CHECK_RUNTIME_MALLOC "Check if some memory allocations are performed at runtime" OFF) | ||
| jrl_option(SUFFIX_SO_VERSION "Suffix library name with its version" ON) |
| if(WIN32) | ||
| set(Catch2_USE_FETCHCONTENT ON) | ||
| endif() |
There was a problem hiding this comment.
Can we add a guard to fetchcontent catch2 only on debug build configuration ? The CI will not have to rebuild catch 2 on release mode then.
|
|
||
| if(LINK_PYTHON_INTERFACE_TO_OPENMP) | ||
| message(STATUS "[proxsuite] Linking python bindings to OpenMP") | ||
| target_link_libraries(proxsuite_pywrap PRIVATE OpenMP::OpenMP_CXX) |
There was a problem hiding this comment.
Since proxsuite already link as INTERFACE OpenMP::OpenMP_CXX this is useless.
On old version, proxsuite target never link to OpenMP. It was manually appended to tests, binding and tests.
We could create a proxsuite-parallel and proxsuite-vectorized-parallel target that link to openmp ?
Or just remove proxsuite link to OpenMP::OpenMP_CXX, but I don't like it since it allow to use part of the library without proper linking.
This PR is a full rewrite of the CMake files with the JRL CMake Modules v2.
c++17minimum requiredpixisupportfind_packagecomponents