По умолчанию генерировать файл compile_commands.json
This commit is contained in:
parent
63d5a966d7
commit
6c6f48c468
@ -1,6 +1,7 @@
|
|||||||
cmake_policy(SET CMP0057 NEW)
|
cmake_policy(SET CMP0057 NEW)
|
||||||
|
|
||||||
option(CMLIB_ENABLE_WARNING_FLAGS "Enable autodetected warning flags" ON)
|
option(CMLIB_ENABLE_WARNING_FLAGS "Enable autodetected warning flags" ON)
|
||||||
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE BOOL "Enable generation of compile_commands.json." FORCE)
|
||||||
|
|
||||||
# Добавление конфигурации для профилирования
|
# Добавление конфигурации для профилирования
|
||||||
if(CMAKE_CONFIGURATION_TYPES)
|
if(CMAKE_CONFIGURATION_TYPES)
|
||||||
@ -47,7 +48,6 @@ if(CMAKE_BUILD_TYPE STREQUAL Profile)
|
|||||||
message("Set options for profiling with Visual Studio C++")
|
message("Set options for profiling with Visual Studio C++")
|
||||||
endif()
|
endif()
|
||||||
set(CMAKE_VERBOSE_MAKEFILE ON CACHE BOOL "Enable generation of verbose build scripts." FORCE)
|
set(CMAKE_VERBOSE_MAKEFILE ON CACHE BOOL "Enable generation of verbose build scripts." FORCE)
|
||||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE BOOL "Enable generation of compile_commands.json." FORCE)
|
|
||||||
set(PROFILE 1)
|
set(PROFILE 1)
|
||||||
elseif(CMAKE_BUILD_TYPE STREQUAL Debug)
|
elseif(CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||||
# В режиме отладки подробный вывод сообщений компилятора
|
# В режиме отладки подробный вывод сообщений компилятора
|
||||||
@ -65,7 +65,6 @@ elseif(CMAKE_BUILD_TYPE STREQUAL Debug)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
set(CMAKE_VERBOSE_MAKEFILE ON CACHE BOOL "Enable generation of verbose build scripts." FORCE)
|
set(CMAKE_VERBOSE_MAKEFILE ON CACHE BOOL "Enable generation of verbose build scripts." FORCE)
|
||||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE BOOL "Enable generation of compile_commands.json." FORCE)
|
|
||||||
set(DEBUG 1)
|
set(DEBUG 1)
|
||||||
elseif(CMAKE_BUILD_TYPE STREQUAL Release)
|
elseif(CMAKE_BUILD_TYPE STREQUAL Release)
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${CMLIB_DETECTED_CXX_FLAGS}" CACHE STRING "" FORCE)
|
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${CMLIB_DETECTED_CXX_FLAGS}" CACHE STRING "" FORCE)
|
||||||
@ -73,7 +72,6 @@ elseif(CMAKE_BUILD_TYPE STREQUAL Release)
|
|||||||
elseif(CMAKE_BUILD_TYPE STREQUAL None)
|
elseif(CMAKE_BUILD_TYPE STREQUAL None)
|
||||||
# Режим None используется для статического анализа кода
|
# Режим None используется для статического анализа кода
|
||||||
set(CMAKE_VERBOSE_MAKEFILE ON CACHE BOOL "Enable generation of verbose build scripts." FORCE)
|
set(CMAKE_VERBOSE_MAKEFILE ON CACHE BOOL "Enable generation of verbose build scripts." FORCE)
|
||||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE BOOL "Enable generation of compile_commands.json." FORCE)
|
|
||||||
set(ANALYSIS 1)
|
set(ANALYSIS 1)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user