-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prepare for conan package #234
base: master
Are you sure you want to change the base?
Conversation
Update cmake to 3.15 and modern python3 modules
…her with boost python
Fixed windows compile problems
I just saw that it still does not compile on windows with mvsc. I convert this PR to a draft until I fixed it as well. |
…ath definition for MVSC
@beniz It would not compile on windows until I defined an explicit copy ctr for scalar_normal_dist_op. Can you check if this one is ok? ATM the python tests are failing because the module is not found for the ctest call, but everything compiles. (Only with MVSC, with gcc ctest runs the python test sucessfully) |
I found the problem and maybe one of you has an idea. What should we do here? Do you have an idea on how to fix it or should we copy it during the cmake call? Edit: A possible cmake solution to fix this with MVSC using cmake is given in phbasler@bfe0eb4 |
Sorry, I have no idea regarding the windows test setup. |
* added CI * Added gflags * Includ numpy and boost-python * Changed pip to pip3 * Extended PYTHONPATH * Extending pythonpath * Adjusted Pythonpath to use Config if available * Update windows_unit_tests.yml * Update windows_unit_tests.yml * Update windows_unit_tests.yml * Update windows_unit_tests.yml * Modified python path * Update CMakeLists.txt * Moved pythonpath to target generator expression * Add post_build/install of cmaes.dll to python location on MVSC * Adjusted workflows to only trigger on master Co-authored-by: Phil <philipbasler@gmail.com>
Hi @phbasler I would go for the copy of the DLL is that helps. Thanks for all the work on this! |
@beniz That's how I implemented now. I also fixed a small mistake I introduced with another PR: |
Fixed wrong doxygen link to match the move of the project
Add conanfile to generate conan package
@nikohansen @beniz I finished the conan package. You can build it with `conan create conanfile.py --profile=SomeProfile" where SomeProfile is a conan profile with your compiler and settings how you want to build. You need to fill in the author and topics in the conanfile. |
@phbasler hello, apologies for missing this, you should put your name in the conan file! |
@beniz In the meantime conan released v2 with some breaking changes, so we would have to make sure everything still works. |
Seems that there are some changes necessary. I will have a look at it if I have some time to spare, but this may take a while. |
@beniz @nikohansen |
In preparation for the conan package I added the options to get the necessary dependencies through conan.
If you have installed conan you can use -DLIBCMAES_USE_CONAN=On and cmake will download the matching conan packages of eigen, boost( if LIBCMAES_BUILD_PYTHON = On) and gflags (if LIBCMAES_BUILD_TESTS=On).
While configuring this I saw that the PythonInterp find_package call was deprecated and so I updated it to find_package(Python3) with the modules. This also allowed me to make the python and t_* tests run with ctest.
You can now just call ctest in your build directory and the 6 tests run.
Furthermore, we can get rid of the custom FindNumpy and FindEigen module. cmake has it's own find modules for eigen and python.