-
Notifications
You must be signed in to change notification settings - Fork 5
/
CMakeLists.txt
51 lines (38 loc) · 1.19 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
cmake_minimum_required(VERSION 3.10)
#project name
project(make_grid)
option(CXX "enable C++ compilation" ON)
enable_language(CXX)
#specify the C++ standard
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -g")
SET(CMAKE_CXX_FLAGS_RELEASE "-O3")
SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR})
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
find_package(CGAL)
find_package(GUROBI REQUIRED)
message("BUILD_TYPE: " ${CMAKE_BUILD_TYPE})
message("GUROBI_HOME: " $ENV{GUROBI_HOME})
message("GUROBI_INCLUDE: "${GUROBI_INCLUDE_DIRS} )
message("GUROBI_LIBS: "${GUROBI_LIBRARY} " " ${GUROBI_CXX_LIBRARY})
add_executable(${PROJECT_NAME} main.cpp)
target_include_directories(${PROJECT_NAME} PUBLIC
./
code/
external/Cinolib/external/eigen/
external/Cinolib/include/
${GUROBI_INCLUDE_DIRS}
)
if(UNIX AND NOT APPLE)
target_link_libraries(${CMAKE_PROJECT_NAME}
$ENV{GUROBI_HOME}/lib/libgurobi_g++5.2.a
)
endif()
target_link_libraries(${CMAKE_PROJECT_NAME}
${GUROBI_CXX_LIBRARY}
${GUROBI_LIBRARY}
CGAL::CGAL
)
##################################################################################################