Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
942796ce
Unverified
Commit
942796ce
authored
Jan 30, 2023
by
cyy
Committed by
GitHub
Jan 30, 2023
Browse files
switch to C++17 following the core library (#7116)
Co-authored-by:
vfdev
<
vfdev.5@gmail.com
>
parent
6a85ef24
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
7 deletions
+2
-7
CMakeLists.txt
CMakeLists.txt
+2
-7
No files found.
CMakeLists.txt
View file @
942796ce
cmake_minimum_required
(
VERSION 3.1
2
)
cmake_minimum_required
(
VERSION 3.1
8
)
project
(
torchvision
)
project
(
torchvision
)
set
(
CMAKE_CXX_STANDARD 1
4
)
set
(
CMAKE_CXX_STANDARD 1
7
)
file
(
STRINGS version.txt TORCHVISION_VERSION
)
file
(
STRINGS version.txt TORCHVISION_VERSION
)
option
(
WITH_CUDA
"Enable CUDA support"
OFF
)
option
(
WITH_CUDA
"Enable CUDA support"
OFF
)
...
@@ -13,11 +13,6 @@ if(WITH_CUDA)
...
@@ -13,11 +13,6 @@ if(WITH_CUDA)
add_definitions
(
-D__CUDA_NO_HALF_OPERATORS__
)
add_definitions
(
-D__CUDA_NO_HALF_OPERATORS__
)
add_definitions
(
-DWITH_CUDA
)
add_definitions
(
-DWITH_CUDA
)
set
(
CMAKE_CUDA_FLAGS
"
${
CMAKE_CUDA_FLAGS
}
--expt-relaxed-constexpr"
)
set
(
CMAKE_CUDA_FLAGS
"
${
CMAKE_CUDA_FLAGS
}
--expt-relaxed-constexpr"
)
# CUDA-11.x can not be compiled using C++14 standard on Windows
string
(
REGEX MATCH
"^[0-9]+"
CUDA_MAJOR
${
CMAKE_CUDA_COMPILER_VERSION
}
)
if
(
${
CUDA_MAJOR
}
GREATER 10 AND MSVC
)
set
(
CMAKE_CXX_STANDARD 17
)
endif
()
endif
()
endif
()
find_package
(
Torch REQUIRED
)
find_package
(
Torch REQUIRED
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment