Skip to content

Commit

Permalink
Set C++17 only with CUDA>10
Browse files Browse the repository at this point in the history
  • Loading branch information
RaulPPelaez committed Aug 8, 2023
1 parent acc626e commit 0e16c49
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ target_include_directories(${LIBRARY} PRIVATE ${Python3_INCLUDE_DIRS}
src/ani src/pytorch src/schnet)
target_link_libraries(${LIBRARY} ${TORCH_LIBRARIES} ${Python3_LIBRARIES})
if(ENABLE_CUDA)
if(CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 11)
set_property(TARGET ${LIBRARY} PROPERTY CUDA_STANDARD 14)
else()
set_property(TARGET ${LIBRARY} PROPERTY CUDA_STANDARD 17)
endif()
target_compile_definitions(${LIBRARY} PRIVATE ENABLE_CUDA)
endif(ENABLE_CUDA)

Expand Down

0 comments on commit 0e16c49

Please sign in to comment.