From f08004483cae52fb217a539ff1186c33add80e3f Mon Sep 17 00:00:00 2001 From: Luca Bertagna Date: Wed, 11 Sep 2024 10:23:10 -0600 Subject: [PATCH] EAMxx: make rrtmgp call find_package for kokkos 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 --- components/eamxx/src/physics/rrtmgp/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/components/eamxx/src/physics/rrtmgp/CMakeLists.txt b/components/eamxx/src/physics/rrtmgp/CMakeLists.txt index 0d42d61fa66..1d3df9b4d2e 100644 --- a/components/eamxx/src/physics/rrtmgp/CMakeLists.txt +++ b/components/eamxx/src/physics/rrtmgp/CMakeLists.txt @@ -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