From d68bb3b678e867c69a99f97e26b72715e2b8e57f Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Mon, 18 May 2020 21:42:17 +0200 Subject: build: Add support for GCC 10 GCC 10 defaults to -fno-common, so some variables that were defined in the headers needed to be declared "extern". The GCC 10 static analyzer can now be invoked using the DebugAnalyzer build option. Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 535a0540..a8310274 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,7 +9,7 @@ include(GNUInstallDirs) set(PACKAGE_VERSION_MAJOR 0) set(PACKAGE_VERSION_MINOR 17) -set(PACKAGE_VERSION_PATCH 4) +set(PACKAGE_VERSION_PATCH 5) set(PACKAGE_NAME "${CMAKE_PROJECT_NAME}") set(PACKAGE_DESCRIPTION "The Ouroboros prototype") @@ -20,7 +20,7 @@ set(PACKAGE_VERSION if (NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE "Release" CACHE STRING - "Build type (Release, Debug, DebugASan, DebugTSan, DebugLSan)" FORCE) + "Build type (Release, Debug, DebugASan, DebugTSan, DebugLSan, DebugAnalyzer)" FORCE) endif() if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) @@ -98,6 +98,8 @@ elseif (CMAKE_BUILD_TYPE STREQUAL "DebugTSan") test_and_set_c_compiler_flag_global(-fsanitize=thread) elseif (CMAKE_BUILD_TYPE STREQUAL "DebugLSan") test_and_set_c_compiler_flag_global(-fsanitize=leak) +elseif (CMAKE_BUILD_TYPE STREQUAL "DebugAnalyzer") + test_and_set_c_compiler_flag_global(-fanalyzer) endif () configure_file("${CMAKE_CURRENT_SOURCE_DIR}/ouroboros-dev.pc.in" -- cgit v1.2.3