"...git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "7fb481f840b5d73982cafd1affe89f21a5c0b20b"
Unverified Commit 85526e34 authored by bgawrych's avatar bgawrych Committed by GitHub
Browse files

[FIX] Ubuntu 22 build fix (#5272)

* Fix ubuntu 22 build

* Add one more flag
parent 34d64754
...@@ -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")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment