diff --git a/cmake/ProjectCompilerPostConfig.cmake b/cmake/ProjectCompilerPostConfig.cmake index 7175d479d482..37aa9d520897 100644 --- a/cmake/ProjectCompilerPostConfig.cmake +++ b/cmake/ProjectCompilerPostConfig.cmake @@ -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 " ") @@ -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()