[flang][nfc] Fix Windows build
authorAndrzej Warzynski <andrzej.warzynski@arm.com>
Tue, 31 May 2022 20:57:35 +0000 (20:57 +0000)
committerAndrzej Warzynski <andrzej.warzynski@arm.com>
Tue, 31 May 2022 20:59:44 +0000 (20:59 +0000)
* Breaking change: https://reviews.llvm.org/D125832
* Buildbot failure: https://lab.llvm.org/buildbot/#/builders/172/builds/13123

Sending this without a review - this is a rather straightforward fix.

flang/tools/f18/CMakeLists.txt

index 3e96c84..f378301 100644 (file)
@@ -56,9 +56,9 @@ if (NOT WIN32)
     COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/flang-to-external-fc ${CMAKE_BINARY_DIR}/bin)
   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}")
+  add_custom_target(flang-slink ALL DEPENDS ${CMAKE_BINARY_DIR}/bin/flang-to-external-fc COMMAND ${CMAKE_COMMAND} -E create_symlink
+    ${CMAKE_BINARY_DIR}/bin/flang-to-external-fc ${CMAKE_BINARY_DIR}/bin/flang)
 endif()
-add_custom_target(flang-slink ALL DEPENDS ${CMAKE_BINARY_DIR}/bin/flang-to-external-fc COMMAND ${CMAKE_COMMAND} -E create_symlink
-  ${CMAKE_BINARY_DIR}/bin/flang-to-external-fc ${CMAKE_BINARY_DIR}/bin/flang)
 
 # TODO Move this to a more suitable location
 file(COPY ${FLANG_SOURCE_DIR}/module/omp_lib.h DESTINATION "${CMAKE_BINARY_DIR}/include/flang/OpenMP/" FILE_PERMISSIONS OWNER_READ OWNER_WRITE)