From 5a7b6ca470521ad4cf59f83e7709a6db53c3e684 Mon Sep 17 00:00:00 2001
From: Stephane Del Pino <stephane.delpino44@gmail.com>
Date: Fri, 18 Mar 2022 08:57:47 +0100
Subject: [PATCH] Change Kokkos namespace to InlineKokkos at compile time

This crappy change is done to avoid potential conflicts with third
party libraries that may use another version of Kokkos (e.g. new
versions of packaged PETSc embeds Trilinos which comes with its own
Kokkos)
---
 CMakeLists.txt | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 441062bd6..683958970 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -86,6 +86,10 @@ endif()
 set(GNU_CXX_MIN_VERSION "9.0.0")
 set(CLANG_CXX_MIN_VERSION "10.0.0")
 
+#------------------------------------------------------
+# Change Kokkos namespace to avoid conflicts
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DKokkos=InlineKokkos")
+
 #------------------------------------------------------
 # Pugs default compiler flags
 set(PUGS_CXX_FLAGS "${PUGS_CXX_FLAGS} -Wall -Wextra -pedantic")
-- 
GitLab