endforeach()
list_replace(boost_with_libs "unit_test_framework" "test")
string(REPLACE ";" "," boost_with_libs "${boost_with_libs}")
+
+ if(CMAKE_CXX_COMPILER_ID STREQUAL GNU)
+ set(toolset gcc)
+ elseif(CMAKE_CXX_COMPILER_ID STREQUAL Clang)
+ set(toolset clang)
+ else()
+ message(SEND_ERROR "unknown compiler: ${CMAKE_CXX_COMPILER_ID}")
+ endif()
+
# build b2 and prepare the project-config.jam for boost
set(configure_command
./bootstrap.sh --prefix=<INSTALL_DIR>
- --with-libraries=${boost_with_libs})
+ --with-libraries=${boost_with_libs}
+ --with-toolset=${toolset})
set(b2 ./b2)
if(BOOST_J)
# suppress all debugging levels for b2
list(APPEND b2 -d0)
- if(CMAKE_CXX_COMPILER_ID STREQUAL GNU)
- set(toolset gcc)
- elseif(CMAKE_CXX_COMPILER_ID STREQUAL Clang)
- set(toolset clang)
- else()
- message(SEND_ERROR "unknown compiler: ${CMAKE_CXX_COMPILER_ID}")
- endif()
-
set(user_config ${CMAKE_BINARY_DIR}/user-config.jam)
# edit the user-config.jam so b2 will be able to use the specified
# toolset and python