blob: 87d7f67c65fbddcd010060c8f1f88e77917414a1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
enable_language(C)
cmake_policy(GET CMP0092 cmp0092)
if(cmp0092 STREQUAL "NEW")
if("${CMAKE_C_FLAGS}" MATCHES "([/-]W[0-9])")
message(SEND_ERROR "CMAKE_C_FLAGS has '${CMAKE_MATCH_1}' under NEW behavior")
endif()
else()
if(NOT " ${CMAKE_C_FLAGS} " MATCHES " /W3 ")
message(SEND_ERROR "CMAKE_C_FLAGS does not have '/W3' under OLD behavior")
endif()
endif()
|