summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2023-06-04 13:29:42 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2023-06-04 13:29:42 (GMT)
commitbfa5b430b33d7d6ad5c71829c8fe60ca57e3f4e7 (patch)
treeac06a0e4664c1c03f31ed945704303df0abc61e2 /Tests
parent326bd503edc66142d88f1f67847a20fd6752d209 (diff)
downloadCMake-bfa5b430b33d7d6ad5c71829c8fe60ca57e3f4e7.zip
CMake-bfa5b430b33d7d6ad5c71829c8fe60ca57e3f4e7.tar.gz
CMake-bfa5b430b33d7d6ad5c71829c8fe60ca57e3f4e7.tar.bz2
Apple text-based stubs: ensure runpath is correctly defined
This is a complement to !8204.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/AppleTextStubs/LibraryWithOutputs.cmake3
-rw-r--r--Tests/RunCMake/AppleTextStubs/RunCMakeTest.cmake7
2 files changed, 9 insertions, 1 deletions
diff --git a/Tests/RunCMake/AppleTextStubs/LibraryWithOutputs.cmake b/Tests/RunCMake/AppleTextStubs/LibraryWithOutputs.cmake
index f61c8f2..9c7107a 100644
--- a/Tests/RunCMake/AppleTextStubs/LibraryWithOutputs.cmake
+++ b/Tests/RunCMake/AppleTextStubs/LibraryWithOutputs.cmake
@@ -7,6 +7,9 @@ set_property(TARGET foo PROPERTY ARCHIVE_OUTPUT_NAME "tbd")
add_executable(main main.c)
target_link_libraries(main PRIVATE foo)
+set_property(TARGET main PROPERTY RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/$<CONFIG>")
+
+add_custom_target(run COMMAND "$<TARGET_FILE:main>")
set (GENERATE_CONTENT "if (\"${CMAKE_TAPI}\")
diff --git a/Tests/RunCMake/AppleTextStubs/RunCMakeTest.cmake b/Tests/RunCMake/AppleTextStubs/RunCMakeTest.cmake
index 9ccd685..7687106 100644
--- a/Tests/RunCMake/AppleTextStubs/RunCMakeTest.cmake
+++ b/Tests/RunCMake/AppleTextStubs/RunCMakeTest.cmake
@@ -19,7 +19,12 @@ endfunction()
build_project(Simple)
build_project(Framework)
-build_project(LibraryWithOutputs)
+
+function(LibraryWithOutputs-run)
+ run_cmake_command(${test}-run ${CMAKE_COMMAND} --build . --target run --config Release)
+endfunction()
+
+build_project(LibraryWithOutputs LibraryWithOutputs-run)
function(LibraryWithVersions-install)