mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
FindQuadmath: add -fext-numeric-literals if the compiler supports it
this is required for GCC >= 4.8 to support the 'Q' suffix for floating point literals (which are used in the quadmath.h header) In order to prevent compilers which eat the flag but do not support it from complaining constantly, it is tested for with "-Werror" enabled...
This commit is contained in:
parent
57879ab6c9
commit
c3304ed1a1
@ -9,6 +9,12 @@
|
||||
include(CheckCSourceCompiles)
|
||||
include(CheckCXXSourceCompiles)
|
||||
include(CMakePushCheckState)
|
||||
include(CheckCXXCompilerFlag)
|
||||
|
||||
check_cxx_compiler_flag("-Werror -fext-numeric-literals" HAVE_EXTENDED_NUMERIC_LITERALS)
|
||||
if (HAVE_EXTENDED_NUMERIC_LITERALS)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fext-numeric-literals")
|
||||
endif()
|
||||
|
||||
cmake_push_check_state()
|
||||
list(APPEND CMAKE_REQUIRED_LIBRARIES "quadmath")
|
||||
|
Loading…
Reference in New Issue
Block a user