Исправление генерации сборочных файлов для режима отладки и анализа

This commit is contained in:
Andrei Astafev 2020-04-02 11:53:48 +03:00
parent 54cf15c7e0
commit 47581bd7b7

View File

@ -50,16 +50,24 @@ elseif(CMAKE_BUILD_TYPE STREQUAL Debug)
string(APPEND CMAKE_C_FLAGS_DEBUG " -ggdb") string(APPEND CMAKE_C_FLAGS_DEBUG " -ggdb")
string(APPEND CMAKE_CXX_FLAGS_DEBUG " -ggdb") string(APPEND CMAKE_CXX_FLAGS_DEBUG " -ggdb")
endif() endif()
set(CMAKE_VERBOSE_MAKEFILE 1) set(CMAKE_VERBOSE_MAKEFILE
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) ON
CACHE BOOL "Enable verbose build file generation." FORCE)
set(CMAKE_EXPORT_COMPILE_COMMANDS
ON
CACHE BOOL "Enable output of compile commands during generation." FORCE)
set(DEBUG 1) set(DEBUG 1)
elseif(CMAKE_BUILD_TYPE STREQUAL Release) elseif(CMAKE_BUILD_TYPE STREQUAL Release)
set(RELEASE 1) set(RELEASE 1)
elseif(CMAKE_BUILD_TYPE STREQUAL None) elseif(CMAKE_BUILD_TYPE STREQUAL None)
# Режим None используется для статического анализа кода # Режим None используется для статического анализа кода
set(ANALYSIS 1) set(ANALYSIS 1)
set(CMAKE_VERBOSE_MAKEFILE 1) set(CMAKE_VERBOSE_MAKEFILE
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) ON
CACHE BOOL "Enable verbose build file generation." FORCE)
set(CMAKE_EXPORT_COMPILE_COMMANDS
ON
CACHE BOOL "Enable output of compile commands during generation." FORCE)
# set(USE_CLANG_TIDY ON CACHE BOOL "Use clang-tidy") # set(USE_CLANG_TIDY ON CACHE BOOL "Use clang-tidy")
# set(USE_CPPCHECK ON CACHE BOOL "Use cppcheck") # set(USE_CPPCHECK ON CACHE BOOL "Use cppcheck")
set(USE_PVS_STUDIO set(USE_PVS_STUDIO