]> git.proxmox.com Git - ceph.git/blobdiff - ceph/cmake/modules/BuildBoost.cmake
import ceph quincy 17.2.4
[ceph.git] / ceph / cmake / modules / BuildBoost.cmake
index bdda30f708ef83a9b5ca2ea361883d9ae984aa37..bd9497f1c093fd3339c50aa6c6f1f664dd8791bf 100644 (file)
@@ -80,10 +80,20 @@ function(do_build_boost root_dir version)
   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)
@@ -93,14 +103,6 @@ function(do_build_boost root_dir version)
   # 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