diff --git a/cmake/ExportCompileCommands.cmake b/cmake/ExportCompileCommands.cmake new file mode 100644 index 0000000..5db8897 --- /dev/null +++ b/cmake/ExportCompileCommands.cmake @@ -0,0 +1,8 @@ +set(CMAKE_EXPORT_COMPILE_COMMANDS + ON + CACHE BOOL "Export compile commands database") + +if(CMAKE_EXPORT_COMPILE_COMMANDS) + set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES + ${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES}) +endif() diff --git a/cmake/sccache.cmake b/cmake/sccache.cmake new file mode 100644 index 0000000..52adea6 --- /dev/null +++ b/cmake/sccache.cmake @@ -0,0 +1,6 @@ +find_program(SCCACHE_FOUND sccache) + +if(SCCACHE_FOUND) + set(CMAKE_C_COMPILER_LAUNCHER sccache) + set(CMAKE_CXX_COMPILER_LAUNCHER sccache) +endif()