diff options
Diffstat (limited to 'src/components/protocol_handler/test/CMakeLists.txt')
-rw-r--r-- | src/components/protocol_handler/test/CMakeLists.txt | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/src/components/protocol_handler/test/CMakeLists.txt b/src/components/protocol_handler/test/CMakeLists.txt index 87d91bfd54..ca079dcc7e 100644 --- a/src/components/protocol_handler/test/CMakeLists.txt +++ b/src/components/protocol_handler/test/CMakeLists.txt @@ -28,7 +28,7 @@ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. -if (BUILD_TESTS) +include(${CMAKE_SOURCE_DIR}/tools/cmake/helpers/sources.cmake) include_directories ( include @@ -38,9 +38,12 @@ include_directories ( ${COMPONENTS_DIR}/protocol_handler/test/include ${COMPONENTS_DIR}/include/protocol ${JSONCPP_INCLUDE_DIRECTORY} + ${GMOCK_INCLUDE_DIRECTORY} ) -set (LIBRARIES +collect_sources(SOURCES ${CMAKE_CURRENT_SOURCE_DIR}) + +set(LIBRARIES gmock ProtocolHandler connectionHandler @@ -49,15 +52,4 @@ set (LIBRARIES ProtocolLibrary ) -set (SOURCES - incoming_data_handler_test.cc - protocol_header_validator_test.cc - protocol_handler_tm_test.cc - protocol_packet_test.cc - protocol_payload_test.cc - multiframe_builder_test.cc -) - -create_test ("protocol_handler_test" "${SOURCES}" "${LIBRARIES}") - -endif () +create_test(protocol_handler_test "${SOURCES}" "${LIBRARIES}") |