summaryrefslogtreecommitdiff
path: root/Modules/CMakeGenericSystem.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/CMakeGenericSystem.cmake')
-rw-r--r--Modules/CMakeGenericSystem.cmake8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/CMakeGenericSystem.cmake b/Modules/CMakeGenericSystem.cmake
index 77d8cfd4fc..7efe5c4646 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()