-
Notifications
You must be signed in to change notification settings - Fork 58
/
CMakeLists.txt
68 lines (57 loc) · 1.72 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
cmake_minimum_required(VERSION 3.1)
project(Manifold)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pthread")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
set(CMAKE_CXX_FLAGS_RELEASE "-O3") # enable assert
set(CMAKE_LINKER_FLAGS "${CMAKE_LINKER_FLAGS}")
set(CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG}")
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-int-in-bool-context -Wsign-compare")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=address")
set(CMAKE_LINKER_FLAGS "${CMAKE_LINKER_FLAGS}")
set(CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fsanitize=address")
endif()
option(BUILD_PERFORMANCE_TEST "More subdivisition for performance test" OFF)
option(BUILD_OPENMP "Enable support for OpenMP" OFF)
option(BUILD_LOG "Enable verbose log" OFF)
include_directories(src)
include_directories(3rd_party/eigen/)
include_directories(3rd_party/libigl/include)
if(BUILD_PERFORMANCE_TEST)
add_definitions(-DPERFORMANCE_TEST)
endif(BUILD_PERFORMANCE_TEST)
if(BUILD_OPENMP)
add_definitions(-DWITH_OMP)
endif(BUILD_OPENMP)
if(BUILD_LOG)
add_definitions(-DLOG_OUTPUT)
endif(BUILD_LOG)
set(
manifold_SRC
src/GridIndex.h
src/Intersection.h
src/Intersection.cc
src/IO.h
src/IO.cc
src/main.cc
src/Manifold.h
src/Manifold.cc
src/MeshProjector.cc
src/MeshProjector.h
src/Octree.h
src/Octree.cc
src/Parser.h
src/Parser.cc
src/types.h
)
add_executable(
manifold
${manifold_SRC}
)
target_link_libraries(
manifold
)