forked from conda-forge/staged-recipes
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Patch] Install Move Tools to
shared/amrex
- Loading branch information
Showing
2 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
From 538ec2382f4e00baa9d1a916b1ef95ce7cef3502 Mon Sep 17 00:00:00 2001 | ||
From: Axel Huebl <[email protected]> | ||
Date: Wed, 18 Oct 2023 09:58:37 -0700 | ||
Subject: [PATCH] Install Move Tools to `shared/amrex` | ||
|
||
Packaging AMReX for Conda, we realized that we break with | ||
common conventions on Unix systems by installing a top-level | ||
`Tools/` directory. | ||
|
||
This moves its content in both the build directory and the | ||
install destination to `share/amrex/` and `<CMakePkgRoot>/Modules/`, | ||
respectively. | ||
--- | ||
Tools/CMake/AMReXInstallHelpers.cmake | 29 ++++++++++++++++++--------- | ||
1 file changed, 20 insertions(+), 9 deletions(-) | ||
|
||
diff --git a/Tools/CMake/AMReXInstallHelpers.cmake b/Tools/CMake/AMReXInstallHelpers.cmake | ||
index 0720efb4cf9..4d967700496 100644 | ||
--- a/Tools/CMake/AMReXInstallHelpers.cmake | ||
+++ b/Tools/CMake/AMReXInstallHelpers.cmake | ||
@@ -26,7 +26,7 @@ function (install_amrex_targets) | ||
else() | ||
set(CMAKE_FILES_DIR lib/cmake/AMReX) | ||
endif() | ||
- set(MODULE_PATH Tools/CMake) # Relative path to top level installation/build-tree | ||
+ set(MODULE_PATH ${CMAKE_FILES_DIR}/Modules) # Relative path to top level installation/build-tree | ||
|
||
# Write Config file -- this is designed to work for both install and build trees | ||
configure_package_config_file(${AMREX_CMAKE_MODULES_PATH}/AMReXConfig.cmake.in | ||
@@ -88,11 +88,17 @@ function (install_amrex_targets) | ||
# Install Tools directory | ||
install( | ||
DIRECTORY | ||
- ${PROJECT_SOURCE_DIR}/Tools/CMake | ||
- ${PROJECT_SOURCE_DIR}/Tools/C_scripts | ||
- ${PROJECT_SOURCE_DIR}/Tools/typechecker | ||
+ ${PROJECT_SOURCE_DIR}/Tools/C_scripts | ||
+ ${PROJECT_SOURCE_DIR}/Tools/typechecker | ||
DESTINATION | ||
- Tools | ||
+ share/amrex | ||
+ USE_SOURCE_PERMISSIONS | ||
+ ) | ||
+ install( | ||
+ DIRECTORY | ||
+ ${PROJECT_SOURCE_DIR}/Tools/CMake/ | ||
+ DESTINATION | ||
+ ${MODULE_PATH} | ||
USE_SOURCE_PERMISSIONS | ||
) | ||
endif() | ||
@@ -106,11 +112,16 @@ function (install_amrex_targets) | ||
# Copy Tools directory to build tree | ||
file( | ||
COPY | ||
- ${PROJECT_SOURCE_DIR}/Tools/CMake | ||
- ${PROJECT_SOURCE_DIR}/Tools/C_scripts | ||
- ${PROJECT_SOURCE_DIR}/Tools/typechecker | ||
+ ${PROJECT_SOURCE_DIR}/Tools/C_scripts | ||
+ ${PROJECT_SOURCE_DIR}/Tools/typechecker | ||
+ DESTINATION | ||
+ ${PROJECT_BINARY_DIR}/share/amrex | ||
+ ) | ||
+ file( | ||
+ COPY | ||
+ ${PROJECT_SOURCE_DIR}/Tools/CMake/ | ||
DESTINATION | ||
- ${PROJECT_BINARY_DIR}/Tools | ||
+ ${PROJECT_BINARY_DIR}/${MODULE_PATH} | ||
) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters