summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-05-12 11:48:17 (GMT)
committerBrad King <brad.king@kitware.com>2020-05-12 12:08:20 (GMT)
commitfe19df49d48680cbfd8e1023d4a93b39f12d4b64 (patch)
treef976accb2ab186b588431acf93c93c0c0626d642 /Tests/RunCMake/CMakeLists.txt
parent4dc95526868d903c7f9e9505001cb5dbeec259c0 (diff)
downloadCMake-fe19df49d48680cbfd8e1023d4a93b39f12d4b64.zip
CMake-fe19df49d48680cbfd8e1023d4a93b39f12d4b64.tar.gz
CMake-fe19df49d48680cbfd8e1023d4a93b39f12d4b64.tar.bz2
Initialize CMAKE_EXPORT_COMPILE_COMMANDS only if not set already
Also de-duplicate its initialization code. Fixes: #16588
Diffstat (limited to 'Tests/RunCMake/CMakeLists.txt')
-rw-r--r--Tests/RunCMake/CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index cc88868..8aeb412 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -197,6 +197,9 @@ endif()
add_RunCMake_test(CompilerNotFound)
add_RunCMake_test(Configure -DMSVC_IDE=${MSVC_IDE})
add_RunCMake_test(DisallowedCommands)
+if("${CMAKE_GENERATOR}" MATCHES "Unix Makefiles|Ninja")
+ add_RunCMake_test(ExportCompileCommands)
+endif()
add_RunCMake_test(ExternalData)
add_RunCMake_test(FeatureSummary)
add_RunCMake_test(FPHSA)