Skip to content

Commit 88ea98f

Browse files
committed
build issue
1 parent 1d7dc1d commit 88ea98f

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

CMakeLists.txt

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,6 @@ set(LBC_INC "${CMAKE_CURRENT_SOURCE_DIR}/include")
4242
set(LBC_SRC "${CMAKE_CURRENT_SOURCE_DIR}/src")
4343
AUX_SOURCE_DIRECTORY(${LBC_SRC} LBC_SRC_FILES)
4444

45-
46-
include(metis)
47-
if(METIS_FOUND)
48-
add_definitions(-DMETIS)
49-
set(METIS_SOURCE_FILES "${SPARSE_UTIL_SRC}/metis_interface.cpp")
50-
endif()
51-
5245
find_package(OpenMP)
5346
if(OpenMP_FOUND)
5447
if(APPLE) #TODO: there might be a better support
@@ -57,10 +50,20 @@ if(OpenMP_FOUND)
5750
include_directories(
5851
${OpenMP_CXX_INCLUDE_DIRS}
5952
)
53+
link_libraries(
54+
OpenMP::OpenMP_CXX
55+
)
6056
add_definitions(-DENABLE_OPENMP)
6157
add_definitions(-D__OPENMP__)
6258
endif()
6359

60+
include(metis)
61+
if(METIS_FOUND)
62+
add_definitions(-DMETIS)
63+
set(METIS_SOURCE_FILES "${SPARSE_UTIL_SRC}/metis_interface.cpp")
64+
endif()
65+
66+
6467
file(GLOB_RECURSE EXT_SRC ${CMAKE_CURRENT_SOURCE_DIR}/utils/external/*.cpp
6568
${CMAKE_CURRENT_SOURCE_DIR}/utils/external/*.c)
6669
add_library(sym_amd STATIC

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ It can be used within code generators or libraries. For more information see
1414
### Prerequisites
1515
* CMake
1616
* C++ compiler (GCC, ICC, or CLang)
17-
* METIS (optional) dependency for running the demo efficiently
18-
and is handled by the cmake.
17+
* METIS and OpenMP (optional) dependency for running the demo efficiently
18+
and are handled by the cmake.
1919

2020
### Linux
2121
Then install LBC by following commands:

0 commit comments

Comments
 (0)