1
0
Fork 0

feat: extract compile command handling from CMakeLists.txt

main
mandlm 2023-10-12 11:54:14 +02:00
parent 0d43936a61
commit fc5ad7f137
Signed by: mandlm
GPG Key ID: 4AA25D647AA54CC7
2 changed files with 8 additions and 5 deletions

View File

@ -5,12 +5,9 @@ project(
VERSION 0.1.0
LANGUAGES CXX)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
if(CMAKE_EXPORT_COMPILE_COMMANDS)
set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES
${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES})
endif()
include(ExportCompileCommands)
configure_file("${PROJECT_SOURCE_DIR}/include/version.h.in"
"${PROJECT_BINARY_DIR}/include/version.h")

View File

@ -0,0 +1,6 @@
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
if(CMAKE_EXPORT_COMPILE_COMMANDS)
set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES
${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES})
endif()