diff options
Diffstat (limited to 'Tests/GeneratorExpression/CMP0044/CMakeLists.txt')
-rw-r--r-- | Tests/GeneratorExpression/CMP0044/CMakeLists.txt | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Tests/GeneratorExpression/CMP0044/CMakeLists.txt b/Tests/GeneratorExpression/CMP0044/CMakeLists.txt new file mode 100644 index 0000000..309a8cc --- /dev/null +++ b/Tests/GeneratorExpression/CMP0044/CMakeLists.txt @@ -0,0 +1,19 @@ + +string(TOLOWER ${CMAKE_C_COMPILER_ID} lc_test) +if (lc_test STREQUAL CMAKE_C_COMPILER_ID) + string(TOUPPER ${CMAKE_C_COMPILER_ID} lc_test) + if (lc_test STREQUAL CMAKE_C_COMPILER_ID) + message(SEND_ERROR "Try harder.") + endif() +endif() + +if (CMP0044_TYPE) + cmake_policy(SET CMP0044 ${CMP0044_TYPE}) +endif() + +add_library(cmp0044-check-${CMP0044_TYPE} cmp0044-check.cpp) +target_compile_definitions(cmp0044-check-${CMP0044_TYPE} + PRIVATE + Result=$<C_COMPILER_ID:${lc_test}> + Type_Is_${CMP0044_TYPE} +) |