CMakeLists.txt 1.7 KB

1234567891011121314151617181920212223242526272829303132333435
  1. cmake_minimum_required(VERSION 3.20)
  2. project(SunrisePortableTests LANGUAGES CXX)
  3. enable_testing()
  4. add_executable(socket_row_relocation_test socket_row_relocation_test.cpp)
  5. target_compile_features(socket_row_relocation_test PRIVATE cxx_std_20)
  6. if(MSVC)
  7. target_compile_options(socket_row_relocation_test PRIVATE /W4 /WX /UNDEBUG)
  8. else()
  9. target_compile_options(socket_row_relocation_test PRIVATE -Wall -Wextra -Werror -UNDEBUG)
  10. endif()
  11. add_test(NAME socket_row_relocation
  12. COMMAND socket_row_relocation_test "${CMAKE_CURRENT_SOURCE_DIR}/fixtures/socket_rows.hex")
  13. add_executable(lore_visibility_test lore_visibility_test.cpp)
  14. target_compile_features(lore_visibility_test PRIVATE cxx_std_20)
  15. if(MSVC)
  16. target_compile_options(lore_visibility_test PRIVATE /W4 /WX /UNDEBUG)
  17. else()
  18. target_compile_options(lore_visibility_test PRIVATE -Wall -Wextra -Werror -UNDEBUG)
  19. endif()
  20. add_test(NAME lore_visibility COMMAND lore_visibility_test)
  21. set(SRC "${CMAKE_CURRENT_SOURCE_DIR}/../Sunrise/src")
  22. add_executable(map_generator_auth_test map_generator_auth_test.cpp
  23. "${SRC}/middleware/bap/activity_message/activity_sensor_auth_bodies.cpp"
  24. "${SRC}/middleware/bap/activity_message/activity_sensor_auth_blocks.cpp"
  25. "${SRC}/middleware/encoding/bit_reader.cpp"
  26. "${SRC}/middleware/encoding/bit_writer.cpp")
  27. target_include_directories(map_generator_auth_test PRIVATE "${SRC}")
  28. target_compile_features(map_generator_auth_test PRIVATE cxx_std_20)
  29. if(MSVC)
  30. target_compile_options(map_generator_auth_test PRIVATE /W4 /WX /UNDEBUG)
  31. else()
  32. target_compile_options(map_generator_auth_test PRIVATE -Wall -Wextra -Werror -UNDEBUG)
  33. endif()
  34. add_test(NAME map_generator_auth COMMAND map_generator_auth_test)