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

Substitution of @FLANG_VERSION@ wasn't correctly performed.

Differential Revision: https://reviews.llvm.org/D130074
This commit is contained in:
serge-sans-paille 2022-07-19 06:53:01 -04:00
parent 8f90edeb55
commit 90af9b4111
2 changed files with 5 additions and 4 deletions

View File

@ -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()