[flang-commits] [flang] 47ed2bf - [flang] cmake fix for FLANG_RUNTIME_F128_MATH_LIB build (#93054)

via flang-commits flang-commits at lists.llvm.org
Wed May 22 12:00:32 PDT 2024


Author: dpalermo
Date: 2024-05-22T14:00:29-05:00
New Revision: 47ed2bfa711efe85b1149c3800f9c66fdc83ae70

URL: https://github.com/llvm/llvm-project/commit/47ed2bfa711efe85b1149c3800f9c66fdc83ae70
DIFF: https://github.com/llvm/llvm-project/commit/47ed2bfa711efe85b1149c3800f9c66fdc83ae70.diff

LOG: [flang] cmake fix for FLANG_RUNTIME_F128_MATH_LIB build (#93054)

Remove an extra '-D' in the call to add_compile_definitions. The extra
-D causes -D-DFLANG_RUNTIME_F128_MATH_LIB=libquadmath to appear in
compile options which results in a compilation failure. This occurs only
on systems using cmake versions 3.22.1 or 3.24.3. Using cmake 3.28.1
seems to automatically remove the duplicate -D.

Fixes https://github.com/llvm/llvm-project/pull/81971

Added: 
    

Modified: 
    flang/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/flang/CMakeLists.txt b/flang/CMakeLists.txt
index c8e75024823f2..af34366b36526 100644
--- a/flang/CMakeLists.txt
+++ b/flang/CMakeLists.txt
@@ -336,7 +336,7 @@ endif()
 
 if (FLANG_RUNTIME_F128_MATH_LIB)
   add_compile_definitions(
-    -DFLANG_RUNTIME_F128_MATH_LIB="${FLANG_RUNTIME_F128_MATH_LIB}"
+    FLANG_RUNTIME_F128_MATH_LIB="${FLANG_RUNTIME_F128_MATH_LIB}"
     )
 endif()
 


        


More information about the flang-commits mailing list