-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
127 lines (90 loc) · 2.75 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
cmake_minimum_required(VERSION 3.6)
project(pse_traffic_sim)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_FLAGS "-Wall -Werror")
# set(CMAKE_CXX_FLAGS "-Wall")
set(CMAKE_EXE_LINKER_FLAGS -pthread)
# Set include dir
include_directories(gtest/include)
if(APPLE)
# Set Apple Silicon library dir
link_directories(gtest/lib_apple_silicon)
else()
# Set general library dir (unix)
link_directories(gtest/lib)
endif()
set(RELEASE_SOURCE_FILES
src/data/Constants.h
src/data/Constants.cc
src/lib/pugixml/pugiconfig.hpp
src/lib/pugixml/pugixml.cpp
src/lib/pugixml/pugixml.hpp
src/lib/json.hpp
src/lib/NullBuffer.h
src/lib/DesignByContract.h
src/objects/Entity.cc
src/objects/Entity.h
src/objects/Road.cc
src/objects/Road.h
src/objects/TrafficLight.cc
src/objects/TrafficLight.h
src/objects/Vehicle.cc
src/objects/Vehicle.h
src/objects/VehicleGenerator.cc
src/objects/VehicleGenerator.h
src/util/XMLParser.cc
src/util/XMLParser.h
src/Simulation.cc
src/Simulation.h
src/objects/BusStop.cc
src/objects/BusStop.h
src/objects/Crossroad.cc
src/objects/Crossroad.h
src/TrafficSim.cc
)
set(DEBUG_SOURCE_FILES
src/data/Constants.h
src/data/Constants.cc
src/lib/pugixml/pugiconfig.hpp
src/lib/pugixml/pugixml.cpp
src/lib/pugixml/pugixml.hpp
src/lib/json.hpp
src/lib/NullBuffer.h
src/lib/TestingHelpers.h
src/lib/TestingHelpers.cc
src/lib/DesignByContract.h
src/objects/Entity.cc
src/objects/Entity.h
src/objects/EntityTests.cc
src/objects/Road.cc
src/objects/Road.h
src/objects/RoadTests.cc
src/objects/TrafficLight.cc
src/objects/TrafficLight.h
src/objects/TrafficLightTests.cc
src/objects/Vehicle.cc
src/objects/Vehicle.h
src/objects/VehicleTests.cc
src/objects/VehicleGenerator.cc
src/objects/VehicleGenerator.h
src/objects/VehicleGeneratorTests.cc
src/util/XMLParser.cc
src/util/XMLParser.h
src/util/XMLParserTests.cc
src/Simulation.cc
src/Simulation.h
src/SimulationTests.cc
src/objects/BusStop.cc
src/objects/BusStop.h
src/objects/BusStopTests.cc
src/objects/Crossroad.cc
src/objects/Crossroad.h
src/objects/CrossroadTests.cc
src/TrafficSimTests.cc
)
# Create RELEASE target
add_executable(TrafficSim ${RELEASE_SOURCE_FILES})
# Create DEBUG target
add_executable(TrafficSimTests ${DEBUG_SOURCE_FILES})
# Link library
target_link_libraries(TrafficSimTests gtest)