summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/ExcludeFromAll/single-config-build-check.cmake
blob: 1c455f2562341933d0f3d67ff3c9b7a28cc8a236 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
if(expectation STREQUAL "should_not_exist")
    set(should_exist FALSE)
elseif(expectation STREQUAL "should_exist")
    set(should_exist TRUE)
else()
    message(FATAL_ERROR "Encountered unknown expectation: ${expectation}")
endif()

if(EXISTS "${TARGET_FILE_tool_${config}}")
    if(NOT should_exist)
        message(FATAL_ERROR "${TARGET_FILE_tool_${config}} should not exist.")
    endif()
else()
    if(should_exist)
        message(FATAL_ERROR "${TARGET_FILE_tool_${config}} should exist.")
    endif()
endif()