From 6b1ab274b1c0a94fc719763fd508e62ed916b188 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Tue, 5 Jan 2021 10:53:32 +0100 Subject: [PATCH] Fix for GCC < 5.0 --- .../libs/volk_gnsssdr_module/volk_gnsssdr/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/CMakeLists.txt b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/CMakeLists.txt index 5b69ce569..91217e1d8 100644 --- a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/CMakeLists.txt +++ b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/CMakeLists.txt @@ -181,7 +181,9 @@ if(CMAKE_C_COMPILER_ID MATCHES "Clang|GNU") # are defined. Note the different data type of the first argument). By # default 'incompatible-pointer-types' is a warning only and 'pointer-sign' # is a warning enabled by '-Wall'. These warnings are only applicable to C. - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=incompatible-pointer-types -Werror=pointer-sign") + if(NOT (CMAKE_C_COMPILER_ID MATCHES "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_LESS "5.0")) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=incompatible-pointer-types -Werror=pointer-sign") + endif() endif() option(ENABLE_STRIP "Create a stripped volk_gnsssdr_profile binary (without debugging symbols)" OFF)