CMakeLists.txt 4.21 KB
Newer Older
Markus Mirz's avatar
Markus Mirz committed
1
2
3
add_library(cps STATIC
	Logger.cpp
	MathUtils.cpp
4
	Attribute.cpp
Markus Mirz's avatar
Markus Mirz committed
5
6
	TopologicalNode.cpp
	TopologicalTerminal.cpp
7
8
	SimNode.cpp
	SimPowerComp.cpp
Markus Mirz's avatar
Markus Mirz committed
9
	SystemTopology.cpp
10
	CSVReader.cpp
Markus Mirz's avatar
Markus Mirz committed
11
12
)

13
list(APPEND CPS_SOURCES
Markus Mirz's avatar
Markus Mirz committed
14
	Base/Base_SynchronGenerator.cpp
15
	Base/Base_AvVoltageSourceInverterDQ.cpp
16
	Base/Base_AvVoltageSourceInverterDQWithStateSpace.cpp
Markus Mirz's avatar
Markus Mirz committed
17
18
19
20
21
22
23

	DP/DP_Ph1_Capacitor.cpp
	DP/DP_Ph1_CurrentSource.cpp
	DP/DP_Ph1_Inductor.cpp
	DP/DP_Ph1_PiLine.cpp
	DP/DP_Ph1_RxLine.cpp
	DP/DP_Ph1_RXLoad.cpp
24
	DP/DP_Ph1_RXLoadSwitch.cpp
Markus Mirz's avatar
Markus Mirz committed
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
	DP/DP_Ph1_PQLoadCS.cpp
	DP/DP_Ph1_Resistor.cpp
	DP/DP_Ph1_Transformer.cpp
	DP/DP_Ph1_VoltageSource.cpp
	DP/DP_Ph1_VoltageSourceRamp.cpp
	DP/DP_Ph1_VoltageSourceNorton.cpp
	DP/DP_Ph1_Switch.cpp
	DP/DP_Ph1_SynchronGeneratorIdeal.cpp
	DP/DP_Ph1_SynchronGeneratorTrStab.cpp
	DP/DP_Ph1_Inverter.cpp
	DP/DP_Ph1_AvVoltageSourceInverterDQ.cpp
	DP/DP_Ph1_NetworkInjection.cpp

	DP/DP_Ph3_ControlledVoltageSource.cpp
	DP/DP_Ph3_VoltageSource.cpp
	DP/DP_Ph3_Capacitor.cpp
	DP/DP_Ph3_Inductor.cpp
Markus Mirz's avatar
Markus Mirz committed
42
	DP/DP_Ph3_Resistor.cpp
Markus Mirz's avatar
Markus Mirz committed
43
44
45
46
47
48
	DP/DP_Ph3_SeriesResistor.cpp
	DP/DP_Ph3_SeriesSwitch.cpp
	DP/DP_Ph3_SynchronGeneratorDQ.cpp
	DP/DP_Ph3_SynchronGeneratorDQTrapez.cpp
	# DP/DP_Ph3_SynchronGeneratorDQSmpl.cpp
	# DP/DP_Ph3_SynchronGeneratorVBR.cpp
49
	# DP/DP_Ph3_SynchronGeneratorVBRStandalone.cpp
Markus Mirz's avatar
Markus Mirz committed
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

	EMT/EMT_Ph1_Capacitor.cpp
	EMT/EMT_Ph1_CurrentSource.cpp
	EMT/EMT_Ph1_Inductor.cpp
	EMT/EMT_Ph1_Resistor.cpp
	EMT/EMT_Ph1_VoltageSource.cpp
	EMT/EMT_Ph1_VoltageSourceRamp.cpp
	EMT/EMT_Ph1_VoltageSourceNorton.cpp

	EMT/EMT_Ph3_VoltageSource.cpp
	EMT/EMT_Ph3_Inductor.cpp
	EMT/EMT_Ph3_Capacitor.cpp
	EMT/EMT_Ph3_AvVoltageSourceInverterDQ.cpp
	EMT/EMT_Ph3_AvVoltSourceInverterStateSpace.cpp
	EMT/EMT_Ph3_Resistor.cpp
	EMT/EMT_Ph3_SeriesResistor.cpp
	EMT/EMT_Ph3_SeriesSwitch.cpp
	EMT/EMT_Ph3_VoltageSourceNorton.cpp
	EMT/EMT_Ph3_ControlledVoltageSource.cpp
	EMT/EMT_Ph3_PiLine.cpp
	EMT/EMT_Ph3_RxLine.cpp
	EMT/EMT_Ph3_RXLoad.cpp
	EMT/EMT_Ph3_NetworkInjection.cpp
	EMT/EMT_Ph3_Transformer.cpp
	EMT/EMT_Ph3_Switch.cpp
	# EMT/EMT_Ph3_SynchronGeneratorDQ.cpp
	EMT/EMT_Ph3_SynchronGeneratorDQ.cpp
	EMT/EMT_Ph3_SynchronGeneratorDQTrapez.cpp
	# EMT/EMT_Ph3_SynchronGeneratorDQSmpl.cpp
	# EMT/EMT_Ph3_SynchronGeneratorDQSmplCompSource.cpp
	# EMT/EMT_Ph3_SynchronGeneratorVBR.cpp
81
	# EMT/EMT_Ph3_SynchronGeneratorVBRStandalone.cpp
Markus Mirz's avatar
Markus Mirz committed
82
83
84
85
86
87
88
89
90
91
92
93

	SP/SP_Ph1_ControlledVoltageSource.cpp
	SP/SP_Ph1_VoltageSource.cpp
	SP/SP_Ph1_Capacitor.cpp
	SP/SP_Ph1_Inductor.cpp
	SP/SP_Ph1_Resistor.cpp
	SP/SP_Ph1_AvVoltageSourceInverterDQ.cpp
	SP/SP_Ph1_RXLine.cpp
	SP/SP_Ph1_VoltageSourceInverter.cpp
	SP/SP_Ph1_PiLine.cpp
	SP/SP_Ph1_Load.cpp
	SP/SP_Ph1_Transformer.cpp
Markus Mirz's avatar
Markus Mirz committed
94
	SP/SP_Ph1_SolidStateTransformer.cpp
Markus Mirz's avatar
Markus Mirz committed
95
96
97
98
99
100
101
102
103
104
105
106
107
108
	SP/SP_Ph1_Shunt.cpp
	SP/SP_Ph1_SynchronGenerator.cpp
	SP/SP_Ph1_PQNode.cpp
	SP/SP_Ph1_PVNode.cpp
	SP/SP_Ph1_VDNode.cpp
	SP/SP_Ph1_NetworkInjection.cpp

	SP/SP_Ph3_Capacitor.cpp
	SP/SP_Ph3_Inductor.cpp
	SP/SP_Ph3_Resistor.cpp
	SP/SP_Ph3_VoltageSource.cpp
	SP/SP_Ph3_ControlledVoltageSource.cpp

	Signal/DecouplingLine.cpp
109
	Signal/DecouplingLineEMT.cpp
Markus Mirz's avatar
Markus Mirz committed
110
111
112
	Signal/Exciter.cpp
	Signal/FIRFilter.cpp
	Signal/TurbineGovernor.cpp
113
114
	Signal/PLL.cpp
	Signal/Integrator.cpp
115
	Signal/PowerControllerVSI.cpp
Markus Mirz's avatar
Markus Mirz committed
116
117
118
)

if(WITH_CIM)
119
	list(APPEND CPS_SOURCES CIM/Reader.cpp)
Markus Mirz's avatar
Markus Mirz committed
120

121
122
	list(APPEND CPS_INCLUDE_DIRS ${CIMPP_INCLUDE_DIRS})
	list(APPEND CPS_LIBRARIES ${CIMPP_LIBRARIES})
Markus Mirz's avatar
Markus Mirz committed
123
124
125
endif()

if(WITH_PYTHON)
126
127
	list(APPEND CPS_INCLUDE_DIRS ${PYTHON_INCLUDE_DIRS})
	list(APPEND CPS_LIBRARIES ${PYTHON_LIBRARIES})
Markus Mirz's avatar
Markus Mirz committed
128
129

if(WITH_NUMPY)
130
131
	list(APPEND CPS_SOURCES AttributeNumPy.cpp)
	list(APPEND CPS_INCLUDE_DIRS ${NUMPY_INCLUDE_DIRS})
Markus Mirz's avatar
Markus Mirz committed
132
133
134
135
endif()
endif()

if(WITH_GRAPHVIZ)
136
	list(APPEND CPS_SOURCES Graph.cpp)
Markus Mirz's avatar
Markus Mirz committed
137

138
139
	list(APPEND CPS_INCLUDE_DIRS ${GRAPHVIZ_INCLUDE_DIRS})
	list(APPEND CPS_LIBRARIES ${GRAPHVIZ_LIBRARIES})
Markus Mirz's avatar
Markus Mirz committed
140
141
142
endif()

if(WITH_SUNDIALS)
143
144
145
146
	list(APPEND CPS_SOURCES DP/DP_Ph3_SynchronGeneratorDQODE.cpp)
	list(APPEND CPS_SOURCES EMT/EMT_Ph3_SynchronGeneratorDQODE.cpp)
	list(APPEND CPS_INCLUDE_DIRS ${SUNDIALS_INCLUDE_DIRS})
	list(APPEND CPS_LIBRARIES ${SUNDIALS_LIBRARIES})
Markus Mirz's avatar
Markus Mirz committed
147
148
149
endif()

if(WITH_GSL)
150
151
	list(APPEND CPS_INCLUDE_DIRS ${GSL_INCLUDE_DIRS})
	list(APPEND CPS_LIBRARIES ${GSL_LIBRARIES})
Markus Mirz's avatar
Markus Mirz committed
152
153
endif()

154
155
156
target_link_libraries(cps PUBLIC ${CPS_LIBRARIES})
target_include_directories(cps PUBLIC ${CPS_INCLUDE_DIRS})
target_sources(cps PRIVATE ${CPS_SOURCES})
157
target_compile_options(cps PUBLIC ${CPS_CXX_FLAGS})