X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchPlugin%2FCMakeLists.txt;h=742176a0513d23363ba40044ccdb96a9ce918d73;hb=e466624749375b6ead3e8a8ded26bf29ea9325ae;hp=9855c5f4ca4e87ed3e1d0df3666e5a34bf2d2e28;hpb=b72c6161a24798e2e523f323188fab669cb57f8f;p=modules%2Fshaper.git diff --git a/src/SketchPlugin/CMakeLists.txt b/src/SketchPlugin/CMakeLists.txt index 9855c5f4c..742176a05 100644 --- a/src/SketchPlugin/CMakeLists.txt +++ b/src/SketchPlugin/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2014-2019 CEA/DEN, EDF R&D +# 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 @@ -24,6 +24,7 @@ SET(PROJECT_HEADERS SketchPlugin.h SketchPlugin_Arc.h SketchPlugin_BSpline.h + SketchPlugin_BSplineBase.h SketchPlugin_BSplinePeriodic.h SketchPlugin_Circle.h SketchPlugin_Constraint.h @@ -48,6 +49,7 @@ SET(PROJECT_HEADERS SketchPlugin_ConstraintRigid.h SketchPlugin_ConstraintTangent.h SketchPlugin_ConstraintVertical.h + SketchPlugin_CurveFitting.h SketchPlugin_Ellipse.h SketchPlugin_EllipticArc.h SketchPlugin_ExternalValidator.h @@ -62,10 +64,13 @@ SET(PROJECT_HEADERS 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 @@ -77,6 +82,7 @@ SET(PROJECT_HEADERS SET(PROJECT_SOURCES SketchPlugin_Arc.cpp SketchPlugin_BSpline.cpp + SketchPlugin_BSplineBase.cpp SketchPlugin_BSplinePeriodic.cpp SketchPlugin_Circle.cpp SketchPlugin_Constraint.cpp @@ -100,6 +106,7 @@ SET(PROJECT_SOURCES SketchPlugin_ConstraintRigid.cpp SketchPlugin_ConstraintTangent.cpp SketchPlugin_ConstraintVertical.cpp + SketchPlugin_CurveFitting.cpp SketchPlugin_Ellipse.cpp SketchPlugin_EllipticArc.cpp SketchPlugin_ExternalValidator.cpp @@ -113,10 +120,13 @@ SET(PROJECT_SOURCES 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 @@ -129,15 +139,17 @@ 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 ) @@ -146,19 +158,18 @@ SET(TEXT_RESOURCES SketchPlugin_msg_fr.ts ) -# sources / moc wrappings -QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_MOC_HEADERS}) - 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} ${PROJECT_AUTOMOC}) +ADD_LIBRARY(SketchPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES} ${TEXT_RESOURCES}) TARGET_LINK_LIBRARIES(SketchPlugin ${PROJECT_LIBRARIES}) INCLUDE_DIRECTORIES( ../Config ../Events + ../Locale ../ModelAPI ../ModelGeomAlgo ../ModuleBase @@ -166,7 +177,6 @@ INCLUDE_DIRECTORIES( ../GeomAlgoAPI ../GeomDataAPI ../SketcherPrs - ${OpenCASCADE_INCLUDE_DIR} ) INSTALL(TARGETS SketchPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES}) @@ -174,191 +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( - Test1061.py - Test1577.py - Test1578.py - Test1673.py - Test1779.py - Test1924.py - Test1963.py - Test1966.py - Test1967.py - Test2034_1.py - Test2034_2.py - Test2034_3.py - Test2062.py - Test2095.py - Test2115.py - Test2119.py - Test2134.py - Test2157.py - Test2157_2.py - Test2224.py - Test2229.py - Test2239.py - Test2273.py - Test2280.py - Test2287.py - Test2341.py - Test2376.py - Test2390.py - Test2393.py - Test2425.py - Test2427.py - Test2440.py - Test2481.py - Test2654.py - Test2711.py - Test2741.py - Test2810.py - Test2824.py - Test2860.py - Test2894.py - Test3019.py - Test3087_1.py - Test3087_2.py - TestArcBehavior.py - TestChangeSketchPlane1.py - TestChangeSketchPlane2.py - TestChangeSketchPlane3.py - TestChangeSketchPlane4.py - TestConstraintAngle.py - TestConstraintAngle_v0_1.py - TestConstraintAngle_v0_2.py - TestConstraintAngle_v20191210_1.py - TestConstraintAngle_v20191210_2.py - TestConstraintAngleBehaviorDirect.py - TestConstraintAngleBehaviorSupplementary_1.py - TestConstraintAngleBehaviorSupplementary_2.py - TestConstraintAngleBehaviorBackward_1.py - TestConstraintAngleBehaviorBackward_2.py - TestConstraintAngleEllipse.py - TestConstraintCoincidence.py - TestConstraintCoincidenceEllipse.py - TestConstraintCoincidenceEllipticArc.py - TestConstraintCollinear.py - TestConstraintCollinearEllipse.py - TestConstraintDistance.py - TestConstraintDistanceEllipse.py - TestConstraintDistanceBehavior.py - TestConstraintDistanceHorizontal.py - TestConstraintDistanceVertical.py - TestConstraintDistanceZero.py - TestConstraintDistanceHorizontalZero.py - TestConstraintDistanceVerticalZero.py - TestConstraintEqual.py - TestConstraintEqualEllipse.py - TestConstraintFixed.py - TestConstraintHorizontal.py - TestConstraintHorizontalValidator.py - TestConstraintLength.py - TestConstraintMiddlePoint.py - TestConstraintMiddlePointOnArc.py - TestConstraintMiddlePointOnEllipticArc.py - TestConstraintParallel.py - TestConstraintPerpendicular.py - TestConstraintPerpendicularArcLine.py - TestConstraintPerpendicularEllipseLine.py - TestConstraintRadius.py - TestConstraintRadiusFailure.py - TestConstraintTangent.py - TestConstraintTangentBSpline.py - TestConstraintTangentEllipse.py - TestConstraintTangentEllipticArc.py - TestConstraintVertical.py - TestCreateArcByCenterStartEnd.py - TestCreateArcByTangentEdge.py - TestCreateArcByThreePoints.py - TestCreateArcByTransversalLine.py - TestCreateArcChangeType.py - TestCreateBSpline.py - TestCreateCircleByCenterAndPassed.py - TestCreateCircleByThreePoints.py - TestCreateCircleChangeType.py - TestCreateEllipseByCenterSemiaxisAndPassed.py - TestCreateEllipseByMajorAxisAndPassed.py - TestCreateEllipseByExternal.py - TestCreateEllipticArc.py - TestCreateEllipticArcByExternal.py - TestDegeneratedGeometry.py - TestDistanceDump.py - TestDistanceSignedVsUnsigned01.py - TestDistanceSignedVsUnsigned02.py - TestDistanceSignedVsUnsigned03.py - TestDistanceSignedVsUnsigned04.py - TestDistanceSignedVsUnsigned05.py - TestEdgesOrder.py - TestFillet.py - TestFilletAfterFolder.py - TestFilletInteracting.py - TestHighload.py - TestIntersectionChangeEdge.py - TestIntersectionWithCircle.py - TestIntersectionWithLine.py - TestIntersectionWithSpline.py - TestMirror.py - TestMultiRotation.py - TestMultiRotation01.py - TestMultiRotation02.py - TestMultiRotation03.py - TestMultiRotation04.py - TestMultiRotation05.py - TestMultiRotationWithParameter.py - TestMultiTranslation.py - TestPresentation.py - TestProjection.py - TestProjectionBSpline.py - TestProjectionEllipse.py - TestProjectionEllipticArc.py - TestProjectionIntoResult.py - TestProjectionUpdate.py - TestRectangle.py - TestRemainingDoF.py - TestRemoveBSpline.py - TestRemoveEllipse.py - TestRemoveEllipticArc.py - TestRemoveSketch.py - TestSignedDistancePointLine.py - TestSignedDistancePointPoint.py - TestSketchDrawer.py - TestSketchPointLine.py - TestSnowflake.py - TestSplit.py - TestSplitEllipse.py - TestSplitLine.py - TestSplitPreview.py - TestTrimArc01.py - TestTrimArc02.py - TestTrimArc03.py - TestTrimArc04.py - TestTrimArc05.py - TestTrimArc06.py - TestTrimArc07.py - TestTrimArc08.py - TestTrimCircle01.py - TestTrimCircle02.py - TestTrimCircle03.py - TestTrimCircle04.py - TestTrimCircle05.py - TestTrimCircleAndArc01.py - TestTrimEllipse.py - TestTrimLine01.py - TestTrimLine02.py - TestTrimLine03.py - TestTrimPreview.py - TestUpdateSketch.py -) +include(tests.set) + +ADD_UNIT_TESTS(${TEST_NAMES}) + +include(tests.set) if(${SKETCHER_CHANGE_RADIUS_WHEN_MOVE}) - ADD_UNIT_TESTS( - TestMoveArc.py - TestMoveBSpline.py - TestMoveCircle.py - TestMoveEllipse.py - TestMoveEllipticArc.py - TestMoveLine.py - TestMovementComplex.py - TestMovePoint.py - ) + 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})