PlatformIO package of the Teensy core framework compatible with GCC 10 & C++20
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.

38 lines
823B

  1. include(CMakeToolsHelpers OPTIONAL)
  2. project(unit-tests)
  3. include_directories(
  4. "${unit-tests_SOURCE_DIR}"
  5. "${gtest_SOURCE_DIR}/include"
  6. "${gmock_SOURCE_DIR}/include"
  7. )
  8. add_executable(unit-tests
  9. unit-tests.cpp
  10. unit-tests.h
  11. unit-tests_Namespace.h
  12. tests/unit-tests_MidiMessage.cpp
  13. tests/unit-tests_Settings.cpp
  14. tests/unit-tests_Settings.h
  15. tests/unit-tests_SysExCodec.cpp
  16. tests/unit-tests_MidiInput.cpp
  17. tests/unit-tests_MidiInputCallbacks.cpp
  18. tests/unit-tests_MidiOutput.cpp
  19. tests/unit-tests_MidiThru.cpp
  20. )
  21. target_link_libraries(unit-tests
  22. gtest
  23. gmock
  24. midi
  25. test-mocks
  26. )
  27. add_test(unit-tests ${unit-tests_BINARY_DIR}/unit-tests --gtest_color=yes)
  28. add_custom_target(build-and-run-unit-tests
  29. COMMAND ${CMAKE_CTEST_COMMAND} -V
  30. DEPENDS unit-tests
  31. )