From 1e92eda3ff405a3da43b92f1e77abc4c5f06dc31 Mon Sep 17 00:00:00 2001 From: Konstantin Zhuravlyov Date: Thu, 29 Jun 2023 10:38:28 -0400 Subject: [PATCH] Move install directories inside the if statement - otherwise it fails on windows due to a missing exclude pattern --- amd/hipcc/CMakeLists.txt | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/amd/hipcc/CMakeLists.txt b/amd/hipcc/CMakeLists.txt index a71f069d8b56ec..90743aba903ffc 100644 --- a/amd/hipcc/CMakeLists.txt +++ b/amd/hipcc/CMakeLists.txt @@ -90,19 +90,20 @@ set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSIO # Exclude Windows specific BAT scripts from install/packaging for Linux. if (NOT WIN32) - set(exclusion_pattern "*.bat") + install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin + DESTINATION . + USE_SOURCE_PERMISSIONS + DIRECTORY_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE + FILES_MATCHING + PATTERN "*" + PATTERN "*.bat" EXCLUDE) else () - set(exclusion_pattern "") + install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin + DESTINATION . + USE_SOURCE_PERMISSIONS + DIRECTORY_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) endif() -install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin - DESTINATION . - USE_SOURCE_PERMISSIONS - DIRECTORY_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE - FILES_MATCHING - PATTERN "*" - PATTERN ${exclusion_pattern} EXCLUDE ) - install(FILES "LICENSE.txt" "README.md"