Blame view

test/CMakeLists.txt 782 Bytes
68753efb   Peter M. Groen   [FIX] Setting up ...
1
2
3
4
5
6
7
8
9
  #****************************************************************************
  #* Copyright (c) 2023 Open Systems Development B.V.
  #*****************************************************************************
  #
  # Don't call this file directly from cmake.
  # This file is included from the upper directory.
  #
  # Build rules for the MQTT Library
  
b7b0db4b   Peter M. Groen   Added tests
10
11
  add_executable(mqtt_test
      helperclasses/PublisherClass.h
68753efb   Peter M. Groen   [FIX] Setting up ...
12
      TopicLengthTest.cpp
5cd80369   Peter M. Groen   Setting up Sledge...
13
      SledgeHammerTest.cpp
68753efb   Peter M. Groen   [FIX] Setting up ...
14
15
  )
  
b7b0db4b   Peter M. Groen   Added tests
16
  target_include_directories(mqtt_test PRIVATE
68753efb   Peter M. Groen   [FIX] Setting up ...
17
18
19
20
      ${CMAKE_CIRRENT_SOURECE_DIR}
      ../include
  )
  
b7b0db4b   Peter M. Groen   Added tests
21
  target_link_libraries(mqtt_test PRIVATE
68753efb   Peter M. Groen   [FIX] Setting up ...
22
23
24
25
26
27
      gmock_main
      gmock
      gtest
      mqtt-cpp
  )
  
b7b0db4b   Peter M. Groen   Added tests
28
  add_test(NAME mqtt_test COMMAND mqtt_test)
68753efb   Peter M. Groen   [FIX] Setting up ...
29
  
b7b0db4b   Peter M. Groen   Added tests
30
  set_tests_properties(mqtt_test PROPERTIES
68753efb   Peter M. Groen   [FIX] Setting up ...
31
32
      WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
  )