aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorserge-sans-paille <sguelton@redhat.com>2022-07-19 06:53:01 -0400
committerserge-sans-paille <sguelton@redhat.com>2022-07-19 14:10:46 +0200
commit90af9b4111d8987d3d9ff8d36fcd992d3b40decf (patch)
tree5dce17027881d3d45aa7bc3d5eda9c147f5b975d
parent8f90edeb55b4b5b15a8c303bcc98e95df933062d (diff)
downloadllvm-90af9b4111d8987d3d9ff8d36fcd992d3b40decf.zip
llvm-90af9b4111d8987d3d9ff8d36fcd992d3b40decf.tar.gz
llvm-90af9b4111d8987d3d9ff8d36fcd992d3b40decf.tar.bz2
[flang] Fix flang-to-external-fc --version
Substitution of @FLANG_VERSION@ wasn't correctly performed. Differential Revision: https://reviews.llvm.org/D130074
-rw-r--r--flang/tools/f18/CMakeLists.txt9
-rwxr-xr-xflang/tools/f18/flang-to-external-fc.in (renamed from flang/tools/f18/flang-to-external-fc)0
2 files changed, 5 insertions, 4 deletions
diff --git a/flang/tools/f18/CMakeLists.txt b/flang/tools/f18/CMakeLists.txt
index 5fb3779..dd08987 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
index 24ceda3..24ceda3 100755
--- a/flang/tools/f18/flang-to-external-fc
+++ b/flang/tools/f18/flang-to-external-fc.in