[Feature] Install dependencies using CMake
SAtacker opened this issue · comments
Expected Behavior
-
Follow https://github.com/SAtacker/hpx-template cmake fetch content to download hwloc and boost dependencies depending upon the platform.
-
Allow user to have configurable behaviors i.e. system can find boost which is already existing. Enable users to fetch content boost and hwloc using
HPX_WITH_FETCH_BOOST=ON
andHPX_WITH_FETCH_HWLOC=ON
-
Add tests for the same
CC @Shanmukh-C
Hello @SAtacker , is this issue open for anyone to work on, or only Shanmukh-C is supposed to work on it?
I have decent experience with CMakeLists.txt
And for testing out options, I created a clone of your repository: https://github.com/vrnimje/hpx-temp/tree/cmake
and tested out some workflows as well: https://github.com/vrnimje/hpx-temp/actions
Hello @SAtacker , is this issue open for anyone to work on, or only Shanmukh-C is supposed to work on it? I have decent experience with CMakeLists.txt And for testing out options, I created a clone of your repository: https://github.com/vrnimje/hpx-temp/tree/cmake and tested out some workflows as well: https://github.com/vrnimje/hpx-temp/actions
Yes, you can definitely work on this! Seems like you have already looked into it.
(We have plenty of things to work on so you folks don’t have to worry)
What’s your id for discord on the IRC for STE||AR Group?
Yes, you can definitely work on this! Seems like you have already looked into it. (We have plenty of things to work on so you folks don’t have to worry) What’s your id for discord on the IRC for STE||AR Group?
Thanks for the confirmation. Will get started with working on the issue right away. Just had a couple of queries:
- Changes should be made in the main
CMakeLists.txt
of this repository, right? - Do
tests
(mentioned in 3rd pt. of the issue), mean workflow build tests?
And here is my Discord ID: verve0304
Changes should be made in the main CMakeLists.txt of this repository, right?
You'll have to figure that out yourself. But yeah, some of the mechanism can also be found in https://github.com/STEllAR-GROUP/hpx/blob/master/cmake/HPX_SetupBoost.cmake , use your best judgement and make reasonable code changes.
Do tests (mentioned in 3rd pt. of the issue), mean workflow build tests?
Yes, there are a few workflows in https://github.com/STEllAR-GROUP/hpx/tree/master/.github/workflows you can add your newly added cmake variable options as a separate test case(s) and try to compile and verify.
Update:
I have added the HPX_WITH_FETCH_HWLOC
option here, and is working perfectly for Linux and MacOS. Test for Linux & MacOS
In Windows, it builds correctly but the tests fail: Workflow run
Update: I have added the
HPX_WITH_FETCH_HWLOC
option here, and is working perfectly for Linux and MacOS. Test for Linux & MacOSIn Windows, it builds correctly but the tests fail: Workflow run
Could please you make a PR ?
Hello @SAtacker , I have tried adding the HPX_WITH_FETCH_BOOST
option, and it is compiling for Linux and Windows, but in macOS the find_package
call is not able to find Boost.Context here
Here are the modifications I have made: HPX_SetupBoost.cmake
Can you please take a look? Should I open a PR?
Hello @SAtacker , I have tried adding the
HPX_WITH_FETCH_BOOST
option, and it is compiling for Linux and Windows, but in macOS thefind_package
call is not able to find Boost.Context hereHere are the modifications I have made:
HPX_SetupBoost.cmake
Can you please take a look? Should I open a PR?
https://github.com/vrnimje/hpx-fork/blob/48d422f5b2f1eee6dd2497f728e0383fc70fbe5d/cmake/HPX_SetupBoost.cmake#L152 you have downloaded boost 1.84 and trying to find 1.81 which is one problem but not necessary to cause the error. https://github.com/SAtacker/hpx-template/blob/main/CMakeLists.txt works for macOS too. I have not included find_package(Boost) in my cmakelists
https://github.com/vrnimje/hpx-fork/blob/48d422f5b2f1eee6dd2497f728e0383fc70fbe5d/cmake/HPX_SetupBoost.cmake#L152 you have downloaded boost 1.84 and trying to find 1.81 which is one problem but not necessary to cause the error. https://github.com/SAtacker/hpx-template/blob/main/CMakeLists.txt works for macOS too. I have not included find_package(Boost) in my cmakelists
Thanks, turns out there was an unnecessary add_library call, before building Boost.
Fixed the error
Caused due to cmake build type by default being set to Release
Just had to add -DCMAKE_BUILD_TYPE=Debug
in the workflow
Builds on macOS successfully: build
@SAtacker The HPX_WITH_FETCH_BOOST
option is also implemented, so should we proceed with the PR?
@SAtacker The
HPX_WITH_FETCH_BOOST
option is also implemented, so should we proceed with the PR?
Yes, thanks!