diff options
author | Brad King <brad.king@kitware.com> | 2023-03-03 14:18:27 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-03-03 14:18:34 (GMT) |
commit | 87330a10e29c2c4b4dacd60009dc29f1630de6b7 (patch) | |
tree | 17c7651bd883ea5c8e3a6b6c0fc77f542795160d /Tests/RunCMake | |
parent | 10f318326fef873928311d5964a12db4f8a10d82 (diff) | |
parent | df38eaab2c806d15a3b2039bf96ad3e69569b5e8 (diff) | |
download | CMake-87330a10e29c2c4b4dacd60009dc29f1630de6b7.zip CMake-87330a10e29c2c4b4dacd60009dc29f1630de6b7.tar.gz CMake-87330a10e29c2c4b4dacd60009dc29f1630de6b7.tar.bz2 |
Merge topic 'ninja-multi-output-path-prefix'
df38eaab2c Ninja Multi-Config: Write output path prefix
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8280
Diffstat (limited to 'Tests/RunCMake')
3 files changed, 11 insertions, 0 deletions
diff --git a/Tests/RunCMake/NinjaMultiConfig/OutputPathPrefix-all-ninja-stdout.txt b/Tests/RunCMake/NinjaMultiConfig/OutputPathPrefix-all-ninja-stdout.txt new file mode 100644 index 0000000..f5bce43 --- /dev/null +++ b/Tests/RunCMake/NinjaMultiConfig/OutputPathPrefix-all-ninja-stdout.txt @@ -0,0 +1 @@ +tgt has been built diff --git a/Tests/RunCMake/NinjaMultiConfig/OutputPathPrefix.cmake b/Tests/RunCMake/NinjaMultiConfig/OutputPathPrefix.cmake new file mode 100644 index 0000000..c4e0587 --- /dev/null +++ b/Tests/RunCMake/NinjaMultiConfig/OutputPathPrefix.cmake @@ -0,0 +1 @@ +add_custom_target(tgt ALL COMMAND ${CMAKE_COMMAND} -E echo "tgt has been built") diff --git a/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake b/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake index c040e8f..47f5eee 100644 --- a/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake +++ b/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake @@ -459,6 +459,15 @@ set(RunCMake_TEST_OPTIONS "-DCMAKE_CONFIGURATION_TYPES=Debug\\;Release;-DCMAKE_C run_cmake(CompileCommands) unset(RunCMake_TEST_OPTIONS) +set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/OutputPathPrefix-build) +run_cmake_with_options(OutputPathPrefix "-DCMAKE_NINJA_OUTPUT_PATH_PREFIX=OutputPathPrefix-build") +set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}) +set(RunCMake_TEST_NO_CLEAN 1) +run_cmake_command(OutputPathPrefix-all-ninja "${RunCMake_MAKE_PROGRAM}" -f OutputPathPrefix-build/build.ninja OutputPathPrefix-build/all) +run_cmake_command(OutputPathPrefix-clean-ninja "${RunCMake_MAKE_PROGRAM}" -f OutputPathPrefix-build/build.ninja OutputPathPrefix-build/clean) +unset(RunCMake_TEST_NO_CLEAN) +unset(RunCMake_TEST_BINARY_DIR) + # CudaSimple uses separable compilation, which is currently only supported on NVCC. if(CMake_TEST_CUDA) set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/CudaSimple-build) |