From 8db3a27a3d9e18275f1eb78113c55d884d02b328 Mon Sep 17 00:00:00 2001
From: Carl Pearson <cwpears@sandia.gov>
Date: Thu, 16 Jan 2025 11:37:51 -0700
Subject: [PATCH 1/2] Add status message when nvtx connectors are not built

Signed-off-by: Carl Pearson <cwpears@sandia.gov>
---
 CMakeLists.txt | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 034f47c89..5436d1195 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -188,9 +188,12 @@ if(KOKKOSTOOLS_HAS_VARIORUM)
 endif()
 
 # GPU profilers
-if(Kokkos_ENABLE_CUDA)
+if(KOKKOSTOOLS_HAS_NVTX)
   add_subdirectory(profiling/nvtx-connector)
   add_subdirectory(profiling/nvtx-focused-connector)
+else()
+  message(STATUS "Skipping nvtx-connector:         NVTX is not enabled (maybe Kokkos was not found, or not configured with the CUDA backend)")
+  message(STATUS "Skipping nvtx-focused-connector: NVTX is not enabled (maybe Kokkos was not found, or not configured with the CUDA backend)")
 endif()
 if(Kokkos_ENABLE_HIP)
   add_subdirectory(profiling/roctx-connector)

From 356bb4a7f5880644246a61fd4f082bf17e7aaec0 Mon Sep 17 00:00:00 2001
From: Carl Pearson <cwpears@sandia.gov>
Date: Thu, 16 Jan 2025 12:47:27 -0700
Subject: [PATCH 2/2] Add status message when roctx-connector is not built

Signed-off-by: Carl Pearson <cwpears@sandia.gov>
---
 CMakeLists.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5436d1195..3791c092e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -195,8 +195,10 @@ else()
   message(STATUS "Skipping nvtx-connector:         NVTX is not enabled (maybe Kokkos was not found, or not configured with the CUDA backend)")
   message(STATUS "Skipping nvtx-focused-connector: NVTX is not enabled (maybe Kokkos was not found, or not configured with the CUDA backend)")
 endif()
-if(Kokkos_ENABLE_HIP)
+if(KOKKOSTOOLS_HAS_ROCTX)
   add_subdirectory(profiling/roctx-connector)
+else()
+  message(STATUS "Skipping roctx-connector: ROCTX is not enabled (maybe Kokkos was not found, or not configured with the HIP backend)")
 endif()
 
 if(KOKKOSTOOLS_HAS_VTUNE)