Skip to content

Commit

Permalink
EAMxx: make rrtmgp call find_package for kokkos
Browse files Browse the repository at this point in the history
If an existing install of Kokkos is used, the imported
target has local scope, so following calls to cmake's
target_link_libraries won't recognize Kokkos if the
first call to find_package was in a subdir.

In EAMxx, that's the case (it's found while parsing the
ekat subdir). However, subsequent calls to find_package
are virtually no-op, so it doesn't hurt to call it again
  • Loading branch information
bartgol committed Sep 11, 2024
1 parent e65666f commit f080044
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions components/eamxx/src/physics/rrtmgp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ yakl_process_target(rrtmgp)
# NOTE: cannot use 'PUBLIC' in target_link_libraries,
# since yakl_process_target already used it
# with the "plain" signature
find_package(Kokkos REQUIRED)
target_link_libraries(rrtmgp yakl Kokkos::kokkos)
target_include_directories(rrtmgp PUBLIC
${SCREAM_BASE_DIR}/../../externals/YAKL
Expand Down

0 comments on commit f080044

Please sign in to comment.