From 28fd2ee530e4c0229f04e33e041989f8535c9d33 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Tue, 2 Mar 2021 09:41:39 -0800 Subject: [PATCH] CMake: AMReX_INSTALL (#1831) Add an `AMReX_INSTALL` option that controls `install()` generation. Such options are typically used in superbuilds by dependent projects to supress the install of AMReX headers, helpers and libs, e.g. if AMReX is fully consumed as private dependency. --- CMakeLists.txt | 7 +++++-- Docs/sphinx_documentation/source/BuildingAMReX.rst | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 865403df75a..1ccea2fb5b8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -143,8 +143,11 @@ endif () # # Install amrex -- Export # -include(AMReXInstallHelpers) -install_amrex_targets(${_amrex_targets}) +option(AMReX_INSTALL "Generate Install Targets" YES) +if(AMReX_INSTALL) + include(AMReXInstallHelpers) + install_amrex_targets(${_amrex_targets}) +endif() # diff --git a/Docs/sphinx_documentation/source/BuildingAMReX.rst b/Docs/sphinx_documentation/source/BuildingAMReX.rst index 8c4b4a1f7e9..f7e9a6bec06 100644 --- a/Docs/sphinx_documentation/source/BuildingAMReX.rst +++ b/Docs/sphinx_documentation/source/BuildingAMReX.rst @@ -491,6 +491,8 @@ The list of available options is reported in the :ref:`table ` bel +------------------------------+-------------------------------------------------+-------------------------+-----------------------+ | AMReX_DIFFERENT_COMPILER | Allow an app to use a different compiler | NO | YES, NO | +------------------------------+-------------------------------------------------+-------------------------+-----------------------+ + | AMReX_INSTALL | Generate Install Targets | YES | YES, NO | + +------------------------------+-------------------------------------------------+-------------------------+-----------------------+ .. raw:: latex \end{center}