X-Git-Url: https://git.ao2.it/libam7xxx.git/blobdiff_plain/dadc58ab9891dc5dfc60f9e2070330d60f3ceed8..5ef1e47f15e751cc42251adeb268ca85708ef4ae:/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index cb1272c..73657f8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ set(PROJECT_DESCRIPTION set(PROJECT_VER_MAJOR 0) set(PROJECT_VER_MINOR 1) -set(PROJECT_VER_PATCH 5) +set(PROJECT_VER_PATCH 7) set(PROJECT_VER_EXTRA "") set(PROJECT_VER "${PROJECT_VER_MAJOR}.${PROJECT_VER_MINOR}.${PROJECT_VER_PATCH}${PROJECT_VER_EXTRA}") @@ -65,8 +65,15 @@ if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG) -Wswitch-enum -Wundef -Wunreachable-code - -Wwrite-strings - -fstack-protector) + -Wwrite-strings) + + include(CheckCCompilerFlag) + CHECK_C_COMPILER_FLAG(-fstack-protector-strong COMPILER_SUPPORTS_STACK_PROTECTOR_STRONG) + if (COMPILER_SUPPORTS_STACK_PROTECTOR_STRONG) + add_flags(CMAKE_C_FLAGS -fstack-protector-strong) + else() + add_flags(CMAKE_C_FLAGS -fstack-protector) + endif() add_flags(DEBUG_FLAGS -ggdb)