[flang-commits] [flang] [flang][runtime] Fixed include directories for Float128Math files. (PR #108466)
Slava Zakharin via flang-commits
flang-commits at lists.llvm.org
Thu Sep 12 15:44:18 PDT 2024
https://github.com/vzakhari created https://github.com/llvm/llvm-project/pull/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.
>From 4ca6147ab8295d99eace08628a0202231e56c7c9 Mon Sep 17 00:00:00 2001
From: Slava Zakharin <szakharin at nvidia.com>
Date: Thu, 12 Sep 2024 15:40:22 -0700
Subject: [PATCH] [flang][runtime] Fixed include directories for Float128Math
files.
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.
---
flang/runtime/CMakeLists.txt | 7 +++++++
flang/runtime/Float128Math/CMakeLists.txt | 3 +++
2 files changed, 10 insertions(+)
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