From 8754978676222abc06c0ef2269186cc0b70d70d0 Mon Sep 17 00:00:00 2001 From: Roberto Di Remigio Date: Mon, 12 Oct 2015 12:54:52 +0200 Subject: [PATCH] Correct two warts in the Boost build-up scripts --- modules/boost/boost.cmake | 5 ++++- modules/boost/boost_headers.cmake | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/boost/boost.cmake b/modules/boost/boost.cmake index f48b31c..966a768 100644 --- a/modules/boost/boost.cmake +++ b/modules/boost/boost.cmake @@ -74,6 +74,9 @@ if(FORCE_CUSTOM_BOOST) set(BOOST_INCLUDEDIR "") set(BOOST_LIBRARYDIR "") else() + # Read from cache, needed for rebuilds + set(BOOST_INCLUDEDIR ${Boost_INCLUDE_DIR}) + set(BOOST_LIBRARYDIR ${Boost_LIBRARY_DIR}) find_package(Boost ${BOOST_MINIMUM_REQUIRED} COMPONENTS "${BOOST_COMPONENTS_REQUIRED}") if(NOT Boost_FOUND) set(BUILD_CUSTOM_BOOST TRUE) @@ -104,7 +107,7 @@ if(BUILD_CUSTOM_BOOST) include(${CMAKE_CURRENT_LIST_DIR}/boost_unpack.cmake) include(${CMAKE_CURRENT_LIST_DIR}/boost_userconfig.cmake) - if(NOT BOOST_COMPONENTS_REQUIRED STREQUAL "") + if(NOT "${BOOST_COMPONENTS_REQUIRED}" STREQUAL "") # Non-empty list. Compiled libraries needed # Transform the ;-separated list to a ,-separated list (digested by the Boost build toolchain!) string(REPLACE ";" "," b2_needed_components "${BOOST_COMPONENTS_REQUIRED}") diff --git a/modules/boost/boost_headers.cmake b/modules/boost/boost_headers.cmake index 5004741..9e33d8c 100644 --- a/modules/boost/boost_headers.cmake +++ b/modules/boost/boost_headers.cmake @@ -1,7 +1,7 @@ # Install Boost add_custom_command( OUTPUT ${CUSTOM_BOOST_LOCATION}/boost.installed - COMMAND ${CMAKE_COMMAND} -E copy_directory ${BOOST_BUILD_DIR}/boost ${CUSTOM_BOOST_LOCATION}/include + COMMAND ${CMAKE_COMMAND} -E copy_directory ${BOOST_BUILD_DIR}/boost ${CUSTOM_BOOST_LOCATION}/include/boost COMMAND ${CMAKE_COMMAND} -E touch ${CUSTOM_BOOST_LOCATION}/boost.installed WORKING_DIRECTORY ${BOOST_BUILD_DIR} DEPENDS ${CUSTOM_BOOST_LOCATION}/boost.user-config