diff options
author | Brad King <brad.king@kitware.com> | 2023-12-07 19:58:40 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2024-01-04 16:59:26 (GMT) |
commit | 5f1bbdb3b327ef5ff65ce331bf644d9b08d9c40f (patch) | |
tree | 99efd50094df1fd23c457e3133abc18b1aba39bd | |
parent | 5a61984088adb39de48f7d852c79e269f35c09f9 (diff) | |
download | CMake-5f1bbdb3b327ef5ff65ce331bf644d9b08d9c40f.zip CMake-5f1bbdb3b327ef5ff65ce331bf644d9b08d9c40f.tar.gz CMake-5f1bbdb3b327ef5ff65ce331bf644d9b08d9c40f.tar.bz2 |
Tests: Enable RunCMake.RuntimePath test on more platforms
Move the "ELF" check to specific cases inside the test.
-rw-r--r-- | Tests/RunCMake/CMakeLists.txt | 4 | ||||
-rw-r--r-- | Tests/RunCMake/RuntimePath/RunCMakeTest.cmake | 16 |
2 files changed, 11 insertions, 9 deletions
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index dbcb94e..e581042 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -434,8 +434,8 @@ endif() add_RunCMake_test(ObjectLibrary) add_RunCMake_test(ParseImplicitIncludeInfo) add_RunCMake_test(ParseImplicitLinkInfo) -if(UNIX AND CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG AND CMAKE_EXECUTABLE_FORMAT STREQUAL "ELF") - add_RunCMake_test(RuntimePath) +if(UNIX AND CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG) + add_RunCMake_test(RuntimePath -DCMAKE_EXECUTABLE_FORMAT=${CMAKE_EXECUTABLE_FORMAT}) endif() add_RunCMake_test(ScriptMode) add_RunCMake_test(Swift -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME} diff --git a/Tests/RunCMake/RuntimePath/RunCMakeTest.cmake b/Tests/RunCMake/RuntimePath/RunCMakeTest.cmake index ad446e9..531cd05 100644 --- a/Tests/RunCMake/RuntimePath/RunCMakeTest.cmake +++ b/Tests/RunCMake/RuntimePath/RunCMakeTest.cmake @@ -21,12 +21,14 @@ if(RunCMake_GENERATOR_IS_MULTI_CONFIG) set(cfg_dir /Debug) endif() -run_RuntimePath(SymlinkImplicit) -run_cmake_command(SymlinkImplicitCheck - ${CMAKE_COMMAND} -Ddir=${RunCMake_BINARY_DIR}/SymlinkImplicit-build -Dcfg_dir=${cfg_dir} -P ${RunCMake_SOURCE_DIR}/SymlinkImplicitCheck.cmake) +if(CMAKE_EXECUTABLE_FORMAT STREQUAL "ELF") + run_RuntimePath(SymlinkImplicit) + run_cmake_command(SymlinkImplicitCheck + ${CMAKE_COMMAND} -Ddir=${RunCMake_BINARY_DIR}/SymlinkImplicit-build -Dcfg_dir=${cfg_dir} -P ${RunCMake_SOURCE_DIR}/SymlinkImplicitCheck.cmake) -run_RuntimePath(Relative) + run_RuntimePath(Relative) -run_RuntimePath(Genex) -run_cmake_command(GenexCheck - ${CMAKE_COMMAND} -Ddir=${RunCMake_BINARY_DIR}/Genex-build -P ${RunCMake_SOURCE_DIR}/GenexCheck.cmake) + run_RuntimePath(Genex) + run_cmake_command(GenexCheck + ${CMAKE_COMMAND} -Ddir=${RunCMake_BINARY_DIR}/Genex-build -P ${RunCMake_SOURCE_DIR}/GenexCheck.cmake) +endif() |