-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
81 lines (61 loc) · 2.56 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
cmake_minimum_required(VERSION 2.8)
project(simplicial CXX)
# set(CMAKE_CXX_COMPILER_ID "Clang")
# message("${CMAKE_CXX_COMPILER_ID}")
# requirements: CHANGE LOCATIONS HERE!!!
# * Gudhi under /usr/include/gudhi
# * Eigen3 under /usr/include/eigen3
# * boost under /usr/include/boost
# * CGAL under /usr/include/CGAL
#
set(EIGEN3_INCLUDE_DIR "/usr/local/include/eigen3")
set(EIGEN3_INCLUDE_DIR "/home/crvs/eigen-3.3.2")
include_directories(${EIGEN3_INCLUDE_DIR})
set(CGAL_INCLUDE_DIR "/usr/local/include")
include_directories(${CGAL_INCLUDE_DIR})
find_package(CGAL REQUIRED COMPONTENTS Core)
include(${CGAL_USE_FILE})
#
# end_requirements
# Using CLANG instead of gcc for reasons
set(CMAKE_C_COMPILER "/usr/bin/clang-3.8")
set(CMAKE_C_FLAGS "-Wall -std=c99")
set(CMAKE_C_FLAGS_DEBUG "-g")
set(CMAKE_C_FLAGS_MINSIZEREL "-Os -DNDEBUG")
set(CMAKE_C_FLAGS_RELEASE "-O4 -DNDEBUG")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g")
set(CMAKE_CXX_COMPILER "/usr/bin/clang++-3.8")
set(CMAKE_CXX_FLAGS "-Wall -std=c++11")
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELEASE "-O4 -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
# Linker flags for
# set(CMAKE_CXX_FLAGS "-lspatialindex_c -lspatialindex ${CMAKE_CXX_FLAGS}")
set(CMAKE_AR "/usr/bin/llvm-ar")
set(CMAKE_LINKER "/usr/bin/llvm-ld")
set(CMAKE_NM "/usr/bin/llvm-nm")
set(CMAKE_OBJDUMP "/usr/bin/llvm-objdump")
set(CMAKE_RANLIB "/usr/bin/llvm-ranlib")
set(CMAKE_BUILD_TYPE Debug)
include_directories("./lib") # where the header files are
add_library(scomplex SHARED "./lib/scomplex/simplicial_complex.cpp")
add_library(pathsnap SHARED "./lib/scomplex/path_snapper.cpp")
add_executable(test0 "src/test0.cpp")
target_link_libraries(test0 scomplex)
add_executable(test1 "src/test1.cpp")
target_link_libraries(test1 scomplex pathsnap)
add_executable(test2 "src/test2.cpp")
target_link_libraries(test2 scomplex pathsnap)
add_executable(test3 "src/test3.cpp")
target_link_libraries(test3 scomplex pathsnap)
add_executable(test4 "src/test4.cpp")
target_link_libraries(test4 scomplex pathsnap)
add_executable(test5 "src/test5.cpp")
target_link_libraries(test5 scomplex pathsnap)
# set(STUPID_SOURCES "./src/main.cpp")
# add_executable(my_stupid_test ${STUPID_SOURCES})
# set(YOTHER_STUPID_SOURCES "./src/graphtest.cpp")
# add_executable(yother_stupid_test ${YOTHER_STUPID_SOURCES})
# set(OTHER_STUPID_SOURCES "./src/libtest.cpp")
# add_executable(my_other_stupid_test ${OTHER_STUPID_SOURCES})