[flang] Fix issue of flang/runtime/config.h not being found in out of tree builds

Summary: Fixes https://bugs.llvm.org/show_bug.cgi?id=46078

Reviewers: DavidTruby, jdoerfert, PeteSteinfeld, sscalpone, tskeith

Reviewed By: PeteSteinfeld, sscalpone, tskeith

Subscribers: mgorny, llvm-commits, tskeith

Tags: #llvm, #flang

Differential Revision: https://reviews.llvm.org/D81266
This commit is contained in:
Isuru Fernando 2020-06-08 14:13:58 -05:00
parent fc202c5fec
commit bb73d1b278
1 changed files with 4 additions and 0 deletions

View File

@ -25,6 +25,10 @@ if (NOT (HAVE_STRERROR OR HAVE_STRERROR_R OR HAVE_DECL_STRERROR_S))
endif()
configure_file(config.h.cmake config.h)
# include_directories is used here instead of target_include_directories
# because add_flang_library creates multiple objects (STATIC/SHARED, OBJECT)
# with different names
include_directories(AFTER ${CMAKE_CURRENT_BINARY_DIR})
add_flang_library(FortranRuntime
ISO_Fortran_binding.cpp