Skip to content

Commit b9198a1

Browse files
authored
[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.
1 parent 0f723eb commit b9198a1

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

flang/runtime/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,13 @@ if (NOT TARGET FortranFloat128Math)
251251
APPEND PROPERTY COMPILE_DEFINITIONS
252252
${f128_defs}
253253
)
254+
get_target_property(f128_include_dirs
255+
FortranFloat128MathILib INTERFACE_INCLUDE_DIRECTORIES
256+
)
257+
set_property(SOURCE ${f128_sources}
258+
APPEND PROPERTY INCLUDE_DIRECTORIES
259+
${f128_include_dirs}
260+
)
254261
list(APPEND sources ${f128_sources})
255262
endif()
256263
endif()

flang/runtime/Float128Math/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ set(sources
6969

7070
include_directories(AFTER "${CMAKE_CURRENT_SOURCE_DIR}/..")
7171
add_library(FortranFloat128MathILib INTERFACE)
72+
target_include_directories(FortranFloat128MathILib INTERFACE
73+
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>
74+
)
7275

7376
if (FLANG_RUNTIME_F128_MATH_LIB)
7477
if (${FLANG_RUNTIME_F128_MATH_LIB} STREQUAL "libquadmath")

0 commit comments

Comments
 (0)