-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
51 lines (45 loc) · 1.21 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.2)
project(fizplex)
### Include Googletest ###
find_package (Threads)
set(GTEST_DIR lib/gtest/googletest)
include_directories(SYSTEM
${GTEST_DIR}
${GTEST_DIR}/include
)
add_library(gtest ${GTEST_DIR}/src/gtest-all.cc ${GTEST_DIR}/src/gtest_main.cc)
### General warnings and flags ###
add_compile_options(
-Wall -Wextra -Wfloat-equal -Wcast-qual -Wcast-align -Wconversion -Wshadow
-Wswitch-default -Wmissing-declarations -Wmissing-include-dirs -Wuninitialized
-Wwrite-strings -Wold-style-cast -Woverloaded-virtual -Wsign-promo -pedantic -std=c++17 -O2
)
add_library(core
src/svector.cc
src/dvector.cc
src/colmatrix.cc
src/base.cc
src/lp.cc
src/simplex.cc
src/mpsreader.cc
src/pricer.cc
src/ratio_tester.cc
)
add_executable(tests
src/main_test.cc
src/svector_test.cc
src/dvector_test.cc
src/colmatrix_test.cc
src/base_test.cc
src/lp_test.cc
src/simplex_test.cc
src/mpsreader_test.cc
src/pricer_test.cc
src/ratio_tester_test.cc
src/debug_test.cc
src/numeric_test.cc
src/verification_test.cc
)
target_link_libraries(tests core gtest ${CMAKE_THREAD_LIBS_INIT})
add_executable(fizplex src/main_release.cc)
target_link_libraries(fizplex core)