X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchPlugin%2FCMakeLists.txt;h=742176a0513d23363ba40044ccdb96a9ce918d73;hb=e466624749375b6ead3e8a8ded26bf29ea9325ae;hp=e5b9bc0ca868d214cbaf3e16e0ac86e002f9c4d7;hpb=dd4eeef09743cafa61afc1b7afe7a5c6bdfe3ec7;p=modules%2Fshaper.git diff --git a/src/SketchPlugin/CMakeLists.txt b/src/SketchPlugin/CMakeLists.txt index e5b9bc0ca..742176a05 100644 --- a/src/SketchPlugin/CMakeLists.txt +++ b/src/SketchPlugin/CMakeLists.txt @@ -1,22 +1,21 @@ -## Copyright (C) 2014-2017 CEA/DEN, EDF R&D -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or (at your option) any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -## -## See http:##www.salome-platform.org/ or -## email : webmaster.salome@opencascade.com -## +# Copyright (C) 2014-2024 CEA, EDF +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# INCLUDE(Common) INCLUDE(UnitTest) @@ -24,16 +23,22 @@ INCLUDE(UnitTest) SET(PROJECT_HEADERS SketchPlugin.h SketchPlugin_Arc.h + SketchPlugin_BSpline.h + SketchPlugin_BSplineBase.h + SketchPlugin_BSplinePeriodic.h SketchPlugin_Circle.h SketchPlugin_Constraint.h SketchPlugin_ConstraintAngle.h SketchPlugin_ConstraintBase.h SketchPlugin_ConstraintCoincidence.h + SketchPlugin_ConstraintCoincidenceInternal.h SketchPlugin_ConstraintCollinear.h SketchPlugin_ConstraintDistance.h + SketchPlugin_ConstraintDistanceAlongDir.h SketchPlugin_ConstraintDistanceHorizontal.h SketchPlugin_ConstraintDistanceVertical.h SketchPlugin_ConstraintEqual.h + SketchPlugin_Fillet.h SketchPlugin_ConstraintHorizontal.h SketchPlugin_ConstraintLength.h SketchPlugin_ConstraintMiddle.h @@ -44,22 +49,29 @@ SET(PROJECT_HEADERS SketchPlugin_ConstraintRigid.h SketchPlugin_ConstraintTangent.h SketchPlugin_ConstraintVertical.h + SketchPlugin_CurveFitting.h SketchPlugin_Ellipse.h + SketchPlugin_EllipticArc.h SketchPlugin_ExternalValidator.h SketchPlugin_Feature.h - SketchPlugin_Fillet.h SketchPlugin_IntersectionPoint.h SketchPlugin_Line.h SketchPlugin_MacroArc.h SketchPlugin_MacroArcReentrantMessage.h + SketchPlugin_MacroBSpline.h SketchPlugin_MacroCircle.h SketchPlugin_MacroEllipse.h + SketchPlugin_MacroEllipticArc.h SketchPlugin_MultiRotation.h SketchPlugin_MultiTranslation.h + SketchPlugin_Offset.h + SketchPlugin_OverConstraintsResolver.h SketchPlugin_Plugin.h SketchPlugin_Point.h SketchPlugin_Projection.h SketchPlugin_Sketch.h + SketchPlugin_SketchCopy.h + SketchPlugin_SketchDrawer.h SketchPlugin_SketchEntity.h SketchPlugin_Split.h SketchPlugin_Tools.h @@ -69,16 +81,21 @@ SET(PROJECT_HEADERS SET(PROJECT_SOURCES SketchPlugin_Arc.cpp + SketchPlugin_BSpline.cpp + SketchPlugin_BSplineBase.cpp + SketchPlugin_BSplinePeriodic.cpp SketchPlugin_Circle.cpp SketchPlugin_Constraint.cpp SketchPlugin_ConstraintAngle.cpp - SketchPlugin_ConstraintBase.cpp SketchPlugin_ConstraintCoincidence.cpp + SketchPlugin_ConstraintCoincidenceInternal.cpp SketchPlugin_ConstraintCollinear.cpp SketchPlugin_ConstraintDistance.cpp + SketchPlugin_ConstraintDistanceAlongDir.cpp SketchPlugin_ConstraintDistanceHorizontal.cpp SketchPlugin_ConstraintDistanceVertical.cpp SketchPlugin_ConstraintEqual.cpp + SketchPlugin_Fillet.cpp SketchPlugin_ConstraintHorizontal.cpp SketchPlugin_ConstraintLength.cpp SketchPlugin_ConstraintMiddle.cpp @@ -89,21 +106,28 @@ SET(PROJECT_SOURCES SketchPlugin_ConstraintRigid.cpp SketchPlugin_ConstraintTangent.cpp SketchPlugin_ConstraintVertical.cpp + SketchPlugin_CurveFitting.cpp SketchPlugin_Ellipse.cpp + SketchPlugin_EllipticArc.cpp SketchPlugin_ExternalValidator.cpp SketchPlugin_Feature.cpp - SketchPlugin_Fillet.cpp SketchPlugin_IntersectionPoint.cpp SketchPlugin_Line.cpp SketchPlugin_MacroArc.cpp + SketchPlugin_MacroBSpline.cpp SketchPlugin_MacroCircle.cpp SketchPlugin_MacroEllipse.cpp + SketchPlugin_MacroEllipticArc.cpp SketchPlugin_MultiRotation.cpp SketchPlugin_MultiTranslation.cpp + SketchPlugin_Offset.cpp + SketchPlugin_OverConstraintsResolver.cpp SketchPlugin_Plugin.cpp SketchPlugin_Point.cpp SketchPlugin_Projection.cpp SketchPlugin_Sketch.cpp + SketchPlugin_SketchCopy.cpp + SketchPlugin_SketchDrawer.cpp SketchPlugin_SketchEntity.cpp SketchPlugin_Split.cpp SketchPlugin_Tools.cpp @@ -115,21 +139,28 @@ SET(PROJECT_LIBRARIES Config GeomAPI GeomAlgoAPI + GeomDataAPI + Locale ModelAPI ModelGeomAlgo + ModuleBase SketcherPrs - GeomDataAPI ) SET(XML_RESOURCES plugin-Sketch.xml + plugin-SketchCopy.xml + plugin-SketchDrawer.xml ) SET(TEXT_RESOURCES - SketchPlugin_msg_en.ts + SketchPlugin_msg_en.ts + SketchPlugin_msg_fr.ts ) +SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC}) SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES}) +SOURCE_GROUP ("XML Files" FILES ${XML_RESOURCES}) ADD_DEFINITIONS(-DSKETCHPLUGIN_EXPORTS) ADD_LIBRARY(SketchPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES} ${TEXT_RESOURCES}) @@ -138,8 +169,10 @@ TARGET_LINK_LIBRARIES(SketchPlugin ${PROJECT_LIBRARIES}) INCLUDE_DIRECTORIES( ../Config ../Events + ../Locale ../ModelAPI ../ModelGeomAlgo + ../ModuleBase ../GeomAPI ../GeomAlgoAPI ../GeomDataAPI @@ -151,82 +184,38 @@ INSTALL(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}) INSTALL(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Sketch) INSTALL(FILES ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}) -ADD_UNIT_TESTS(TestSketchPointLine.py - TestCreateArcByCenterStartEnd.py - TestCreateArcByThreePoints.py - TestCreateArcByTangentEdge.py - TestCreateArcChangeType.py - TestCreateCircleByCenterAndPassed.py - TestCreateCircleByThreePoints.py - TestCreateCircleChangeType.py - TestConstraintCoincidence.py - TestConstraintCollinear.py - TestConstraintLength.py - TestConstraintDistance.py - TestConstraintDistanceHorizontal.py - TestConstraintDistanceVertical.py - TestConstraintDistanceBehavior.py - TestConstraintParallel.py - TestConstraintPerpendicular.py - TestConstraintRadius.py - TestConstraintFixed.py - TestConstraintHorizontal.py - TestConstraintHorizontalValidator.py - TestConstraintVertical.py - TestConstraintEqual.py - TestConstraintTangent.py - TestConstraintAngle.py - TestConstraintMiddlePoint.py - TestMirror.py - TestMultiRotation.py - TestMultiTranslation.py - TestFillet.py - TestFilletInteracting.py - TestRectangle.py - TestProjection.py - TestProjectionIntoResult.py - TestSplit.py - TestHighload.py - TestSnowflake.py - TestArcBehavior.py - TestRemoveSketch.py - Test1061.py - Test1673.py - Test1924.py - Test1966.py - Test1967.py - Test2095.py - Test2115.py - TestTrimArc01.py - TestTrimArc02.py - TestTrimArc03.py - TestTrimArc04.py - TestTrimArc05.py - TestTrimArc06.py - TestTrimArc07.py - TestTrimCircle01.py - TestTrimCircle02.py - TestTrimCircle03.py - TestTrimCircle04.py - TestTrimCircle05.py - TestTrimCircleAndArc01.py - TestTrimLine01.py - TestTrimLine02.py - TestDistanceSignedVsUnsigned01.py - TestDistanceSignedVsUnsigned02.py - TestDistanceSignedVsUnsigned03.py - TestDistanceSignedVsUnsigned04.py - TestDistanceSignedVsUnsigned05.py - TestSignedDistancePointPoint.py - TestSignedDistancePointLine.py -) +include(tests.set) + +ADD_UNIT_TESTS(${TEST_NAMES}) + +include(tests.set) if(${SKETCHER_CHANGE_RADIUS_WHEN_MOVE}) - ADD_UNIT_TESTS( - TestMovePoint.py - TestMoveLine.py - TestMoveCircle.py - TestMoveArc.py - TestMovementComplex.py - ) -endif() \ No newline at end of file + include(tests_change_radius.set) + ADD_UNIT_TESTS(${TEST_NAMES_CHANGE_RADIUS}) +endif() + +ADD_RESTRICTED_TESTS( + Test20204.py +) + +if(${HAVE_SALOME}) + enable_testing() + set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/SketchPlugin") + + install(FILES CTestTestfileInstall.cmake + DESTINATION ${TEST_INSTALL_DIRECTORY} + RENAME CTestTestfile.cmake) + if(${SKETCHER_CHANGE_RADIUS_WHEN_MOVE}) + set(TEST_NAMES ${TEST_NAMES} ${TEST_NAMES_CHANGE_RADIUS}) + install(FILES tests_change_radius.set DESTINATION ${TEST_INSTALL_DIRECTORY}) + endif() + install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY}) + + set(TMP_TESTS_NAMES) + foreach(tfile ${TEST_NAMES}) + list(APPEND TMP_TESTS_NAMES "Test/${tfile}") + endforeach(tfile ${TEST_NAMES}) + + install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY}) +endif(${HAVE_SALOME})