akornatskyy commented on a change in pull request #361: URL: https://github.com/apache/mesos/pull/361#discussion_r417074587
########## File path: 3rdparty/CMakeLists.txt ########## @@ -194,29 +194,34 @@ endfunction() # Boost: C++ Libraries. # http://www.boost.org ####################### -EXTERNAL(boost ${BOOST_VERSION} ${CMAKE_CURRENT_BINARY_DIR}) -add_library(boost INTERFACE) -add_dependencies(boost ${BOOST_TARGET}) -if (CMAKE_CXX_COMPILER_ID MATCHES GNU OR CMAKE_CXX_COMPILER_ID MATCHES Clang) - # Headers including Boost 1.65.0 fail to compile with GCC 7.2 and - # CLang 3.6 without `-Wno-unused-local-typedefs`. - # TODO(andschwa): Remove this when Boost has a resolution. - target_compile_options(boost INTERFACE -Wno-unused-local-typedefs) -endif () -target_include_directories(boost INTERFACE ${BOOST_ROOT}) +if ("${BOOST_ROOT_DIR}" STREQUAL "") + EXTERNAL(boost ${BOOST_VERSION} ${CMAKE_CURRENT_BINARY_DIR}) + add_library(boost INTERFACE) + add_dependencies(boost ${BOOST_TARGET}) + if (CMAKE_CXX_COMPILER_ID MATCHES GNU OR CMAKE_CXX_COMPILER_ID MATCHES Clang) + # Headers including Boost 1.65.0 fail to compile with GCC 7.2 and + # CLang 3.6 without `-Wno-unused-local-typedefs`. + # TODO(andschwa): Remove this when Boost has a resolution. + target_compile_options(boost INTERFACE -Wno-unused-local-typedefs) + endif () + target_include_directories(boost INTERFACE ${BOOST_ROOT}) Review comment: sounds reasonable to me, will give it a try. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
