diff options
| author | Phoebe <20694052+PhoebeHui@users.noreply.github.com> | 2020-12-28 17:28:44 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-28 17:28:44 -0800 |
| commit | d1e64a013e4df05b11fa1bb084abf1a3e3dde4ed (patch) | |
| tree | 45c4f0520891a27bdb48d8a340f2d00724ce5f8a | |
| parent | 59c519f93bb99b8ce01930b0acebafb34db78832 (diff) | |
| download | vcpkg-d1e64a013e4df05b11fa1bb084abf1a3e3dde4ed.tar.gz vcpkg-d1e64a013e4df05b11fa1bb084abf1a3e3dde4ed.zip | |
[boost-modular-build-helper] Fix repeat building issue on linux and osx (#15265)
| -rw-r--r-- | ports/boost-modular-build-helper/boost-modular-build.cmake | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/ports/boost-modular-build-helper/boost-modular-build.cmake b/ports/boost-modular-build-helper/boost-modular-build.cmake index 5bb07ba46..48452422b 100644 --- a/ports/boost-modular-build-helper/boost-modular-build.cmake +++ b/ports/boost-modular-build-helper/boost-modular-build.cmake @@ -116,7 +116,7 @@ function(boost_modular_build) set(VARIANT ${BUILD_TYPE})
set(BUILD_LIB_PATH ${BUILD_LIB_PATH})
configure_file(${_bm_DIR}/Jamroot.jam ${_bm_SOURCE_PATH}/Jamroot.jam @ONLY)
-
+
set(configure_option)
if(DEFINED _bm_BOOST_CMAKE_FRAGMENT)
list(APPEND configure_option "-DBOOST_CMAKE_FRAGMENT=${_bm_BOOST_CMAKE_FRAGMENT}")
@@ -135,13 +135,23 @@ function(boost_modular_build) )
vcpkg_install_cmake()
endfunction()
-
+
if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
- if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
+ set(build_flag 0)
+ if(NOT DEFINED VCPKG_BUILD_TYPE)
+ set(build_flag 1)
+ set(VCPKG_BUILD_TYPE "release")
+ endif()
+
+ if(VCPKG_BUILD_TYPE STREQUAL "release")
unix_build(${BOOST_LIB_RELEASE_SUFFIX} "release" "lib/")
endif()
- if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
+ if(build_flag)
+ set(VCPKG_BUILD_TYPE "debug")
+ endif()
+
+ if(VCPKG_BUILD_TYPE STREQUAL "debug")
unix_build(${BOOST_LIB_DEBUG_SUFFIX} "debug" "debug/lib/")
endif()
|
