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

Isuru Fernando via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 5 10:36:56 PDT 2020


isuruf updated this revision to Diff 268873.
isuruf added a comment.
Herald added a reviewer: sscalpone.

Use include_directories instead of target_include_directories


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D81266/new/

https://reviews.llvm.org/D81266

Files:
  flang/runtime/CMakeLists.txt


Index: flang/runtime/CMakeLists.txt
===================================================================
--- flang/runtime/CMakeLists.txt
+++ flang/runtime/CMakeLists.txt
@@ -25,6 +25,10 @@
 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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81266.268873.patch
Type: text/x-patch
Size: 536 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200605/9212847c/attachment.bin>


More information about the llvm-commits mailing list