-
Notifications
You must be signed in to change notification settings - Fork 190
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
Please add a working example with boost test #361
Comments
Following is something that is currently working for me (taken from this another issue) set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME OFF)
CPMAddPackage(
NAME Boost
VERSION 1.79.0
GITHUB_REPOSITORY "boostorg/boost"
GIT_TAG "boost-1.79.0"
)
if(Boost_ADDED)
message("boost asio downloaded at " ${Boost_SOURCE_DIR}/libs/asio/include)
file(GLOB files "${Boost_SOURCE_DIR}/libs/*/include")
foreach(filename ${files})
include_directories(${filename})
endforeach()
file(GLOB files "${Boost_SOURCE_DIR}/libs/*/*/include")
foreach(filename ${files})
include_directories(${filename})
endforeach()
endif() Is this the correct way? Can this be properly documented in examples? |
You shouldn't use |
@OlivierLDff , |
Seems that boost still has poor CMake support. See #359 for our rollback to boost-cmake. |
If you only need It is much faster to fetch and is an interface library. |
done, see 7db2d51 |
Thanks @ClausKlein , where is the part to download boost? I am not able to see top level CMakeLists.txt where this code might be. |
Somehow I am not able to get boost test working with cpm.cmake. I have used the snippet for boost libraries, used cache but neither the include nor libraries are found.
The text was updated successfully, but these errors were encountered: