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 3.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. PROJECT(openvibe-module-fs-test-utf)
  22. SET_BUILD_PLATFORM()
  23. ADD_EXECUTABLE(${PROJECT_NAME} uoFilesTestUTF.cpp)
  24. INCLUDE("FindOpenViBE")
  25. INCLUDE("FindOpenViBECommon")
  26. INCLUDE("FindOpenViBEModuleFS")
  27. INCLUDE("FindThirdPartyBoost")
  28. #INCLUDE("FindThirdPartyBoost_System")
  29. INCLUDE("FindThirdPartyBoost_FileSystem")
  30. SET_PROPERTY(TARGET ${PROJECT_NAME} PROPERTY FOLDER ${TESTS_FOLDER}) # Place project in folder unit-test (for some IDE)
  31. TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${GTEST_BOTH_LIBRARIES})
  32. ADD_DEFINITIONS("-DDATA_DIR=\"${CMAKE_CURRENT_SOURCE_DIR}/data\"")
  33. ADD_DEFINITIONS("-DTMP_DIR=\"${OVT_TEST_TEMPORARY_DIR}\"")
  34. ADD_TEST(NAME uoFSTestUTF COMMAND ${PROJECT_NAME})
  35. PROJECT(openvibe-module-fs-test)
  36. # ---------------------------------
  37. # Target macros
  38. # Defines target operating system, architecture and compiler
  39. # ---------------------------------
  40. SET_BUILD_PLATFORM()
  41. # ----------------------
  42. # Configure test target
  43. # ----------------------
  44. # Test that needs to called with parameters
  45. SET(TEST_WITH_PARAM
  46. uoEntryEnumeratorTest.cpp
  47. uoFilesTest.cpp
  48. )
  49. # Test that needs to called without parameters
  50. SET(TEST_NO_PARAM
  51. )
  52. # Create test sources list
  53. # This macro auto-generate ${PROJECT_NAME}.cpp
  54. # in the build tree. ${PROJECT_NAME}.cpp is
  55. # the test driver called by ctest to run
  56. # the different tests added to this target.
  57. CREATE_TEST_SOURCELIST (Tests
  58. ${PROJECT_NAME}.cpp
  59. ${TEST_WITH_PARAM}
  60. ${TEST_NO_PARAM}
  61. )
  62. ADD_EXECUTABLE(${PROJECT_NAME} ${Tests})
  63. INCLUDE("FindOpenViBE")
  64. INCLUDE("FindOpenViBECommon")
  65. INCLUDE("FindOpenViBEModuleFS")
  66. SET_PROPERTY(TARGET ${PROJECT_NAME} PROPERTY FOLDER ${TESTS_FOLDER})
  67. TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${OVT_UNIT_TOOLKIT_LIB} ${OV_MODULE_FS})
  68. # Add test without parameter to driver
  69. FOREACH(test ${TEST_NO_PARAM})
  70. GET_FILENAME_COMPONENT(TName ${test} NAME_WE)
  71. ADD_TEST(NAME ${TName} COMMAND ${PROJECT_NAME} ${TName})
  72. ENDFOREACH()
  73. # Add test with parameter to driver
  74. ADD_TEST(NAME uoEntryEnumeratorTest COMMAND ${PROJECT_NAME} uoEntryEnumeratorTest "${CMAKE_CURRENT_SOURCE_DIR}/data/")
  75. ADD_TEST(NAME uoFilesTest COMMAND ${PROJECT_NAME} uoFilesTest "${OVT_TEST_TEMPORARY_DIR}")