summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CommandLine/env-export-compile-commands
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2019-10-12 16:49:04 (GMT)
committerBrad King <brad.king@kitware.com>2019-10-18 18:37:33 (GMT)
commit8065a686ddcb54b10fd6758eca24280f3e68926b (patch)
tree26160936788f23291802c1639be94a9b4a9cd463 /Tests/RunCMake/CommandLine/env-export-compile-commands
parent493c4e781a35a92c5c912b22493b84de750b1fe1 (diff)
downloadCMake-8065a686ddcb54b10fd6758eca24280f3e68926b.zip
CMake-8065a686ddcb54b10fd6758eca24280f3e68926b.tar.gz
CMake-8065a686ddcb54b10fd6758eca24280f3e68926b.tar.bz2
Initialize CMAKE_EXPORT_COMPILE_COMMANDS from envvar of the same name
Fixes: #18386
Diffstat (limited to 'Tests/RunCMake/CommandLine/env-export-compile-commands')
-rw-r--r--Tests/RunCMake/CommandLine/env-export-compile-commands/CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/Tests/RunCMake/CommandLine/env-export-compile-commands/CMakeLists.txt b/Tests/RunCMake/CommandLine/env-export-compile-commands/CMakeLists.txt
new file mode 100644
index 0000000..aa6fbfd
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/env-export-compile-commands/CMakeLists.txt
@@ -0,0 +1,7 @@
+cmake_minimum_required(VERSION 3.14)
+project(env-export-compile-commands C)
+
+# Add target with a source file to make sure compile_commands.json gets
+# generated.
+file(TOUCH ${CMAKE_CURRENT_BINARY_DIR}/main.c)
+add_executable(env-export-compile-commands ${CMAKE_CURRENT_BINARY_DIR}/main.c)