Conditionally apply BOOST_SPIRIT_X3_HIDE_CXX17_WARNING if cxx_std < 17

This commit is contained in:
Artem Pavlenko 2023-06-11 11:22:49 +01:00
parent 708e2a4009
commit f226d4fd93

View file

@ -142,7 +142,10 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}/lib") set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}/lib")
# needs to be before the first call of find_boost. # 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) if(USE_MULTITHREADED)
set(Boost_USE_MULTITHREADED ON) set(Boost_USE_MULTITHREADED ON)
list(APPEND MAPNIK_COMPILE_DEFS MAPNIK_THREADSAFE) list(APPEND MAPNIK_COMPILE_DEFS MAPNIK_THREADSAFE)