[flang-commits] [flang] 90af9b4 - [flang] Fix flang-to-external-fc --version

via flang-commits flang-commits at lists.llvm.org
Tue Jul 19 05:11:12 PDT 2022


Author: serge-sans-paille
Date: 2022-07-19T14:10:46+02:00
New Revision: 90af9b4111d8987d3d9ff8d36fcd992d3b40decf

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

LOG: [flang] Fix flang-to-external-fc --version

Substitution of @FLANG_VERSION@ wasn't correctly performed.

Differential Revision: https://reviews.llvm.org/D130074

Added: 
    flang/tools/f18/flang-to-external-fc.in

Modified: 
    flang/tools/f18/CMakeLists.txt

Removed: 
    flang/tools/f18/flang-to-external-fc


################################################################################
diff  --git a/flang/tools/f18/CMakeLists.txt b/flang/tools/f18/CMakeLists.txt
index 5fb37794d28e4..dd0898730e2e9 100644
--- a/flang/tools/f18/CMakeLists.txt
+++ b/flang/tools/f18/CMakeLists.txt
@@ -50,10 +50,11 @@ add_custom_target(module_files ALL DEPENDS ${MODULE_FILES})
 
 # This flang shell script will only work in a POSIX shell.
 if (NOT WIN32)
-  add_custom_command(
-    OUTPUT ${CMAKE_BINARY_DIR}/bin/flang-to-external-fc
-    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/flang-to-external-fc
-    COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/flang-to-external-fc ${CMAKE_BINARY_DIR}/bin)
+  configure_file(
+    ${CMAKE_CURRENT_SOURCE_DIR}/flang-to-external-fc.in
+    ${CMAKE_BINARY_DIR}/bin/flang-to-external-fc
+    @ONLY
+  )
   add_custom_target(flang-to-external-fc ALL DEPENDS ${CMAKE_BINARY_DIR}/bin/flang-to-external-fc)
   install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/flang-to-external-fc DESTINATION "${CMAKE_INSTALL_BINDIR}")
 endif()

diff  --git a/flang/tools/f18/flang-to-external-fc b/flang/tools/f18/flang-to-external-fc.in
similarity index 100%
rename from flang/tools/f18/flang-to-external-fc
rename to flang/tools/f18/flang-to-external-fc.in


        


More information about the flang-commits mailing list