diff --git a/CMakeLists.txt b/CMakeLists.txt index ffb86d4ac..bd7b4ab6e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -142,7 +142,10 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}") set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}/lib") # needs to be before the first call of find_boost. -list(APPEND MAPNIK_COMPILE_DEFS BOOST_SPIRIT_X3_HIDE_CXX17_WARNING) +if(CMAKE_CXX_STANDARD VERSION_LESS 17) + list(APPEND MAPNIK_COMPILE_DEFS BOOST_SPIRIT_X3_HIDE_CXX17_WARNING) +endif() + if(USE_MULTITHREADED) set(Boost_USE_MULTITHREADED ON) list(APPEND MAPNIK_COMPILE_DEFS MAPNIK_THREADSAFE)