[flang-commits] [flang] b9198a1 - [flang][runtime] Fixed include directories for Float128Math files. (#108466)

via flang-commits flang-commits at lists.llvm.org
Mon Sep 16 08:18:38 PDT 2024


Author: Slava Zakharin
Date: 2024-09-16T08:18:33-07:00
New Revision: b9198a17315757dc0c2e831c9df0498dcab55285

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

LOG: [flang][runtime] Fixed include directories for Float128Math files. (#108466)

When building FortranRuntime out of tree on aarch64, the list of include
directories for the files comming from FortranFloat128MathILib
has to contain flang/runtime. I did this via
INTERFACE_INCLUDE_DIRECTORIES property.

Added: 
    

Modified: 
    flang/runtime/CMakeLists.txt
    flang/runtime/Float128Math/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/flang/runtime/CMakeLists.txt b/flang/runtime/CMakeLists.txt
index 4537b2d059d65b..0ad1b718d5875b 100644
--- a/flang/runtime/CMakeLists.txt
+++ b/flang/runtime/CMakeLists.txt
@@ -251,6 +251,13 @@ if (NOT TARGET FortranFloat128Math)
       APPEND PROPERTY COMPILE_DEFINITIONS
       ${f128_defs}
       )
+    get_target_property(f128_include_dirs
+      FortranFloat128MathILib INTERFACE_INCLUDE_DIRECTORIES
+      )
+    set_property(SOURCE ${f128_sources}
+      APPEND PROPERTY INCLUDE_DIRECTORIES
+      ${f128_include_dirs}
+      )
     list(APPEND sources ${f128_sources})
   endif()
 endif()

diff  --git a/flang/runtime/Float128Math/CMakeLists.txt b/flang/runtime/Float128Math/CMakeLists.txt
index a5f5bec1e7e4b8..87f791f225d0d3 100644
--- a/flang/runtime/Float128Math/CMakeLists.txt
+++ b/flang/runtime/Float128Math/CMakeLists.txt
@@ -69,6 +69,9 @@ set(sources
 
 include_directories(AFTER "${CMAKE_CURRENT_SOURCE_DIR}/..")
 add_library(FortranFloat128MathILib INTERFACE)
+target_include_directories(FortranFloat128MathILib INTERFACE
+  $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>
+  )
 
 if (FLANG_RUNTIME_F128_MATH_LIB)
   if (${FLANG_RUNTIME_F128_MATH_LIB} STREQUAL "libquadmath")


        


More information about the flang-commits mailing list