add compile_commands
This commit is contained in:
parent
8072fdf9a0
commit
ee53cc032b
1 changed files with 8 additions and 0 deletions
|
@ -4,6 +4,14 @@ set(LEAN_VERSION_MAJOR 0)
|
||||||
set(LEAN_VERSION_MINOR 2)
|
set(LEAN_VERSION_MINOR 2)
|
||||||
set(LEAN_VERSION_PATCH 0)
|
set(LEAN_VERSION_PATCH 0)
|
||||||
|
|
||||||
|
# Generate the `compile_commands.json` file.
|
||||||
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE INTERNAL "")
|
||||||
|
|
||||||
|
if(CMAKE_EXPORT_COMPILE_COMMANDS)
|
||||||
|
set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES
|
||||||
|
${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES})
|
||||||
|
endif()
|
||||||
|
|
||||||
if (NOT CMAKE_BUILD_TYPE)
|
if (NOT CMAKE_BUILD_TYPE)
|
||||||
message(STATUS "No build type selected, default to Release")
|
message(STATUS "No build type selected, default to Release")
|
||||||
set(CMAKE_BUILD_TYPE "Release")
|
set(CMAKE_BUILD_TYPE "Release")
|
||||||
|
|
Loading…
Reference in a new issue