diff options
author | James E. King III <jking@apache.org> | 2019-05-03 11:24:55 -0400 |
---|---|---|
committer | James E. King III <jking@apache.org> | 2019-05-04 21:52:29 -0400 |
commit | 9ecdce3fe00931cebda39357b31b655236ab9221 (patch) | |
tree | 4232d6c92cf8b0a9bc544c3becd2c336fdba83a8 /build/cmake | |
parent | 27d8387c49a49fcf193893f834e9766ae0b051c1 (diff) | |
download | thrift-9ecdce3fe00931cebda39357b31b655236ab9221.tar.gz |
Fix MinGW build issue in AppVeyor
Diffstat (limited to 'build/cmake')
-rw-r--r-- | build/cmake/BoostMacros.cmake | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/build/cmake/BoostMacros.cmake b/build/cmake/BoostMacros.cmake index 0c7f13dfa..61be622ec 100644 --- a/build/cmake/BoostMacros.cmake +++ b/build/cmake/BoostMacros.cmake @@ -19,14 +19,22 @@ set(BOOST_MINREV 1.53) +# we are not ready for the new style link targets introduced in +# boost 1.70.0 and cmake 3.14.2 which showed up on appveyor in +# mingw builds +set(Boost_NO_BOOST_CMAKE ON) + macro(REQUIRE_BOOST_HEADERS) find_package(Boost ${BOOST_MINREV} QUIET REQUIRED) if (NOT Boost_FOUND) string(CONCAT fatal_message - "Boost 1.53 or later is required to build sources in ${CMAKE_CURRENT_SOURCE_DIR}") + "Boost ${BOOST_MINREV} or later is required to build sources in ${CMAKE_CURRENT_SOURCE_DIR}") message(FATAL_ERROR, ${fatal_message}) endif() - include_directories(SYSTEM "${Boost_INCLUDE_DIRS}") + if (DEFINED Boost_INCLUDE_DIRS) + # pre-boost 1.70.0 aware cmake, otherwise it is using targets + include_directories(SYSTEM "${Boost_INCLUDE_DIRS}") + endif() endmacro() macro(REQUIRE_BOOST_LIBRARIES libs) @@ -34,7 +42,7 @@ macro(REQUIRE_BOOST_LIBRARIES libs) find_package(Boost ${BOOST_MINREV} REQUIRED COMPONENTS ${${libs}}) if (NOT Boost_FOUND) string(CONCAT fatal_message - "Boost 1.53 or later is required to build sources in ${CMAKE_CURRENT_SOURCE_DIR}, " + "Boost ${BOOST_MINREV} or later is required to build sources in ${CMAKE_CURRENT_SOURCE_DIR}, " "or use -DBUILD_TESTING=OFF") message(FATAL_ERROR, ${fatal_message}) endif() |