Skip to content

Commit

Permalink
build CUDA smoketest if CUDA is found
Browse files Browse the repository at this point in the history
  • Loading branch information
slabasan committed Sep 23, 2024
1 parent 5237fc9 commit e00e1e3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/c/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ cmake_minimum_required(VERSION 3.12)

project(PerfFlowAspect VERSION "0.1.0")

# Build Options
option(PERFFLOWASPECT_WITH_CUDA "Build CUDA smoketest" ON)
option(PERFFLOWASPECT_WITH_MPI "Build MPI smoketest" ON)
option(PERFFLOWASPECT_WITH_MULTITHREADS "Build multi-threaded smoketest" ON)

# Fail if using Clang < 9.0
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
# require at least Clang 9.0
Expand Down
11 changes: 11 additions & 0 deletions src/c/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@ foreach(TEST ${SMOKETESTS})
target_link_libraries(${TEST} ${perfflow_deps})
endforeach()

# Build Options
option(PERFFLOWASPECT_WITH_MULTITHREADS "Build multi-threaded smoketest" ON)
find_package(CUDA QUIET)
if(CUDA_FOUND)
option(PERFFLOWASPECT_WITH_CUDA "Build CUDA smoketest" ON)
endif()
find_package(MPI QUIET)
if(MPI_FOUND)
option(PERFFLOWASPECT_WITH_MPI "Build MPI smoketest" ON)
endif()

if(PERFFLOWASPECT_WITH_MULTITHREADS)
message(STATUS " [*] Adding test: smoketest_MT")
add_executable(smoketest_MT smoketest_MT.cpp)
Expand Down

0 comments on commit e00e1e3

Please sign in to comment.