summaryrefslogtreecommitdiff
path: root/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2022-07-15 15:29:20 -0400
committerKyle Edwards <kyle.edwards@kitware.com>2022-07-15 16:22:21 -0400
commita186c1aff61fdedd2ef8d544c9f31c739daaa896 (patch)
treed4d3ec2624cf461de21d6f6d6c5695459c808f7a /Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake
parentcc803ce68049925afff405c3dad6fd4e4559a005 (diff)
downloadcmake-a186c1aff61fdedd2ef8d544c9f31c739daaa896.tar.gz
Ninja Multi-Config: Deduplicate compile_commands.json for cross configs
compile_commands.json was being written for every permutation of cross configurations. Deduplicate so only one command is output for each configuration. Fixes: #23733
Diffstat (limited to 'Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake')
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake b/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake
index 738bc6c5d2..c040e8f1ee 100644
--- a/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake
+++ b/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake
@@ -453,6 +453,11 @@ run_cmake_command(NoUnusedVariables ${CMAKE_COMMAND} ${CMAKE_CURRENT_LIST_DIR}
"-DCMAKE_DEFAULT_BUILD_TYPE=Debug"
"-DCMAKE_DEFAULT_CONFIGS=all"
)
+unset(RunCMake_TEST_BINARY_DIR)
+
+set(RunCMake_TEST_OPTIONS "-DCMAKE_CONFIGURATION_TYPES=Debug\\;Release;-DCMAKE_CROSS_CONFIGS=all;-DCMAKE_EXPORT_COMPILE_COMMANDS=ON")
+run_cmake(CompileCommands)
+unset(RunCMake_TEST_OPTIONS)
# CudaSimple uses separable compilation, which is currently only supported on NVCC.
if(CMake_TEST_CUDA)