cmake: if GCC-version is less than 4.9 print a status not a warning

This commit is contained in:
Patrick Boettcher 2017-03-08 22:46:48 +01:00
parent dd2d95cf0a
commit e327885992

View File

@ -40,10 +40,10 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.9.0")
find_package(Boost COMPONENTS regex)
if(NOT Boost_FOUND)
message(WARNING "GCC less then 4.9 and boost-regex NOT found - no regex used")
message(STATUS "GCC less then 4.9 and boost-regex NOT found - no regex used")
target_compile_definitions(json-schema-validator PRIVATE -DJSON_SCHEMA_NO_REGEX)
else()
message(WARNING "GCC less then 4.9 and boost-regex FOUND - using boost::regex")
message(STATUS "GCC less then 4.9 and boost-regex FOUND - using boost::regex")
target_compile_definitions(json-schema-validator PRIVATE -DJSON_SCHEMA_BOOST_REGEX)
target_include_directories(json-schema-validator PRIVATE ${Boost_INCLUDE_DIRS})
target_link_libraries(json-schema-validator PRIVATE ${Boost_LIBRARIES})