Skip to content

Commit b2b3fc7

Browse files
NicolasHugfacebook-github-bot
authored andcommitted
[fbsync] switch to C++17 following the core library (#7116)
Summary: Co-authored-by: vfdev <[email protected]> Reviewed By: vmoens Differential Revision: D43116119 fbshipit-source-id: 7dc832890d5cdaf0bb94c04f1800c74abb303050
1 parent 86d0e1a commit b2b3fc7

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

CMakeLists.txt

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
cmake_minimum_required(VERSION 3.12)
1+
cmake_minimum_required(VERSION 3.18)
22
project(torchvision)
3-
set(CMAKE_CXX_STANDARD 14)
3+
set(CMAKE_CXX_STANDARD 17)
44
file(STRINGS version.txt TORCHVISION_VERSION)
55

66
option(WITH_CUDA "Enable CUDA support" OFF)
@@ -13,11 +13,6 @@ if(WITH_CUDA)
1313
add_definitions(-D__CUDA_NO_HALF_OPERATORS__)
1414
add_definitions(-DWITH_CUDA)
1515
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} --expt-relaxed-constexpr")
16-
# CUDA-11.x can not be compiled using C++14 standard on Windows
17-
string(REGEX MATCH "^[0-9]+" CUDA_MAJOR ${CMAKE_CUDA_COMPILER_VERSION})
18-
if(${CUDA_MAJOR} GREATER 10 AND MSVC)
19-
set(CMAKE_CXX_STANDARD 17)
20-
endif()
2116
endif()
2217

2318
find_package(Torch REQUIRED)

0 commit comments

Comments
 (0)