[flang] [llvm] [flang] Generate quadmath_wrapper.h for Flang Evaluate. (PR #132817)
Michael Kruse via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 24 14:13:40 PDT 2025
================
@@ -45,3 +45,50 @@ if (IS_BIGENDIAN)
else ()
add_compile_definitions(FLANG_LITTLE_ENDIAN=1)
endif ()
+
+# Discover the GCC installation, when the build compiler is Clang,
+# and try to find quadmath.h there. Set FLANG_INCLUDE_QUADMATH_H
+# to the path to quadmath.h, if found.
+if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ if (NOT DEFINED FLANG_GCC_RESOURCE_DIR)
+ set(FLANG_GCC_RESOURCE_DIR "FLANG_GCC_RESOURCE_DIR-NOTFOUND")
+ # Prepare CMAKE_CXX_FLAGS so that they can be passed to execute_process
+ # as separate flags.
+ separate_arguments(flags UNIX_COMMAND "${CMAKE_CXX_FLAGS}")
+ set(hash_flag "-###")
+ set(command ${CMAKE_CXX_COMPILER} ${flags} ${hash_flag} -v)
+ execute_process(
+ COMMAND ${command}
----------------
Meinersbur wrote:
```suggestion
COMMAND "${CMAKE_CXX_COMPILER}" ${flags} -v "-###"
```
all temporary variables don't seem necessary.
https://github.com/llvm/llvm-project/pull/132817
More information about the llvm-commits
mailing list