blob: dd05d96e6edfc201b60ae79eca451f128ba04ba5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
enable_language(C)
set(CMAKE_POLICY_WARNING_CMP0067 ON)
message("before try_compile with CMP0067 WARN-enabled but no variables")
try_compile(RESULT ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/src.c
)
message("after try_compile with CMP0067 WARN-enabled but no variables")
set(CMAKE_POLICY_WARNING_CMP0067 OFF)
#-----------------------------------------------------------------------------
set(CMAKE_C_STANDARD 90)
message("before try_compile with CMP0067 WARN-default")
try_compile(RESULT ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/src.c
)
message("after try_compile with CMP0067 WARN-default")
set(CMAKE_POLICY_WARNING_CMP0067 ON)
message("before try_compile with CMP0067 WARN-enabled")
try_compile(RESULT ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/src.c
)
message("after try_compile with CMP0067 WARN-enabled")
cmake_policy(SET CMP0067 OLD)
message("before try_compile with CMP0067 OLD")
try_compile(RESULT ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/src.c
)
message("after try_compile with CMP0067 OLD")
cmake_policy(SET CMP0066 NEW)
message("before try_compile with CMP0067 NEW")
try_compile(RESULT ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/src.c
)
message("after try_compile with CMP0067 NEW")
|