]> SALOME platform Git repositories - modules/yacs.git/blob - src/py2yacs/Test/CMakeLists.txt
Salome HOME
Save foreach state - work in progress.
[modules/yacs.git] / src / py2yacs / Test / CMakeLists.txt
1 # Copyright (C) 2012-2016  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_DIRECTORIES(
21   ${CPPUNIT_INCLUDE_DIRS}
22   ${CMAKE_CURRENT_SOURCE_DIR}/..
23 )
24
25 SET(_link_LIBRARIES
26   ${CPPUNIT_LIBRARIES} 
27   py2yacslib
28 )
29
30 SET(Py2yacsTest_SOURCES
31   TestPy2yacs.cxx
32   Py2yacsTest.cxx
33   Py2yacsTest.hxx
34 )
35
36 ADD_EXECUTABLE(TestPy2yacs ${Py2yacsTest_SOURCES})
37 TARGET_LINK_LIBRARIES(TestPy2yacs ${_link_LIBRARIES})
38
39 ADD_EXECUTABLE(test_py2yacs test_py2yacs.cxx)
40 TARGET_LINK_LIBRARIES(test_py2yacs py2yacslib)
41
42 # For salome test
43 IF(NOT WIN32)
44   ADD_TEST(TestPy2yacs TestPy2yacs)
45   SET_TESTS_PROPERTIES(TestPy2yacs PROPERTIES
46                        ENVIRONMENT "PYTHONPATH=${CMAKE_CURRENT_SOURCE_DIR}:${CMAKE_CURRENT_SOURCE_DIR}/..:$ENV{PYTHONPATH}"
47                       )
48
49   SET(LOCAL_TEST_DIR ${SALOME_YACS_INSTALL_TEST}/py2yacs)
50   SET(LOCAL_TEST_FILES
51     bad_parsers.py
52     err_py2yacs_invalid.py
53     )
54   INSTALL(FILES ${LOCAL_TEST_FILES}
55           DESTINATION ${LOCAL_TEST_DIR})
56   INSTALL(FILES CTestTestfileInstall.cmake
57           DESTINATION ${LOCAL_TEST_DIR}
58           RENAME CTestTestfile.cmake)
59   INSTALL(TARGETS TestPy2yacs test_py2yacs
60           DESTINATION ${LOCAL_TEST_DIR})
61
62 ENDIF()