CMakeLists.txt 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. include(${QTPROTOBUF_CMAKE_DIR}/QtProtobufCommon.cmake)
  2. # clients
  3. add_test_target(TARGET qtgrpc_test
  4. SOURCES clienttest.cpp)
  5. add_target_windeployqt(TARGET qtgrpc_test
  6. QML_DIR ${CMAKE_CURRENT_SOURCE_DIR})
  7. add_test_target(TARGET qtgrpc_secure_test
  8. SOURCES sslclienttest.cpp)
  9. add_target_windeployqt(TARGET qtgrpc_secure_test
  10. QML_DIR ${CMAKE_CURRENT_SOURCE_DIR})
  11. # servers
  12. add_subdirectory(echoserver)
  13. add_subdirectory(secureechoserver)
  14. configure_file(${CMAKE_CURRENT_SOURCE_DIR}/testfile ${CMAKE_CURRENT_BINARY_DIR}/testfile COPYONLY)
  15. if(UNIX)
  16. set(TEST_DRIVER_NAME "test_driver.sh")
  17. elseif(WIN32)
  18. set(TEST_DRIVER_NAME "test_driver.bat")
  19. endif()
  20. configure_file(${TEST_DRIVER_NAME}.in ${TEST_DRIVER_NAME} @ONLY)
  21. add_test(NAME qtgrpc_echo_test
  22. COMMAND ${TEST_DRIVER_NAME} $<TARGET_FILE:qtgrpc_test> $<TARGET_FILE:echoserver> $<TARGET_FILE_NAME:qtgrpc_test> $<TARGET_FILE_NAME:echoserver>
  23. )
  24. add_test(NAME qtgrpc_secure_test
  25. COMMAND ${TEST_DRIVER_NAME} $<TARGET_FILE:qtgrpc_secure_test> $<TARGET_FILE:secureechoserver> $<TARGET_FILE_NAME:qtgrpc_secure_test> $<TARGET_FILE_NAME:secureechoserver>
  26. )