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

Isuru Fernando via flang-commits flang-commits at lists.llvm.org
Mon Jun 8 12:16:14 PDT 2020


Author: Isuru Fernando
Date: 2020-06-08T14:16:08-05:00
New Revision: bb73d1b278eb478ca8e56153cf1469bf7eb13a3f

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

LOG: [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

Added: 
    

Modified: 
    flang/runtime/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/flang/runtime/CMakeLists.txt b/flang/runtime/CMakeLists.txt
index 7da1a2128292..5f0a1e20647e 100644
--- a/flang/runtime/CMakeLists.txt
+++ b/flang/runtime/CMakeLists.txt
@@ -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 
diff erent names
+include_directories(AFTER ${CMAKE_CURRENT_BINARY_DIR})
 
 add_flang_library(FortranRuntime
   ISO_Fortran_binding.cpp


        


More information about the flang-commits mailing list