summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-06-06 13:55:28 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-06-06 13:55:34 (GMT)
commit53d923439515e385f1cb66b5aff2cd14eedce136 (patch)
tree773bb738256f2a0a6e04d37827633861cf17035a /Tests
parent1ad77d7029f7d34e2fa20e98267f84a6891e7707 (diff)
parentbfa5b430b33d7d6ad5c71829c8fe60ca57e3f4e7 (diff)
downloadCMake-53d923439515e385f1cb66b5aff2cd14eedce136.zip
CMake-53d923439515e385f1cb66b5aff2cd14eedce136.tar.gz
CMake-53d923439515e385f1cb66b5aff2cd14eedce136.tar.bz2
Merge topic 'Apple-tbd-runpath-handling'
bfa5b430b3 Apple text-based stubs: ensure runpath is correctly defined Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8536
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)