diff options
Diffstat (limited to 'Tests/RunCMake/CheckIPOSupported/CMP0138-Common.cmake')
-rw-r--r-- | Tests/RunCMake/CheckIPOSupported/CMP0138-Common.cmake | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Tests/RunCMake/CheckIPOSupported/CMP0138-Common.cmake b/Tests/RunCMake/CheckIPOSupported/CMP0138-Common.cmake new file mode 100644 index 0000000..508e6c3 --- /dev/null +++ b/Tests/RunCMake/CheckIPOSupported/CMP0138-Common.cmake @@ -0,0 +1,9 @@ +enable_language(C) +string(APPEND CMAKE_C_FLAGS " -DFOO") +string(APPEND CMAKE_C_FLAGS_DEBUG " -DBAR") +check_ipo_supported(RESULT ipo_supported) +file(STRINGS "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/_CMakeLTOTest-C/bin/CMakeCache.txt" + cached_flags REGEX "^CMAKE_C_FLAGS(_DEBUG)?:") +foreach(line IN LISTS cached_flags) + message(STATUS "${line}") +endforeach() |