You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CMakeLists.txt 2.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. #######################################################################
  2. # Software License Agreement (AGPL-3 License)
  3. #
  4. # OpenViBE SDK Test Software
  5. # Based on OpenViBE V1.1.0, Copyright (C) Inria, 2006-2015
  6. # Copyright (C) Inria, 2015-2017,V1.0
  7. #
  8. # This program is free software: you can redistribute it and/or modify
  9. # it under the terms of the GNU Affero General Public License version 3,
  10. # as published by the Free Software Foundation.
  11. #
  12. # This program is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. # GNU Affero General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU Affero General Public License
  18. # along with this program.
  19. # If not, see <http://www.gnu.org/licenses/>.
  20. #######################################################################
  21. # Base framework features tests
  22. PROJECT(openvibe-toolkit-test)
  23. # ---------------------------------
  24. # Target macros
  25. # Defines target operating system, architecture and compiler
  26. # ---------------------------------
  27. SET_BUILD_PLATFORM()
  28. # ----------------------
  29. # Configure test target
  30. # ----------------------
  31. # Test that needs to called with parameters
  32. SET(TEST_WITH_PARAM
  33. uoMatrixToolkitTest.cpp
  34. urImportScenarioFromFileTest.cpp
  35. urExportScenarioToFileTest.cpp
  36. urValidateScenarioTest.cpp
  37. )
  38. # Test that needs to called without parameters
  39. SET(TEST_NO_PARAM
  40. )
  41. # Create test sources list
  42. # This macro auto-generate ${PROJECT_NAME}.cpp
  43. # in the build tree. ${PROJECT_NAME}.cpp is
  44. # the test driver called by ctest to run
  45. # the different tests added to this target.
  46. CREATE_TEST_SOURCELIST (Tests
  47. ${PROJECT_NAME}.cpp
  48. ${TEST_WITH_PARAM}
  49. ${TEST_NO_PARAM}
  50. )
  51. ADD_EXECUTABLE(${PROJECT_NAME} ${Tests})
  52. INCLUDE("FindOpenViBE")
  53. INCLUDE("FindOpenViBECommon")
  54. INCLUDE("FindOpenViBEToolkit")
  55. INCLUDE("FindOpenViBEModuleSystem")
  56. SET_PROPERTY(TARGET ${PROJECT_NAME} PROPERTY FOLDER ${TESTS_FOLDER})
  57. TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${OVT_UNIT_TOOLKIT_LIB} ${GTEST_BOTH_LIBRARIES} ${OV_LIBS})
  58. # Add test without parameter to driver
  59. FOREACH(test ${TEST_NO_PARAM})
  60. GET_FILENAME_COMPONENT(TName ${test} NAME_WE)
  61. ADD_TEST(NAME ${TName} COMMAND ${PROJECT_NAME} ${TName})
  62. ENDFOREACH()
  63. # Add test with parameter to driver
  64. ADD_TEST(NAME uoMatrixToolkitTest COMMAND ${PROJECT_NAME} uoMatrixToolkitTest "${OVT_TEST_TEMPORARY_DIR}")
  65. ADD_TEST(NAME urImportScenarioFromFileTest COMMAND ${PROJECT_NAME} urImportScenarioFromFileTest "${OVT_OPENVIBE_DATA}/kernel/openvibe.conf" "${CMAKE_CURRENT_SOURCE_DIR}/data/")
  66. ADD_TEST(NAME urExportScenarioToFileTest COMMAND ${PROJECT_NAME} urExportScenarioToFileTest "${OVT_OPENVIBE_DATA}/kernel/openvibe.conf" "${OVT_TEST_TEMPORARY_DIR}")
  67. ADD_TEST(NAME urValidateScenarioTest COMMAND ${PROJECT_NAME} urValidateScenarioTest "${OVT_OPENVIBE_DATA}/kernel/openvibe.conf" "${CMAKE_CURRENT_SOURCE_DIR}/data/")