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
dgl
Commits
f0d8ca1e
Unverified
Commit
f0d8ca1e
authored
Aug 13, 2023
by
Muhammed Fatih BALIN
Committed by
GitHub
Aug 14, 2023
Browse files
[Dev] Change CXX standard to 17 (#6138)
parent
08d18a47
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
CMakeLists.txt
CMakeLists.txt
+3
-2
cmake/modules/CUDA.cmake
cmake/modules/CUDA.cmake
+2
-2
python/setup.py
python/setup.py
+1
-1
No files found.
CMakeLists.txt
View file @
f0d8ca1e
...
@@ -5,6 +5,9 @@ cmake_minimum_required(VERSION 3.5)
...
@@ -5,6 +5,9 @@ cmake_minimum_required(VERSION 3.5)
project
(
dgl C CXX
)
project
(
dgl C CXX
)
message
(
STATUS
"Start configuring project
${
PROJECT_NAME
}
"
)
message
(
STATUS
"Start configuring project
${
PROJECT_NAME
}
"
)
set
(
CMAKE_CXX_STANDARD 17
)
set
(
CMAKE_CXX_STANDARD_REQUIRED ON
)
# cmake utils
# cmake utils
include
(
cmake/util/Util.cmake
)
include
(
cmake/util/Util.cmake
)
include
(
cmake/util/MshadowUtil.cmake
)
include
(
cmake/util/MshadowUtil.cmake
)
...
@@ -246,8 +249,6 @@ else(USE_CUDA)
...
@@ -246,8 +249,6 @@ else(USE_CUDA)
add_library
(
dgl SHARED
${
DGL_SRC
}
)
add_library
(
dgl SHARED
${
DGL_SRC
}
)
endif
(
USE_CUDA
)
endif
(
USE_CUDA
)
set_property
(
TARGET dgl PROPERTY CXX_STANDARD 14
)
# include directories
# include directories
target_include_directories
(
dgl PRIVATE
"include"
)
target_include_directories
(
dgl PRIVATE
"include"
)
target_include_directories
(
dgl PRIVATE
"third_party/dlpack/include"
)
target_include_directories
(
dgl PRIVATE
"third_party/dlpack/include"
)
...
...
cmake/modules/CUDA.cmake
View file @
f0d8ca1e
...
@@ -8,7 +8,7 @@ endif()
...
@@ -8,7 +8,7 @@ endif()
###### Borrowed from MSHADOW project
###### Borrowed from MSHADOW project
include
(
CheckCXXCompilerFlag
)
include
(
CheckCXXCompilerFlag
)
check_cxx_compiler_flag
(
"-std=c++1
4
"
SUPPORT_CXX1
4
)
check_cxx_compiler_flag
(
"-std=c++1
7
"
SUPPORT_CXX1
7
)
set
(
dgl_known_gpu_archs
"35"
"50"
"60"
"70"
)
set
(
dgl_known_gpu_archs
"35"
"50"
"60"
"70"
)
set
(
dgl_cuda_arch_ptx
"70"
)
set
(
dgl_cuda_arch_ptx
"70"
)
...
@@ -248,7 +248,7 @@ macro(dgl_config_cuda out_variable)
...
@@ -248,7 +248,7 @@ macro(dgl_config_cuda out_variable)
list
(
APPEND CUDA_NVCC_FLAGS
${
NVCC_FLAGS_ARCH
}
)
list
(
APPEND CUDA_NVCC_FLAGS
${
NVCC_FLAGS_ARCH
}
)
# 2. flags in third_party/moderngpu
# 2. flags in third_party/moderngpu
list
(
APPEND CUDA_NVCC_FLAGS
"--expt-extended-lambda;-Wno-deprecated-declarations;-std=c++1
4
"
)
list
(
APPEND CUDA_NVCC_FLAGS
"--expt-extended-lambda;-Wno-deprecated-declarations;-std=c++1
7
"
)
message
(
STATUS
"CUDA_NVCC_FLAGS:
${
CUDA_NVCC_FLAGS
}
"
)
message
(
STATUS
"CUDA_NVCC_FLAGS:
${
CUDA_NVCC_FLAGS
}
"
)
...
...
python/setup.py
View file @
f0d8ca1e
...
@@ -126,7 +126,7 @@ def config_cython():
...
@@ -126,7 +126,7 @@ def config_cython():
library_dirs
=
library_dirs
,
library_dirs
=
library_dirs
,
libraries
=
libraries
,
libraries
=
libraries
,
# Crashes without this flag with GCC 5.3.1
# Crashes without this flag with GCC 5.3.1
extra_compile_args
=
[
"-std=c++1
4
"
],
extra_compile_args
=
[
"-std=c++1
7
"
],
language
=
"c++"
,
language
=
"c++"
,
)
)
)
)
...
...
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