1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-06-24 21:19:12 +08:00
CMake/Tests/GeneratorExpression/check-part4.cmake
Colby Pike 895f7f16a7 Genex: Add IF generator expression
This allows a single condition to be used to choose between two
alternatives.  Without this the condition must be duplicated with
one surrounded by `NOT`.

Closes: #15585
2017-01-26 11:18:50 -05:00

21 lines
510 B
CMake

include(${CMAKE_CURRENT_LIST_DIR}/check-common.cmake)
string(REPLACE ${path_prefix} "" test_shell_path ${test_shell_path})
if(WIN32)
if(CMAKE_GENERATOR STREQUAL "MSYS Makefiles")
check(test_shell_path [[/c/shell/path]])
elseif(CMAKE_GENERATOR STREQUAL "Unix Makefiles")
check(test_shell_path [[c:/shell/path]])
else()
check(test_shell_path [[c:\shell\path]])
endif()
else()
check(test_shell_path [[/shell/path]])
endif()
check(if_1 "a")
check(if_2 "b")
check(if_3 "b")
check(if_4 "a")