Skip to content

Commit a294974

Browse files
committed
Enable serial backend for all Alpaka builds
Currently, the serial CPU backend is enabled in Alpaka only if you download Alpaka using FetchContent. When using a preinstalled version of Alpaka, the default backend is not correctly set. In this PR, I move the default backend configuration from a file which is only loaded for FetchContent usage to the main CMakeLists.txt file, allowing it to be used in all builds.
1 parent 4377873 commit a294974

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

CMakeLists.txt

+4
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,10 @@ option( TRACCC_USE_SYSTEM_ALPAKA
177177
"Pick up an existing installation of Alpaka from the build environment"
178178
${TRACCC_USE_SYSTEM_LIBS} )
179179
if( TRACCC_SETUP_ALPAKA )
180+
# Default options for the Alpaka build.
181+
set( alpaka_ACC_CPU_B_SEQ_T_THREADS_ENABLE TRUE CACHE BOOL
182+
"Enable the serial backend of Alpaka" )
183+
180184
if( TRACCC_USE_SYSTEM_ALPAKA )
181185
find_package( alpaka REQUIRED )
182186
else()

extern/alpaka/CMakeLists.txt

-4
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ set( TRACCC_ALPAKA_SOURCE
2323
mark_as_advanced( TRACCC_ALPAKA_SOURCE )
2424
FetchContent_Declare( Alpaka ${TRACCC_ALPAKA_SOURCE} )
2525

26-
# Default options for the Alpaka build.
27-
set( alpaka_ACC_CPU_B_SEQ_T_SEQ_ENABLE TRUE CACHE BOOL
28-
"Enable the serial backend of Alpaka" )
29-
3026
#Turn off build testing
3127
if( DEFINED CACHE{BUILD_TESTING} )
3228
set( _buildTestingValue ${BUILD_TESTING} )

0 commit comments

Comments
 (0)