Skip to content

Commit c32e3fa

Browse files
committed
Make: Optional CUDA
1 parent df973c5 commit c32e3fa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
22

33
# Define the CUDA architectures.
44
# Empty value is forbidden.
5-
project(ParallelReductionsBenchmark LANGUAGES CXX CUDA)
5+
project(ParallelReductionsBenchmark LANGUAGES CXX)
66

77
set(CMAKE_CUDA_STANDARD 17)
88
set(CMAKE_CXX_STANDARD 17)
@@ -90,6 +90,7 @@ endif()
9090
# List of all possibkle compiler IDs:
9191
# https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER_ID.html
9292
if(CMAKE_CUDA_COMPILER_ID STREQUAL "NVIDIA" OR CMAKE_CUDA_COMPILER_ID STREQUAL "NVHPC")
93+
enable_language(CUDA)
9394
message("-- Detected Nvidia Compiler")
9495
set_property(SOURCE reduce_bench.cpp PROPERTY LANGUAGE CUDA)
9596
set_target_properties(reduce_bench PROPERTIES POSITION_INDEPENDENT_CODE ON)

0 commit comments

Comments
 (0)