chore: add cmake modules
This commit is contained in:
parent
49c3a5b3b8
commit
fa1221c69e
2 changed files with 14 additions and 0 deletions
8
cmake/ExportCompileCommands.cmake
Normal file
8
cmake/ExportCompileCommands.cmake
Normal file
|
@ -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()
|
6
cmake/sccache.cmake
Normal file
6
cmake/sccache.cmake
Normal file
|
@ -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()
|
Loading…
Reference in a new issue