Skip to content

Commit

Permalink
Update logic for TPL_ENABLE_Kokkos=ON (trilinos#11545)
Browse files Browse the repository at this point in the history
When Kokkos is supplied as an external package, the modern CMake imported
targets from the Kokkos<Subpkg>Config.cmake files also provide the needed
flags.  Therefore, there should be no special mention of Kokkos in the
Trilinos configure logic.
  • Loading branch information
bartlettroscoe authored and jwillenbring committed Jun 12, 2023
1 parent 4d0e6b3 commit eeef5fa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmake/ProjectCompilerPostConfig.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
IF (${PROJECT_NAME}_ENABLE_Kokkos)
tribits_get_package_enable_status(Kokkos KokkosEnable "")

IF (KokkosEnable)
MESSAGE("-- " "Skip adding flags for OpenMP because Kokkos flags does that ...")
SET(OpenMP_CXX_FLAGS_OVERRIDE " ")

Expand All @@ -7,4 +9,6 @@ IF (${PROJECT_NAME}_ENABLE_Kokkos)
# Grab those variables here so we know what was the original top-level flags
# and what are the CMAKE_CXX_FLAGS added afterwards for an individual package
SET(TRILINOS_TOPLEVEL_CXX_FLAGS ${CMAKE_CXX_FLAGS})
# NOTE: Setting TRILINOS_TOPLEVEL_CXX_FLAGS only has any impact if Kokkos is
# being treated as an internal package.
ENDIF()

0 comments on commit eeef5fa

Please sign in to comment.