summaryrefslogtreecommitdiff
path: root/Tests/RunCMake/GeneratorExpression/CMP0044-WARN.cmake
blob: d5b85c9361592141faf0725af502dfe0be76d79d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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}
)