-
Notifications
You must be signed in to change notification settings - Fork 77
/
CMakeLists.txt
67 lines (54 loc) · 1.6 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
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)
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/BVH.cpp
src/BVH.h
src/Intersection.cpp
src/Intersection.h
src/main.cpp
src/Model_OBJ.cpp
src/Model_OBJ.h
src/Octree.h
)
set(
simplify_SRC
src/simplify.cpp
)
add_executable(
manifold
${manifold_SRC}
)
add_executable(
simplify
${simplify_SRC}
)