Skip to content

Commit

Permalink
CMake: AMReX_INSTALL (AMReX-Codes#1831)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ax3l authored Mar 2, 2021
1 parent b7ddf2d commit 28fd2ee
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()


#
Expand Down
2 changes: 2 additions & 0 deletions Docs/sphinx_documentation/source/BuildingAMReX.rst
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,8 @@ The list of available options is reported in the :ref:`table <tab:cmakevar>` 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}
Expand Down

0 comments on commit 28fd2ee

Please sign in to comment.