From 3e85bd920f2811250c43d2104882634943853160 Mon Sep 17 00:00:00 2001 From: Christian Trott Date: Tue, 27 Jun 2023 13:05:55 -0600 Subject: [PATCH] Fix windows symlink configure issue (#6241) * Fix windows symlink configure issue symlink creation requires elevated privileges * Update cmake/kokkos_install.cmake Co-authored-by: Damien L-G --------- Co-authored-by: Damien L-G --- cmake/kokkos_install.cmake | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cmake/kokkos_install.cmake b/cmake/kokkos_install.cmake index 8b1344b56bf..f818dfa2448 100644 --- a/cmake/kokkos_install.cmake +++ b/cmake/kokkos_install.cmake @@ -32,10 +32,11 @@ IF (NOT KOKKOS_HAS_TRILINOS AND NOT Kokkos_INSTALL_TESTING) # Required to be a TriBITS-compliant external package file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/cmake_packages/Kokkos) - file(CREATE_LINK ${Kokkos_BINARY_DIR}/KokkosTargets.cmake ${CMAKE_BINARY_DIR}/cmake_packages/Kokkos/KokkosTargets.cmake SYMBOLIC) - file(CREATE_LINK ${Kokkos_BINARY_DIR}/KokkosConfig.cmake ${CMAKE_BINARY_DIR}/cmake_packages/Kokkos/KokkosConfig.cmake SYMBOLIC) - file(CREATE_LINK ${Kokkos_BINARY_DIR}/KokkosConfigCommon.cmake ${CMAKE_BINARY_DIR}/cmake_packages/Kokkos/KokkosConfigCommon.cmake SYMBOLIC) - file(CREATE_LINK ${Kokkos_BINARY_DIR}/KokkosConfigVersion.cmake ${CMAKE_BINARY_DIR}/cmake_packages/Kokkos/KokkosConfigVersion.cmake SYMBOLIC) + file(COPY ${Kokkos_BINARY_DIR}/KokkosConfig.cmake + ${Kokkos_BINARY_DIR}/KokkosConfigCommon.cmake + ${Kokkos_BINARY_DIR}/KokkosConfigVersion.cmake + DESTINATION ${CMAKE_BINARY_DIR}/cmake_packages/Kokkos) + export(EXPORT KokkosTargets NAMESPACE Kokkos:: FILE ${CMAKE_BINARY_DIR}/cmake_packages/Kokkos/KokkosTargets.cmake) ELSE() CONFIGURE_FILE(cmake/KokkosConfigCommon.cmake.in ${Kokkos_BINARY_DIR}/KokkosConfigCommon.cmake @ONLY) file(READ ${Kokkos_BINARY_DIR}/KokkosConfigCommon.cmake KOKKOS_CONFIG_COMMON)