32 lines
1012 B
Diff
32 lines
1012 B
Diff
--- a/cmake/modules/AddQuadMathFlags.cmake 2020-03-24 07:54:22.548925006 +0100
|
|
+++ b/cmake/modules/AddQuadMathFlags.cmake.patched 2020-03-24 22:53:43.127262894 +0100
|
|
@@ -0,0 +1,28 @@
|
|
+# Defines the functions to use QuadMath
|
|
+#
|
|
+# .. cmake_function:: add_dune_quadmath_flags
|
|
+#
|
|
+# .. cmake_param:: targets
|
|
+# :positional:
|
|
+# :single:
|
|
+# :required:
|
|
+#
|
|
+# A list of targets to use QuadMath with.
|
|
+#
|
|
+
|
|
+
|
|
+function(add_dune_quadmath_flags _targets)
|
|
+ if(QUADMATH_FOUND)
|
|
+ foreach(_target ${_targets})
|
|
+ target_link_libraries(${_target} "quadmath")
|
|
+ set_property(TARGET ${_target}
|
|
+ APPEND_STRING
|
|
+ PROPERTY COMPILE_FLAGS "-DENABLE_QUADMATH=1 -D_GLIBCXX_USE_FLOAT128=1 ")
|
|
+ if(${CMAKE_CXX_COMPILER_ID} STREQUAL GNU)
|
|
+ set_property(TARGET ${_target}
|
|
+ APPEND_STRING
|
|
+ PROPERTY COMPILE_FLAGS "-fext-numeric-literals ")
|
|
+ endif()
|
|
+ endforeach(_target ${_targets})
|
|
+ endif(QUADMATH_FOUND)
|
|
+endfunction(add_dune_quadmath_flags)
|