diff options
author | makise-homura <akemi_homura@kurisa.ch> | 2022-06-22 20:51:57 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-06-28 15:12:04 (GMT) |
commit | 7545d1ca9f9db2cd828494bb9e571f953636c0be (patch) | |
tree | 526c3c37dd0dcd42d04927c24fdf9b181eaf47ad | |
parent | f11c12f9c8b148546a678f3438a44d0865e2476b (diff) | |
download | CMake-7545d1ca9f9db2cd828494bb9e571f953636c0be.zip CMake-7545d1ca9f9db2cd828494bb9e571f953636c0be.tar.gz CMake-7545d1ca9f9db2cd828494bb9e571f953636c0be.tar.bz2 |
Tests: don't use broken makensis
Some distros (OS Elbrus less than 7.0) have unrunnable
makensis. While performing tests, this condition is now
checked, and NSIS CPack generator test is not performed.
-rw-r--r-- | Tests/CMakeLists.txt | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 3e3447f..b0fb24d 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1056,8 +1056,11 @@ if(BUILD_TESTING) endif() endif() if(NSIS_MAKENSIS_EXECUTABLE) - set(CPackComponents_BUILD_OPTIONS ${CPackComponents_BUILD_OPTIONS} - -DCPACK_BINARY_NSIS:BOOL=ON) + execute_process(COMMAND ${NSIS_MAKENSIS_EXECUTABLE} "-VERSION" ERROR_QUIET OUTPUT_QUIET RESULT_VARIABLE NSIS_OK) + if("${NSIS_OK}" STREQUAL "0") + set(CPackComponents_BUILD_OPTIONS ${CPackComponents_BUILD_OPTIONS} + -DCPACK_BINARY_NSIS:BOOL=ON) + endif() endif() add_test(CPackComponents ${CMAKE_CTEST_COMMAND} |