summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-10-21 15:23:35 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-10-21 15:23:47 (GMT)
commit53f95dc5fb161ed92fb9fcb8ecc31502c5e6417e (patch)
tree551e702e2931a3b372df4bc786fb72dbe465e0e6 /Modules
parent8347c75d1e818154f13d7076966aedf3fb9f2c08 (diff)
parent8065a686ddcb54b10fd6758eca24280f3e68926b (diff)
downloadCMake-53f95dc5fb161ed92fb9fcb8ecc31502c5e6417e.zip
CMake-53f95dc5fb161ed92fb9fcb8ecc31502c5e6417e.tar.gz
CMake-53f95dc5fb161ed92fb9fcb8ecc31502c5e6417e.tar.bz2
Merge topic 'export-compile-commands-environment-variable'
8065a686dd Initialize CMAKE_EXPORT_COMPILE_COMMANDS from envvar of the same name Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3914
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeGenericSystem.cmake8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/CMakeGenericSystem.cmake b/Modules/CMakeGenericSystem.cmake
index 77d8cfd..7efe5c4 100644
--- a/Modules/CMakeGenericSystem.cmake
+++ b/Modules/CMakeGenericSystem.cmake
@@ -51,16 +51,16 @@ if(CMAKE_GENERATOR MATCHES "Make")
set_property(GLOBAL PROPERTY TARGET_MESSAGES ${CMAKE_TARGET_MESSAGES})
endif()
if(CMAKE_GENERATOR MATCHES "Unix Makefiles")
- set(CMAKE_EXPORT_COMPILE_COMMANDS OFF CACHE BOOL
- "Enable/Disable output of compile commands during generation."
+ set(CMAKE_EXPORT_COMPILE_COMMANDS "$ENV{CMAKE_EXPORT_COMPILE_COMMANDS}"
+ CACHE BOOL "Enable/Disable output of compile commands during generation."
)
mark_as_advanced(CMAKE_EXPORT_COMPILE_COMMANDS)
endif()
endif()
if(CMAKE_GENERATOR MATCHES "Ninja")
- set(CMAKE_EXPORT_COMPILE_COMMANDS OFF CACHE BOOL
- "Enable/Disable output of compile commands during generation."
+ set(CMAKE_EXPORT_COMPILE_COMMANDS "$ENV{CMAKE_EXPORT_COMPILE_COMMANDS}"
+ CACHE BOOL "Enable/Disable output of compile commands during generation."
)
mark_as_advanced(CMAKE_EXPORT_COMPILE_COMMANDS)
endif()