[PATCH] D117768: [flang] Update flang wrapper on change.

Yury Gribov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 20 02:52:10 PST 2022


ygribov created this revision.
ygribov added reviewers: tskeith, awarzynski, kiranchandramohan.
Herald added a subscriber: mgorny.
Herald added a reviewer: sscalpone.
Herald added a project: Flang.
ygribov requested review of this revision.
Herald added subscribers: llvm-commits, jdoerfert.
Herald added a project: LLVM.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D117768

Files:
  flang/tools/f18/CMakeLists.txt


Index: flang/tools/f18/CMakeLists.txt
===================================================================
--- flang/tools/f18/CMakeLists.txt
+++ flang/tools/f18/CMakeLists.txt
@@ -45,8 +45,10 @@
 
 # This flang shell script will only work in a POSIX shell.
 if (NOT WIN32)
-  file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/flang
-    DESTINATION ${CMAKE_BINARY_DIR}/bin
-    FILE_PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE)
+  add_custom_command(
+    OUTPUT ${CMAKE_BINARY_DIR}/bin/flang
+    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/flang
+    COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/flang ${CMAKE_BINARY_DIR}/bin)
+  add_custom_target(flang-wrapper ALL DEPENDS ${CMAKE_BINARY_DIR}/bin/flang)
   install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/flang DESTINATION "${CMAKE_INSTALL_BINDIR}")
 endif()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117768.401575.patch
Type: text/x-patch
Size: 806 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220120/5d6cd0da/attachment.bin>


More information about the llvm-commits mailing list