aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/nvim/CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt
index 77ed0490d8..d1bf08f3fb 100755
--- a/src/nvim/CMakeLists.txt
+++ b/src/nvim/CMakeLists.txt
@@ -688,6 +688,13 @@ set_target_properties(nvim
EXPORT_COMPILE_COMMANDS ON
ENABLE_EXPORTS TRUE)
+find_program(CCACHE_PRG ccache)
+if(CCACHE_PRG)
+ set_target_properties(nvim
+ PROPERTIES
+ C_COMPILER_LAUNCHER "${CMAKE_COMMAND};-E;env;CCACHE_SLOPPINESS=pch_defines,time_macros;${CCACHE_PRG}")
+endif()
+
if(${CMAKE_VERSION} VERSION_LESS 3.20)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
endif()