mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-14 20:20:35 +00:00
Enforce consistent function prototypes
This commit is contained in:
parent
867f53a49e
commit
cbdb2ad2e9
@ -151,6 +151,10 @@ if(NOT ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32) AND NOT (CMAKE_CXX
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
########################################################################
|
||||||
|
# Common compile flags
|
||||||
|
########################################################################
|
||||||
|
|
||||||
# Disable complex math NaN/INFO range checking for performance
|
# Disable complex math NaN/INFO range checking for performance
|
||||||
include(CheckCXXCompilerFlag)
|
include(CheckCXXCompilerFlag)
|
||||||
check_cxx_compiler_flag(-fcx-limited-range HAVE_CX_LIMITED_RANGE)
|
check_cxx_compiler_flag(-fcx-limited-range HAVE_CX_LIMITED_RANGE)
|
||||||
@ -167,6 +171,19 @@ endif()
|
|||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MY_CXX_FLAGS} -Wall")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MY_CXX_FLAGS} -Wall")
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
|
||||||
|
|
||||||
|
if(CMAKE_C_COMPILER_ID MATCHES "Clang|GNU")
|
||||||
|
# Abort compilation if kernel implementations have inconsistent function
|
||||||
|
# prototypes, i.e. if
|
||||||
|
#
|
||||||
|
# kernel_foo_sse(uint32_t *dst, lv32fc_t *src)
|
||||||
|
# kernel_foo_avx(uint16_t *dst, lv32fc_t *src)
|
||||||
|
#
|
||||||
|
# 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")
|
||||||
|
endif()
|
||||||
|
|
||||||
option(ENABLE_STRIP "Create a stripped volk_gnsssdr_profile binary (without debugging symbols)" OFF)
|
option(ENABLE_STRIP "Create a stripped volk_gnsssdr_profile binary (without debugging symbols)" OFF)
|
||||||
if(ENABLE_STRIP)
|
if(ENABLE_STRIP)
|
||||||
set(CMAKE_VERBOSE_MAKEFILE ON)
|
set(CMAKE_VERBOSE_MAKEFILE ON)
|
||||||
|
Loading…
Reference in New Issue
Block a user