-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
41 lines (32 loc) · 1.04 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
cmake_minimum_required (VERSION 3.0 FATAL_ERROR)
project(uunet LANGUAGES C CXX)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
# Choosing compiler (clang has preference).
if (CMAKE_CXX_COMPILER MATCHES ".*clang.*" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set (CMAKE_COMPILER_IS_CLANGXX 1)
endif()
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O2 -fno-inline -std=c++14")
if (APPLE)
set(CMAKE_INSTALL_RPATH @loader_path)
else()
set(CMAKE_INSTALL_RPATH "$ORIGIN")
endif()
add_subdirectory(ext/pybind11)
add_subdirectory(ext/uunet)
file (GLOB_RECURSE SOURCES C++/*cpp)
pybind11_add_module(_multinet MODULE ${SOURCES})
target_link_libraries(_multinet PRIVATE uunet)
target_include_directories (_multinet PRIVATE
ext/uunet/ext/eigen3
ext/uunet/ext/spectra
ext/uunet/ext/eclat/eclat/src
ext/uunet/ext/eclat/tract/src
ext/uunet/ext/eclat/math/src
ext/uunet/ext/eclat/util/src
ext/uunet/ext/eclat/apriori/src
ext/uunet/ext/infomap
ext/uunet/src
ext/uunet/libs)
add_definitions(-DNS_INFOMAP -DONLY_C_LOCALE=1)