CMakeLists.txt 986 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
cmake_minimum_required(VERSION 3.0)

project(CoMISo)
	
my_add_subdir(EigenSolver)
my_add_subdir(Config)
my_add_subdir(NSolver)
my_add_subdir(Solver)
my_add_subdir(Utils)

include_directories(${PROJECT_SOURCE_DIR}/..)
12
13
14
15
16
inc_3p_dir(Eigen)
inc_3p_dir(Gmm)
inc_3p_dir(IPOPT)
inc_3p_dir(libcurl)
inc_3p_dir(Boost)
17
18
19

# message(STATUS "${SOURCES}" "${HEADES}")
add_library(CoMISo ${SOURCES} ${HEADERS})
20
target_link_libraries(CoMISo Base)
21
22
23
24
25

# generate dllexport macros on windows
if (MSVC)
	
	#add_definitions(-DCOMISODLL) #build static for now
26
	#add_definitions(-DINCLUDE_TEMPLATES) (disabled, use explicit instantiation instead)
27
28
29
30
31
	add_definitions(-D_SCL_SECURE_NO_DEPRECATE)
	add_definitions(-D_USE_MATH_DEFINES)
	add_definitions(-DNOMINMAX)
	# add_definitions(-DIL_STD) #set CPLEX to use its STL interface, change this?!

32
	add_definitions(/W1) #add appropriate warnings flags for this project, the compilation raises to too may warnings
33
34
35
36
	add_definitions(/MP) #build on all cores 
	
endif (MSVC)