Skip to content

Commit 0ef4350

Browse files
authored
Introduce options to disable Variorum and SystemTap (#309)
* Add Variorum and SystemTap options * Prefer to fail for SystemTap on Windows and macOS platforms
1 parent 3369381 commit 0ef4350

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

CMakeLists.txt

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ option(KokkosTools_ENABLE_PAPI "Enable PAPI support" OFF)
4444
option(KokkosTools_ENABLE_MPI "Enable MPI support" OFF)
4545
option(KokkosTools_ENABLE_CALIPER "Enable building Caliper library" OFF)
4646
option(KokkosTools_ENABLE_APEX "Enable building Apex library" OFF)
47+
option(KokkosTools_ENABLE_VARIORUM "Enable Variorum support" OFF)
48+
option(KokkosTools_ENABLE_SYSTEMTAP "Enable SystemTap support" OFF)
4749
option(KokkosTools_ENABLE_EXAMPLES "Build examples" OFF)
4850
option(KokkosTools_ENABLE_TESTS "Build tests" OFF)
4951

@@ -85,7 +87,9 @@ else()
8587
set(KOKKOSTOOLS_HAS_MPI 0)
8688
endif()
8789

88-
include(cmake/configure_variorum.cmake)
90+
if(KokkosTools_ENABLE_VARIORUM)
91+
include(cmake/configure_variorum.cmake)
92+
endif()
8993

9094
set(KOKKOSTOOLS_HAS_CALIPER ${KokkosTools_ENABLE_CALIPER})
9195
set(KOKKOSTOOLS_HAS_NVTX ${Kokkos_ENABLE_CUDA}) # we assume that enabling CUDA for Kokkos program means nvtx should be available
@@ -157,14 +161,13 @@ if(KokkosTools_ENABLE_PAPI)
157161
add_subdirectory(profiling/papi-connector)
158162
endif()
159163

160-
if(NOT WIN32 AND NOT APPLE)
161-
find_program(KOKKOSTOOLS_DTRACE_EXECUTABLE dtrace)
162-
if(KOKKOSTOOLS_DTRACE_EXECUTABLE)
164+
if(KokkosTools_ENABLE_SYSTEMTAP)
165+
if(NOT WIN32 AND NOT APPLE)
166+
find_program(KOKKOSTOOLS_DTRACE_EXECUTABLE dtrace REQUIRED)
163167
add_subdirectory(profiling/systemtap-connector)
164168
set(KOKKOSTOOLS_HAS_SYSTEMTAP ON)
165169
else()
166-
message(STATUS "Skipping systemtap-connector (dtrace executable wasn't found)")
167-
set(KOKKOSTOOLS_HAS_SYSTEMTAP OFF)
170+
message(FATAL_ERROR "KokkosTools_ENABLE_SYSTEMTAP=ON is not supported on Windows and macOS platforms")
168171
endif()
169172
else()
170173
set(KOKKOSTOOLS_HAS_SYSTEMTAP OFF)

cmake/configure_variorum.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ find_package(Variorum QUIET)
2121
if(Variorum_FOUND)
2222
set(KOKKOSTOOLS_HAS_VARIORUM TRUE)
2323
else()
24-
message(WARNING "Variorum not found: ${MSG_NOTFOUND}")
24+
message(FATAL_ERROR "Variorum not found: ${MSG_NOTFOUND}")
2525
endif()

0 commit comments

Comments
 (0)