From 740da41f4735b35468431ffa2daee06c771abb4b Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Wed, 11 Oct 2023 12:44:18 -0700 Subject: [PATCH] CMake: `pip_install_nodeps` Target (#203) Add a target that does not search of check any dependencies with pip. Useful in package managers. --- CMakeLists.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index e26f3ffc..f1495353 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -280,6 +280,17 @@ add_custom_target(${pyAMReX_CUSTOM_TARGET_PREFIX}pip_install ${pyAMReX_CUSTOM_TARGET_PREFIX}pip_install_requirements ) +# this is for package managers only +add_custom_target(${pyAMReX_CUSTOM_TARGET_PREFIX}pip_install_nodeps + ${CMAKE_COMMAND} -E env AMREX_MPI=${AMReX_MPI} + ${Python_EXECUTABLE} -m pip install --force-reinstall --no-index --no-deps ${PYINSTALLOPTIONS} --find-links=amrex-whl amrex + WORKING_DIRECTORY + ${pyAMReX_BINARY_DIR} + DEPENDS + ${pyAMReX_INSTALL_TARGET_NAMES} + ${pyAMReX_CUSTOM_TARGET_PREFIX}pip_wheel +) + # Tests ####################################################################### #