Skip to content

Commit a970a46

Browse files
pytorch 2.x requires cxx 17 to compile
1 parent 521d26f commit a970a46

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

CMakeLists.txt

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
cmake_minimum_required(VERSION 3.0)
2-
project(torchscatter)
3-
set(CMAKE_CXX_STANDARD 14)
1+
cmake_minimum_required(VERSION 3.18)
2+
project(torchscatter LANGUAGES CXX CUDA)
3+
set(CMAKE_CXX_STANDARD 17)
44
set(TORCHSCATTER_VERSION 2.1.2)
55

66
option(WITH_CUDA "Enable CUDA support" OFF)
@@ -11,6 +11,8 @@ if(WITH_CUDA)
1111
add_definitions(-D__CUDA_NO_HALF_OPERATORS__)
1212
add_definitions(-DWITH_CUDA)
1313
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} --expt-relaxed-constexpr")
14+
set(CMAKE_CUDA_STANDARD 17)
15+
set(CMAKE_CUDA_STANDARD_REQUIRED ON)
1416
endif()
1517

1618
if (WITH_PYTHON)

0 commit comments

Comments
 (0)