chore: add cmake modules

main
mandlm 2024-03-14 09:33:23 +01:00
parent 49c3a5b3b8
commit fa1221c69e
Signed by: mandlm
GPG Key ID: 4AA25D647AA54CC7
2 changed files with 14 additions and 0 deletions

View 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
View 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()