[PATCH] D117768: [flang][cmake] Add a custom target for the "flang" wrapper script.
Yury Gribov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 25 06:46:35 PST 2022
ygribov updated this revision to Diff 402892.
ygribov retitled this revision from "[flang] Update flang wrapper on change." to "[flang][cmake] Add a custom target for the "flang" wrapper script.".
ygribov added a comment.
Resolve review comments.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117768/new/
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 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.402892.patch
Type: text/x-patch
Size: 798 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220125/010dfb84/attachment.bin>
More information about the llvm-commits
mailing list