Skip to content

Commit

Permalink
[dev] add -D_POSIX_C_SOURCE=200809L for metis build (#7565)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rhett-Ying committed Jul 22, 2024
1 parent 91c7a25 commit 853dd06
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,12 @@ else(EXTERNAL_METIS_PATH)
target_include_directories(dgl PRIVATE "third_party/METIS/include")
# Compile METIS
if(NOT MSVC)
# When building on ubi7, it fails with the following error:
# /usr/include/signal.h:156:29: error: unknown type name 'siginfo_t'.
# So I(Rui) added the following 2 lines to fix the issue.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_POSIX_C_SOURCE=200809L")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_POSIX_C_SOURCE=200809L")

set(GKLIB_PATH "${CMAKE_CURRENT_SOURCE_DIR}/third_party/GKlib")
include(${GKLIB_PATH}/GKlibSystem.cmake)
include_directories(${GKLIB_PATH})
Expand Down

0 comments on commit 853dd06

Please sign in to comment.