mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
make the build system link to the "quadmath" library if it is supported
Thanks a lot to Roland Kaufmann for the support.
This commit is contained in:
parent
cd6f18ed90
commit
a2d4a32736
@ -1,8 +1,9 @@
|
|||||||
# Module that checks whether the compiler supports the
|
# Module that checks whether the compiler supports the
|
||||||
# quadruple precision floating point math
|
# quadruple precision floating point math
|
||||||
#
|
#
|
||||||
# Sets the following variable:
|
# Sets the following variables:
|
||||||
# HAVE_QUAD
|
# HAVE_QUAD
|
||||||
|
# QUADMATH_LIBRARIES
|
||||||
#
|
#
|
||||||
# perform tests
|
# perform tests
|
||||||
include(CheckCXXSourceCompiles)
|
include(CheckCXXSourceCompiles)
|
||||||
@ -17,3 +18,14 @@ int main(void){
|
|||||||
__float128 foo = sqrtq(123.456);
|
__float128 foo = sqrtq(123.456);
|
||||||
}" HAVE_QUAD)
|
}" HAVE_QUAD)
|
||||||
cmake_pop_check_state()
|
cmake_pop_check_state()
|
||||||
|
|
||||||
|
if (HAVE_QUAD)
|
||||||
|
set(QUADMATH_LIBRARIES "quadmath")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(QuadMath
|
||||||
|
DEFAULT_MSG
|
||||||
|
QUADMATH_LIBRARIES
|
||||||
|
HAVE_QUAD
|
||||||
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user