diff options
Diffstat (limited to 'Tests/RunCMake/GeneratorExpression')
4 files changed, 26 insertions, 0 deletions
diff --git a/Tests/RunCMake/GeneratorExpression/CMP0044-WARN-result.txt b/Tests/RunCMake/GeneratorExpression/CMP0044-WARN-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/CMP0044-WARN-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/GeneratorExpression/CMP0044-WARN-stderr.txt b/Tests/RunCMake/GeneratorExpression/CMP0044-WARN-stderr.txt new file mode 100644 index 0000000..2079c12 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/CMP0044-WARN-stderr.txt @@ -0,0 +1,7 @@ +CMake Warning \(dev\) at CMP0044-WARN.cmake:13 \(target_compile_definitions\): + Policy CMP0044 is not set: Case sensitive <LANG>_COMPILER_ID generator + expressions. Run "cmake --help-policy CMP0044" for policy details. Use + the cmake_policy command to set the policy and suppress this warning. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/GeneratorExpression/CMP0044-WARN.cmake b/Tests/RunCMake/GeneratorExpression/CMP0044-WARN.cmake new file mode 100644 index 0000000..d5b85c9 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/CMP0044-WARN.cmake @@ -0,0 +1,17 @@ + +project(CMP0044-WARN) + +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() + +add_library(cmp0044-check empty.c) +target_compile_definitions(cmp0044-check + PRIVATE + Result=$<C_COMPILER_ID:${lc_test}> + Type_Is_${CMP0044_TYPE} +) diff --git a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake index 54d5064..f3f99ed 100644 --- a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake +++ b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake @@ -9,3 +9,4 @@ run_cmake(BadZero) run_cmake(BadTargetName) run_cmake(BadTargetTypeObject) run_cmake(BadInstallPrefix) +run_cmake(CMP0044-WARN) |