Skip to content

Commit

Permalink
Merge pull request #11 from lanl/jmm/package-registry-suggestion
Browse files Browse the repository at this point in the history
package registry docs
  • Loading branch information
Yurlungur authored Aug 3, 2022
2 parents 8487c5a + 4d1c369 commit 20de024
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions doc/sphinx/src/building.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,34 @@ For in-tree builds, you can set the configure time option
``PORTABILITY_STRATEGY`` to ``Kokkos``, ``Cuda`` or ``None`` to set
the equivalent preprocessor macro. The default is ``None``.

By default ``cmake`` keeps a registry of packages with install logic
that it has built in a user's home directory. Because
``ports-of-call`` fixes portability strategy at ``cmake`` configure
time, this can conflict with in-tree builds. A parent code that
includes ``ports-of-call`` may find the wrong build by default, rather
than the version that it includes explicitly in the source tree. To
resolve this, we recommend disabling ``cmake``'s package registry
machinery via:

.. code-block:: cmake
set(CMAKE_FIND_USE_PACKAGE_REGISTRY OFF CACHE BOOL "" FORCE)
set(CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY OFF CACHE BOOL "" FORCE)
If, on the other hand, you install the dependencies of your code
one-by-one, you should not disable the package registry. If you
encounter an issue where your configuration settings for
``ports-of-call`` don't seem to stick when building a code, you might
attempt disabling the package registry at configure time via

.. code-block:: cmake
-DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF -DCMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY=OFF
For more details, see the documentation on the `cmake package registry`_.

.. _cmake package registry: https://cmake.org/cmake/help/latest/manual/cmake-packages.7.html#package-registry

Spack
^^^^^^

Expand Down

0 comments on commit 20de024

Please sign in to comment.