Skip to content

Commit

Permalink
Minor reorg of top-level CMake file, add option for short test run
Browse files Browse the repository at this point in the history
  • Loading branch information
rhornung67 committed Aug 16, 2024
1 parent b655bd2 commit 66a6599
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,8 @@ else()
cmake_minimum_required(VERSION 3.20)
endif()

option(ENABLE_RAJA_SEQUENTIAL "Run sequential variants of RAJA kernels. Disable
this, and all other variants, to run _only_ base variants." On)
option(ENABLE_KOKKOS "Include Kokkos implementations of the kernels in the RAJA Perfsuite" Off)

#
# Note: the BLT build system is inheritted by RAJA and is initialized by RAJA
#

if (PERFSUITE_ENABLE_WARNINGS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror")
endif()

if (ENABLE_KOKKOS OR ENABLE_SYCL)
set(CMAKE_CXX_STANDARD 17)
set(BLT_CXX_STD c++17)
Expand All @@ -41,6 +31,13 @@ include(blt/SetupBLT.cmake)
# Define RAJA PERFSUITE settings...
#

option(ENABLE_RAJA_SEQUENTIAL "Run sequential variants of RAJA kernels. Disable
this, and all other variants, to run _only_ base variants." On)

if (PERFSUITE_ENABLE_WARNINGS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror")
endif()

cmake_dependent_option(RAJA_PERFSUITE_ENABLE_TESTS "Enable RAJA Perf Suite Tests" On "ENABLE_TESTS" Off)

if (ENABLE_TESTS)
Expand All @@ -50,6 +47,8 @@ if (ENABLE_TESTS)

endif()

option(PERFSUITE_RUN_SHORT_TEST "Shorter test run to avoid timeout in some CI cases." Off)

cmake_dependent_option(RAJA_PERFSUITE_ENABLE_MPI "Build with MPI" On "ENABLE_MPI" Off)
if (RAJA_PERFSUITE_ENABLE_MPI)
set(RAJA_PERFSUITE_NUM_MPI_TASKS 4 CACHE STRING "Number of MPI tasks in tests")
Expand Down Expand Up @@ -132,10 +131,15 @@ set(CAMP_ENABLE_TESTS Off CACHE BOOL "")
if (ENABLE_RAJA_SEQUENTIAL)
add_definitions(-DRUN_RAJA_SEQ)
endif ()

if (ENABLE_OPENMP)
add_definitions(-DRUN_OPENMP)
endif ()

if (PERFSUITE_RUN_SHORT_TEST)
add_definitions(-DRUN_RAJAPERF_SHORT_TEST)
endif()

set(RAJA_PERFSUITE_VERSION_MAJOR 2024)
set(RAJA_PERFSUITE_VERSION_MINOR 07)
set(RAJA_PERFSUITE_VERSION_PATCHLEVEL 0)
Expand Down

0 comments on commit 66a6599

Please sign in to comment.