id summary reporter owner description type status milestone component version severity resolution keywords cc 2965 BoostTesting.cmake uses an incorrect variable and causes build to fail when used as a subdirectory steve@… Douglas Gregor "Build fails when using the boost directory as a child node of another CMake-based project. That is, when another CMake-built project has the boost directory as a sub-project, as in, add_subdirectory(boost_1_38_0) then BoostTesting incorrectly sets BOOST_LIBS_DIR to ${CMAKE_SOURCE_DIR}/libs This is incorrect, because it assumes that the top level directory of the project will always include /libs in the source. More specifically, this is indicative of an overall problem where it assumes that the boost directory source is ALWAYS the top level CMake source directory, but this is not always the case. The fix to this problem is trivial. Change the relevant lines (56-59) in tools/build/CMake/BoostTesting.cmake from if(BOOST_BUILD_SANITY_TEST) set(BOOST_LIBS_DIR ${CMAKE_SOURCE_DIR}/tools/build/CMake/sanity) configure_file(${CMAKE_SOURCE_DIR}/libs/CMakeLists.txt ${BOOST_LIBS_DIR}/CMakeLists.txt COPYONLY) else(BOOST_BUILD_SANITY_TEST) set(BOOST_LIBS_DIR ${CMAKE_SOURCE_DIR}/libs) endif(BOOST_BUILD_SANITY_TEST) to if(BOOST_BUILD_SANITY_TEST) set(BOOST_LIBS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/tools/build/CMake/sanity) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libs/CMakeLists.txt ${BOOST_LIBS_DIR}/CMakeLists.txt COPYONLY) else(BOOST_BUILD_SANITY_TEST) set(BOOST_LIBS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/libs) endif(BOOST_BUILD_SANITY_TEST) " Bugs closed Boost 1.39.0 CMake Boost 1.38.0 Problem fixed Build