From bcc482915984c42c4ecc68a534f3cc41e8a9871c Mon Sep 17 00:00:00 2001 From: Matt Dawkins Date: Thu, 14 Jan 2021 12:15:21 -0500 Subject: [PATCH 1/2] No debug mode --- Patches/Boost/Configure.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Patches/Boost/Configure.cmake b/Patches/Boost/Configure.cmake index 82e1a5e5..bc249156 100644 --- a/Patches/Boost/Configure.cmake +++ b/Patches/Boost/Configure.cmake @@ -45,7 +45,7 @@ execute_command_wrapper( "Boost.Configure.BCP.Build" ${Boost_SOURCE_DIR}/tools/bcp ${Boost_SOURCE_DIR}/b2${CMAKE_EXECUTABLE_SUFFIX} - variant=debug ${B2_ARGS} + variant=${CMAKE_BUILD_TYPE} ${B2_ARGS} ) execute_command_wrapper( From 5ea65039976a3d0fb5441366074adbc1082d6486 Mon Sep 17 00:00:00 2001 From: Matt Dawkins Date: Thu, 14 Jan 2021 12:44:17 -0500 Subject: [PATCH 2/2] Pass in var --- CMake/External_Boost.cmake | 1 + Patches/Boost/Configure.cmake | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/CMake/External_Boost.cmake b/CMake/External_Boost.cmake index fb7f7018..0ef43335 100644 --- a/CMake/External_Boost.cmake +++ b/CMake/External_Boost.cmake @@ -50,6 +50,7 @@ ExternalProject_Add(Boost PATCH_COMMAND ${Boost_PATCH_COMMAND} CONFIGURE_COMMAND ${CMAKE_COMMAND} + -DCMAKE_BUILD_TYPE=$ -DCMAKE_VARS_FILE=${fletch_BUILD_PREFIX}/tmp/Boost/CMakeVars.cmake -DBoost_EXTRA_LIBS=${fletch_EXTRA_BOOST_LIBS} ${_Boost_DIR_ARGS} diff --git a/Patches/Boost/Configure.cmake b/Patches/Boost/Configure.cmake index bc249156..9b90610e 100644 --- a/Patches/Boost/Configure.cmake +++ b/Patches/Boost/Configure.cmake @@ -39,6 +39,12 @@ execute_command_wrapper( ${BOOTSTRAP} ${BOOTSTRAP_ARGS} ) +string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE) +if(NOT CMAKE_BUILD_TYPE STREQUAL "debug") # adjust for relwithdebinfo + set(CMAKE_BUILD_TYPE "release") +endif() +message("Boost.Configure.BCP.Build: Using variant=${CMAKE_BUILD_TYPE}") + # Note: BCP has known issues with some msvc release builds so we always build # it in debug. execute_command_wrapper(