diff options
author | Daan De Meyer <daan.j.demeyer@gmail.com> | 2019-10-12 16:49:04 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-10-18 18:37:33 (GMT) |
commit | 8065a686ddcb54b10fd6758eca24280f3e68926b (patch) | |
tree | 26160936788f23291802c1639be94a9b4a9cd463 /Tests/RunCMake/CommandLine/env-export-compile-commands | |
parent | 493c4e781a35a92c5c912b22493b84de750b1fe1 (diff) | |
download | CMake-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.txt | 7 |
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) |