Salome HOME
bos #29484 Add a test service to build tesselation on a shape
[modules/geom.git] / src / XAO / tests / CMakeLists.txt
1 # Copyright (C) 2012-2021  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 ADD_SUBDIRECTORY(data)
21
22 # additional include directories
23 INCLUDE_DIRECTORIES(
24   ${PTHREAD_INCLUDE_DIR}
25   ${OpenCASCADE_INCLUDE_DIR}
26   ${CPPUNIT_INCLUDE_DIRS}
27   )
28
29 # additional preprocessor / compiler flags
30 ADD_DEFINITIONS(
31   ${OpenCASCADE_DEFINITIONS}
32   ${CPPUNIT_DEFINITIONS}
33   )
34
35 # libraries to link to
36 SET(_link_LIBRARIES
37   ${CPPUNIT_LIBRARIES}
38   XAO
39   )
40
41 # --- sources ---
42
43 SET(TestXAO_SOURCES
44   BrepGeometryTest.cxx
45   FieldTest.cxx
46   GeometryTest.cxx
47   GroupTest.cxx
48   ImportExportTest.cxx
49   XAOTests.cxx
50   XaoTest.cxx
51   XaoUtilsTest.cxx
52   )
53
54 # --- rules ---
55
56 ADD_EXECUTABLE(TestXAO ${TestXAO_SOURCES})
57 TARGET_LINK_LIBRARIES(TestXAO ${_link_LIBRARIES})
58
59 SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env)
60 SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/xao)
61
62 ADD_TEST(TestXAO TestXAO)
63 SET_TESTS_PROPERTIES(TestXAO PROPERTIES ENVIRONMENT "XAO_DATA_DIR=${CMAKE_CURRENT_SOURCE_DIR}/data;${tests_env}" LABELS "xao")
64
65 INSTALL(TARGETS TestXAO DESTINATION ${SALOME_INSTALL_BINS})
66
67 # Application tests
68
69 INSTALL(TARGETS TestXAO RUNTIME DESTINATION ${TEST_INSTALL_DIRECTORY})
70
71 INSTALL(FILES CTestTestfileInstall.cmake
72         DESTINATION ${TEST_INSTALL_DIRECTORY}
73         RENAME CTestTestfile.cmake)