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
85526e34
Unverified
Commit
85526e34
authored
Mar 03, 2023
by
bgawrych
Committed by
GitHub
Mar 03, 2023
Browse files
[FIX] Ubuntu 22 build fix (#5272)
* Fix ubuntu 22 build * Add one more flag
parent
34d64754
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
CMakeLists.txt
CMakeLists.txt
+11
-2
No files found.
CMakeLists.txt
View file @
85526e34
...
@@ -229,11 +229,11 @@ endif(NOT MSVC)
...
@@ -229,11 +229,11 @@ endif(NOT MSVC)
# Compile LIBXSMM
# Compile LIBXSMM
if
((
NOT MSVC
)
AND USE_LIBXSMM
)
if
((
NOT MSVC
)
AND USE_LIBXSMM
)
if
(
REBUILD_LIBXSMM
)
if
(
REBUILD_LIBXSMM
)
add_custom_target
(
libxsmm COMMAND make realclean COMMAND make -j BLAS=0
add_custom_target
(
libxsmm COMMAND make realclean COMMAND make -j
ECFLAGS=
"-Wno-error=deprecated-declarations"
BLAS=0
WORKING_DIRECTORY
${
CMAKE_SOURCE_DIR
}
/third_party/libxsmm
WORKING_DIRECTORY
${
CMAKE_SOURCE_DIR
}
/third_party/libxsmm
)
)
else
(
REBUILD_LIBXSMM
)
else
(
REBUILD_LIBXSMM
)
add_custom_target
(
libxsmm COMMAND make -j BLAS=0
add_custom_target
(
libxsmm COMMAND make -j
ECFLAGS=
"-Wno-error=deprecated-declarations"
BLAS=0
WORKING_DIRECTORY
${
CMAKE_SOURCE_DIR
}
/third_party/libxsmm
WORKING_DIRECTORY
${
CMAKE_SOURCE_DIR
}
/third_party/libxsmm
)
)
endif
(
REBUILD_LIBXSMM
)
endif
(
REBUILD_LIBXSMM
)
...
@@ -247,12 +247,21 @@ if(NOT MSVC)
...
@@ -247,12 +247,21 @@ if(NOT MSVC)
# Disable -Wall for third-party tensorpipe due to too many warnings
# Disable -Wall for third-party tensorpipe due to too many warnings
string
(
REPLACE
"-Wall"
""
CMAKE_C_FLAGS
${
CMAKE_C_FLAGS
}
)
string
(
REPLACE
"-Wall"
""
CMAKE_C_FLAGS
${
CMAKE_C_FLAGS
}
)
string
(
REPLACE
"-Wall"
""
CMAKE_CXX_FLAGS
${
CMAKE_CXX_FLAGS
}
)
string
(
REPLACE
"-Wall"
""
CMAKE_CXX_FLAGS
${
CMAKE_CXX_FLAGS
}
)
set
(
WNOERROR_FLAGS
"-Wno-error=sign-compare"
)
if
(
CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 12.0
)
set
(
WNOERROR_FLAGS
"
${
WNOERROR_FLAGS
}
-Wno-error=dangling-pointer"
)
endif
()
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
${
WNOERROR_FLAGS
}
"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
${
WNOERROR_FLAGS
}
"
)
set
(
TP_STATIC_OR_SHARED STATIC
)
set
(
TP_STATIC_OR_SHARED STATIC
)
add_subdirectory
(
third_party/tensorpipe
)
add_subdirectory
(
third_party/tensorpipe
)
list
(
APPEND DGL_LINKER_LIBS tensorpipe
)
list
(
APPEND DGL_LINKER_LIBS tensorpipe
)
target_include_directories
(
dgl PRIVATE third_party/tensorpipe
)
target_include_directories
(
dgl PRIVATE third_party/tensorpipe
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-Wall"
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-Wall"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wall"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wall"
)
string
(
REPLACE
"
${
WNOERROR_FLAGS
}
"
""
CMAKE_C_FLAGS
${
CMAKE_C_FLAGS
}
)
string
(
REPLACE
"
${
WNOERROR_FLAGS
}
"
""
CMAKE_CXX_FLAGS
${
CMAKE_CXX_FLAGS
}
)
# Avoid exposing third-party symbols when using DGL as a library.
# Avoid exposing third-party symbols when using DGL as a library.
if
(
NOT
${
CMAKE_SYSTEM_NAME
}
MATCHES
"Darwin"
)
if
(
NOT
${
CMAKE_SYSTEM_NAME
}
MATCHES
"Darwin"
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-Wl,--exclude-libs,ALL"
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-Wl,--exclude-libs,ALL"
)
...
...
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