You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cmake/Tests/MissingInstall/ExpectInstallFail.cmake

19 lines
340 B

if(MULTI_CONFIG)
set(SI_CONFIG --config $<CONFIGURATION>)
else()
set(SI_CONFIG)
endif()
execute_process(
COMMAND ${CMAKE_COMMAND}
--build .
--target install ${SI_CONFIG}
RESULT_VARIABLE RESULT
OUTPUT_VARIABLE OUTPUT
ERROR_VARIABLE ERROR
)
if(RESULT EQUAL 0)
message(FATAL_ERROR "install should have failed")
endif()