Salome HOME
afd0a3a6aa065702db4892b1bb9ef7b7d6374cc1
[modules/geom.git] / doc / salome / examples / CMakeLists.txt
1 # Copyright (C) 2007-2015  CEA/DEN, EDF R&D, OPEN CASCADE
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 SET(BAD_TESTS
21   repairing_operations_ex09.py
22 )
23
24 SET(GOOD_TESTS
25   3dsketcher.py
26   advanced_geom_objs_ex01.py
27   advanced_geom_objs_ex02.py
28   advanced_geom_objs_ex03.py
29   angle.py
30   arranging_study_objects.py
31   basic_geom_objs_ex01.py
32   basic_geom_objs_ex02.py
33   basic_geom_objs_ex03.py
34   basic_geom_objs_ex04.py
35   basic_geom_objs_ex05.py
36   basic_geom_objs_ex06.py
37   basic_geom_objs_ex07.py
38   basic_geom_objs_ex08.py
39   basic_geom_objs_ex09.py
40   basic_geom_objs_ex10.py
41   basic_operations_ex01.py
42   basic_operations_ex02.py
43   basic_operations_ex03.py
44   basic_operations_ex04.py
45   basic_properties.py
46   blocks_operations_ex01.py
47   blocks_operations_ex02.py
48   blocks_operations_ex03.py
49   boolean_operations_ex01.py
50   boolean_operations_ex02.py
51   boolean_operations_ex03.py
52   boolean_operations_ex04.py
53   bounding_box.py
54   building_by_blocks_ex01.py
55   building_by_blocks_ex02.py
56   center_of_mass.py
57   check_compound_of_blocks.py
58   check_self_intersections.py
59   check_shape.py
60   complex_objs_ex01.py
61   complex_objs_ex02.py
62   complex_objs_ex03.py
63   complex_objs_ex04.py
64   complex_objs_ex05.py
65   complex_objs_ex06.py
66   complex_objs_ex07.py
67   complex_objs_ex08.py
68   complex_objs_ex09.py
69   complex_objs_ex10.py
70   complex_objs_ex11.py
71   fast_intersection.py
72   free_boundaries.py
73   free_faces.py
74   GEOM_box.py
75   get_non_blocks.py
76   import_export.py
77   inertia.py
78   min_distance.py
79   normal_face.py
80   notebook_geom.py
81   polyline.py
82   point_coordinates.py
83   primitives_ex01.py
84   primitives_ex02.py
85   primitives_ex03.py
86   primitives_ex04.py
87   primitives_ex05.py
88   primitives_ex06.py
89   primitives_ex07.py
90   repairing_operations_ex01.py
91   repairing_operations_ex02.py
92   repairing_operations_ex03.py
93   repairing_operations_ex04.py
94   repairing_operations_ex05.py
95   repairing_operations_ex06.py
96   repairing_operations_ex07.py
97   repairing_operations_ex08.py
98   repairing_operations_ex10.py
99   repairing_operations_ex11.py
100   repairing_operations_ex12.py
101   sketcher.py
102   tolerance.py
103   topological_geom_objs_ex01.py
104   topological_geom_objs_ex02.py
105   topological_geom_objs_ex03.py
106   topological_geom_objs_ex04.py
107   topological_geom_objs_ex05.py
108   topological_geom_objs_ex06.py
109   transformation_operations_ex01.py
110   transformation_operations_ex02.py
111   transformation_operations_ex03.py
112   transformation_operations_ex04.py
113   transformation_operations_ex05.py
114   transformation_operations_ex06.py
115   transformation_operations_ex07.py
116   transformation_operations_ex08.py
117   transformation_operations_ex09.py
118   transformation_operations_ex10.py
119   transformation_operations_ex11.py
120   transformation_operations_ex12.py
121   transformation_operations_ex13.py
122   transformation_operations_ex14.py
123   viewing_geom_objs_ex01.py
124   viewing_geom_objs_ex02.py
125   viewing_geom_objs_ex03.py
126   viewing_geom_objs_ex04.py
127   whatis.py
128   working_with_groups_ex01.py
129   working_with_groups_ex02.py
130   working_with_groups_ex03.py
131   working_with_groups_ex04.py
132   working_with_groups_ex05.py
133   working_with_groups_ex06.py
134 )
135 IF(CAS_VERSION_STR VERSION_GREATER "6.9.0")
136   LIST(APPEND GOOD_TESTS
137     check_self_intersections_fast.py
138   )
139 ENDIF()
140
141 SET(EXAMPLES_TESTS ${BAD_TESTS} ${GOOD_TESTS} testme.py)
142
143 SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env)
144
145 FOREACH(test ${GOOD_TESTS})
146   GET_FILENAME_COMPONENT(testname ${test} NAME_WE)
147   ADD_TEST(NAME ${testname}
148            COMMAND ${PYTHON_EXECUTABLE} -B ${CMAKE_SOURCE_DIR}/doc/salome/examples/testme.py ${CMAKE_CURRENT_SOURCE_DIR}/${test})
149   SET_TESTS_PROPERTIES(${testname} PROPERTIES ENVIRONMENT "${tests_env}")
150 ENDFOREACH()
151
152 # install Python scripts
153 SALOME_INSTALL_SCRIPTS("${EXAMPLES_TESTS}" ${SALOME_INSTALL_DOC}/examples/GEOM)
154
155 # Application tests
156
157 SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test)
158 INSTALL(FILES ${GOOD_TESTS} DESTINATION ${TEST_INSTALL_DIRECTORY})
159
160 INSTALL(FILES CTestTestfileInstall.cmake
161         DESTINATION ${TEST_INSTALL_DIRECTORY}
162         RENAME CTestTestfile.cmake)