Skip to content

Commit

Permalink
pytorch 2.x requires cxx 17 to compile
Browse files Browse the repository at this point in the history
  • Loading branch information
chaojie-wang-plus committed May 18, 2024
1 parent 521d26f commit a970a46
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.0)
project(torchscatter)
set(CMAKE_CXX_STANDARD 14)
cmake_minimum_required(VERSION 3.18)
project(torchscatter LANGUAGES CXX CUDA)
set(CMAKE_CXX_STANDARD 17)
set(TORCHSCATTER_VERSION 2.1.2)

option(WITH_CUDA "Enable CUDA support" OFF)
Expand All @@ -11,6 +11,8 @@ if(WITH_CUDA)
add_definitions(-D__CUDA_NO_HALF_OPERATORS__)
add_definitions(-DWITH_CUDA)
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} --expt-relaxed-constexpr")
set(CMAKE_CUDA_STANDARD 17)
set(CMAKE_CUDA_STANDARD_REQUIRED ON)
endif()

if (WITH_PYTHON)
Expand Down

0 comments on commit a970a46

Please sign in to comment.