Salome HOME
Unit test for adding pole to B-spline curve
[modules/shaper.git] / src / SketchPlugin / CMakeLists.txt
1 # Copyright (C) 2014-2019  CEA/DEN, EDF R&D
2 #
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License, or (at your option) any later version.
7 #
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 # Lesser General Public License for more details.
12 #
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 #
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 #
19
20 INCLUDE(Common)
21 INCLUDE(UnitTest)
22
23 SET(PROJECT_HEADERS
24     SketchPlugin.h
25     SketchPlugin_Arc.h
26     SketchPlugin_BSpline.h
27     SketchPlugin_BSplineBase.h
28     SketchPlugin_BSplinePeriodic.h
29     SketchPlugin_Circle.h
30     SketchPlugin_Constraint.h
31     SketchPlugin_ConstraintAngle.h
32     SketchPlugin_ConstraintBase.h
33     SketchPlugin_ConstraintCoincidence.h
34     SketchPlugin_ConstraintCoincidenceInternal.h
35     SketchPlugin_ConstraintCollinear.h
36     SketchPlugin_ConstraintDistance.h
37     SketchPlugin_ConstraintDistanceAlongDir.h
38     SketchPlugin_ConstraintDistanceHorizontal.h
39     SketchPlugin_ConstraintDistanceVertical.h
40     SketchPlugin_ConstraintEqual.h
41     SketchPlugin_Fillet.h
42     SketchPlugin_ConstraintHorizontal.h
43     SketchPlugin_ConstraintLength.h
44     SketchPlugin_ConstraintMiddle.h
45     SketchPlugin_ConstraintMirror.h
46     SketchPlugin_ConstraintParallel.h
47     SketchPlugin_ConstraintPerpendicular.h
48     SketchPlugin_ConstraintRadius.h
49     SketchPlugin_ConstraintRigid.h
50     SketchPlugin_ConstraintTangent.h
51     SketchPlugin_ConstraintVertical.h
52     SketchPlugin_Ellipse.h
53     SketchPlugin_EllipticArc.h
54     SketchPlugin_ExternalValidator.h
55     SketchPlugin_Feature.h
56     SketchPlugin_IntersectionPoint.h
57     SketchPlugin_Line.h
58     SketchPlugin_MacroArc.h
59     SketchPlugin_MacroArcReentrantMessage.h
60     SketchPlugin_MacroBSpline.h
61     SketchPlugin_MacroCircle.h
62     SketchPlugin_MacroEllipse.h
63     SketchPlugin_MacroEllipticArc.h
64     SketchPlugin_MultiRotation.h
65     SketchPlugin_MultiTranslation.h
66     SketchPlugin_Plugin.h
67     SketchPlugin_Point.h
68     SketchPlugin_Projection.h
69     SketchPlugin_Sketch.h
70     SketchPlugin_SketchDrawer.h
71     SketchPlugin_SketchEntity.h
72     SketchPlugin_Split.h
73     SketchPlugin_Tools.h
74     SketchPlugin_Trim.h
75     SketchPlugin_Validators.h
76 )
77
78 SET(PROJECT_SOURCES
79     SketchPlugin_Arc.cpp
80     SketchPlugin_BSpline.cpp
81     SketchPlugin_BSplineBase.cpp
82     SketchPlugin_BSplinePeriodic.cpp
83     SketchPlugin_Circle.cpp
84     SketchPlugin_Constraint.cpp
85     SketchPlugin_ConstraintAngle.cpp
86     SketchPlugin_ConstraintCoincidence.cpp
87     SketchPlugin_ConstraintCoincidenceInternal.cpp
88     SketchPlugin_ConstraintCollinear.cpp
89     SketchPlugin_ConstraintDistance.cpp
90     SketchPlugin_ConstraintDistanceAlongDir.cpp
91     SketchPlugin_ConstraintDistanceHorizontal.cpp
92     SketchPlugin_ConstraintDistanceVertical.cpp
93     SketchPlugin_ConstraintEqual.cpp
94     SketchPlugin_Fillet.cpp
95     SketchPlugin_ConstraintHorizontal.cpp
96     SketchPlugin_ConstraintLength.cpp
97     SketchPlugin_ConstraintMiddle.cpp
98     SketchPlugin_ConstraintMirror.cpp
99     SketchPlugin_ConstraintParallel.cpp
100     SketchPlugin_ConstraintPerpendicular.cpp
101     SketchPlugin_ConstraintRadius.cpp
102     SketchPlugin_ConstraintRigid.cpp
103     SketchPlugin_ConstraintTangent.cpp
104     SketchPlugin_ConstraintVertical.cpp
105     SketchPlugin_Ellipse.cpp
106     SketchPlugin_EllipticArc.cpp
107     SketchPlugin_ExternalValidator.cpp
108     SketchPlugin_Feature.cpp
109     SketchPlugin_IntersectionPoint.cpp
110     SketchPlugin_Line.cpp
111     SketchPlugin_MacroArc.cpp
112     SketchPlugin_MacroBSpline.cpp
113     SketchPlugin_MacroCircle.cpp
114     SketchPlugin_MacroEllipse.cpp
115     SketchPlugin_MacroEllipticArc.cpp
116     SketchPlugin_MultiRotation.cpp
117     SketchPlugin_MultiTranslation.cpp
118     SketchPlugin_Plugin.cpp
119     SketchPlugin_Point.cpp
120     SketchPlugin_Projection.cpp
121     SketchPlugin_Sketch.cpp
122     SketchPlugin_SketchDrawer.cpp
123     SketchPlugin_SketchEntity.cpp
124     SketchPlugin_Split.cpp
125     SketchPlugin_Tools.cpp
126     SketchPlugin_Trim.cpp
127     SketchPlugin_Validators.cpp
128 )
129
130 SET(PROJECT_LIBRARIES
131     Config
132     GeomAPI
133     GeomAlgoAPI
134     ModelAPI
135     ModelGeomAlgo
136     ModuleBase
137     SketcherPrs
138     GeomDataAPI
139 )
140
141 SET(XML_RESOURCES
142   plugin-Sketch.xml
143   plugin-SketchDrawer.xml
144 )
145
146 SET(TEXT_RESOURCES
147     SketchPlugin_msg_en.ts
148     SketchPlugin_msg_fr.ts
149 )
150
151 # sources / moc wrappings
152 QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_MOC_HEADERS})
153
154 SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC})
155 SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES})
156
157 ADD_DEFINITIONS(-DSKETCHPLUGIN_EXPORTS)
158 ADD_LIBRARY(SketchPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES} ${TEXT_RESOURCES} ${PROJECT_AUTOMOC})
159 TARGET_LINK_LIBRARIES(SketchPlugin ${PROJECT_LIBRARIES})
160
161 INCLUDE_DIRECTORIES(
162   ../Config
163   ../Events
164   ../ModelAPI
165   ../ModelGeomAlgo
166   ../ModuleBase
167   ../GeomAPI
168   ../GeomAlgoAPI
169   ../GeomDataAPI
170   ../SketcherPrs
171   ${OpenCASCADE_INCLUDE_DIR}
172 )
173
174 INSTALL(TARGETS SketchPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
175 INSTALL(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
176 INSTALL(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Sketch)
177 INSTALL(FILES ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
178
179 ADD_UNIT_TESTS(
180   Test1061.py
181   Test1577.py
182   Test1578.py
183   Test1673.py
184   Test1779.py
185   Test1924.py
186   Test1963.py
187   Test1966.py
188   Test1967.py
189   Test2034_1.py
190   Test2034_2.py
191   Test2034_3.py
192   Test2062.py
193   Test2095.py
194   Test2115.py
195   Test2119.py
196   Test2134.py
197   Test2157.py
198   Test2157_2.py
199   Test2224.py
200   Test2229.py
201   Test2239.py
202   Test2273.py
203   Test2280.py
204   Test2287.py
205   Test2341.py
206   Test2376.py
207   Test2390.py
208   Test2393.py
209   Test2425.py
210   Test2427.py
211   Test2440.py
212   Test2481.py
213   Test2654.py
214   Test2711.py
215   Test2741.py
216   Test2810.py
217   Test2824.py
218   Test2860.py
219   Test2894.py
220   Test3019.py
221   Test3087_1.py
222   Test3087_2.py
223   TestArcBehavior.py
224   TestBSplineAddPole.py
225   TestChangeSketchPlane1.py
226   TestChangeSketchPlane2.py
227   TestChangeSketchPlane3.py
228   TestChangeSketchPlane4.py
229   TestConstraintAngle.py
230   TestConstraintAngle_v0_1.py
231   TestConstraintAngle_v0_2.py
232   TestConstraintAngle_v20191210_1.py
233   TestConstraintAngle_v20191210_2.py
234   TestConstraintAngleBehaviorDirect.py
235   TestConstraintAngleBehaviorSupplementary_1.py
236   TestConstraintAngleBehaviorSupplementary_2.py
237   TestConstraintAngleBehaviorBackward_1.py
238   TestConstraintAngleBehaviorBackward_2.py
239   TestConstraintAngleEllipse.py
240   TestConstraintCoincidence.py
241   TestConstraintCoincidenceBSpline.py
242   TestConstraintCoincidenceEllipse.py
243   TestConstraintCoincidenceEllipticArc.py
244   TestConstraintCollinear.py
245   TestConstraintCollinearEllipse.py
246   TestConstraintDistance.py
247   TestConstraintDistanceEllipse.py
248   TestConstraintDistanceBehavior.py
249   TestConstraintDistanceHorizontal.py
250   TestConstraintDistanceVertical.py
251   TestConstraintDistanceZero.py
252   TestConstraintDistanceHorizontalZero.py
253   TestConstraintDistanceVerticalZero.py
254   TestConstraintEqual.py
255   TestConstraintEqualEllipse.py
256   TestConstraintFixed.py
257   TestConstraintHorizontal.py
258   TestConstraintHorizontalValidator.py
259   TestConstraintLength.py
260   TestConstraintMiddlePoint.py
261   TestConstraintMiddlePointOnArc.py
262   TestConstraintMiddlePointOnEllipticArc.py
263   TestConstraintParallel.py
264   TestConstraintPerpendicular.py
265   TestConstraintPerpendicularArcLine.py
266   TestConstraintPerpendicularEllipseLine.py
267   TestConstraintRadius.py
268   TestConstraintRadiusFailure.py
269   TestConstraintTangent.py
270   TestConstraintTangentBSpline.py
271   TestConstraintTangentEllipse.py
272   TestConstraintTangentEllipticArc.py
273   TestConstraintVertical.py
274   TestCreateArcByCenterStartEnd.py
275   TestCreateArcByTangentEdge.py
276   TestCreateArcByThreePoints.py
277   TestCreateArcByTransversalLine.py
278   TestCreateArcChangeType.py
279   TestCreateBSpline.py
280   TestCreateBSplinePeriodic.py
281   TestCreateCircleByCenterAndPassed.py
282   TestCreateCircleByThreePoints.py
283   TestCreateCircleChangeType.py
284   TestCreateEllipseByCenterSemiaxisAndPassed.py
285   TestCreateEllipseByMajorAxisAndPassed.py
286   TestCreateEllipseByExternal.py
287   TestCreateEllipticArc.py
288   TestCreateEllipticArcByExternal.py
289   TestCreateMacroBSpline.py
290   TestDegeneratedGeometry.py
291   TestDistanceDump.py
292   TestDistanceSignedVsUnsigned01.py
293   TestDistanceSignedVsUnsigned02.py
294   TestDistanceSignedVsUnsigned03.py
295   TestDistanceSignedVsUnsigned04.py
296   TestDistanceSignedVsUnsigned05.py
297   TestEdgesOrder.py
298   TestFillet.py
299   TestFilletAfterFolder.py
300   TestFilletInteracting.py
301   TestHighload.py
302   TestIntersectionChangeEdge.py
303   TestIntersectionWithCircle.py
304   TestIntersectionWithLine.py
305   TestIntersectionWithSpline.py
306   TestMirror.py
307   TestMultiRotation.py
308   TestMultiRotation01.py
309   TestMultiRotation02.py
310   TestMultiRotation03.py
311   TestMultiRotation04.py
312   TestMultiRotation05.py
313   TestMultiRotationWithParameter.py
314   TestMultiTranslation.py
315   TestPresentation.py
316   TestProjection.py
317   TestProjectionBSpline.py
318   TestProjectionBSplinePeriodic.py
319   TestProjectionEllipse.py
320   TestProjectionEllipticArc.py
321   TestProjectionIntoResult.py
322   TestProjectionUpdate.py
323   TestRectangle.py
324   TestRemainingDoF.py
325   TestRemoveBSpline.py
326   TestRemoveBSplinePeriodic.py
327   TestRemoveEllipse.py
328   TestRemoveEllipticArc.py
329   TestRemoveSketch.py
330   TestSignedDistancePointLine.py
331   TestSignedDistancePointPoint.py
332   TestSketchDrawer.py
333   TestSketchPointLine.py
334   TestSnowflake.py
335   TestSplit.py
336   TestSplitEllipse.py
337   TestSplitLine.py
338   TestSplitPreview.py
339   TestTrimArc01.py
340   TestTrimArc02.py
341   TestTrimArc03.py
342   TestTrimArc04.py
343   TestTrimArc05.py
344   TestTrimArc06.py
345   TestTrimArc07.py
346   TestTrimArc08.py
347   TestTrimCircle01.py
348   TestTrimCircle02.py
349   TestTrimCircle03.py
350   TestTrimCircle04.py
351   TestTrimCircle05.py
352   TestTrimCircleAndArc01.py
353   TestTrimEllipse.py
354   TestTrimLine01.py
355   TestTrimLine02.py
356   TestTrimLine03.py
357   TestTrimPreview.py
358   TestUpdateSketch.py
359 )
360
361 if(${SKETCHER_CHANGE_RADIUS_WHEN_MOVE})
362   ADD_UNIT_TESTS(
363     TestMoveArc.py
364     TestMoveBSpline.py
365     TestMoveBSplinePeriodic.py
366     TestMoveCircle.py
367     TestMoveEllipse.py
368     TestMoveEllipticArc.py
369     TestMoveLine.py
370     TestMovementComplex.py
371     TestMovePoint.py
372   )
373 endif()