Skip to content

Commit

Permalink
CMake Docs: Fix User-Guidance (Link) (AMReX-Codes#2990)
Browse files Browse the repository at this point in the history
Update the user-guidance on CMake dependency linking to CMake 3.0+
(anno. 2014+).

Seen in AMReX-Codes#2978
  • Loading branch information
ax3l authored Oct 15, 2022
1 parent 1ad4144 commit 9a3cd5d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Docs/sphinx_documentation/source/BuildingAMReX.rst
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ the following line in the appropriate CMakeLists.txt file:

::

target_link_libraries( <your-target-name> AMReX::<amrex-target-name> )
target_link_libraries( <your-target-name> PUBLIC AMReX::<amrex-target-name> )


In the above snippet, ``<amrex-target-name>`` is any of the targets listed in the table below.
Expand Down Expand Up @@ -709,7 +709,7 @@ As an example, consider the following CMake code:
::

find_package(AMReX REQUIRED 3D EB)
target_link_libraries( Foo AMReX::amrex AMReX::Flags_CXX )
target_link_libraries( Foo PUBLIC AMReX::amrex )

The code in the snippet above checks whether an AMReX installation with 3D and Embedded Boundary support
is available on the system. If so, AMReX is linked to target ``Foo`` and AMReX flags preset is used
Expand Down
2 changes: 1 addition & 1 deletion Docs/sphinx_documentation/source/GPU.rst
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ we provide the helper function ``setup_target_for_cuda_compilation()``:
setup_target_for_cuda_compilation(my_target)

# Link against amrex
target_link_libraries(my_target AMReX::amrex)
target_link_libraries(my_target PUBLIC AMReX::amrex)



Expand Down

0 comments on commit 9a3cd5d

Please sign in to comment.