From: Guilherme Maciel Ferreira Date: Sat, 7 Jan 2012 16:20:58 +0000 (-0200) Subject: Fix: added missing statements in the makefile and split the sources variable. X-Git-Tag: v1.3~11^2~46 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=655ef756fb6d27f37349e7a3b353b704db4fb547;p=pingcheck Fix: added missing statements in the makefile and split the sources variable. --- diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index d8b3415..03b5fe9 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,3 +1,6 @@ +# package: find external packages +include(FindPkgConfig) + # package: required boost libraries set(Boost_USE_STATIC_LIBS OFF) set(Boost_USE_MULTITHREADED ON) @@ -17,14 +20,18 @@ include_directories(${CMAKE_SOURCE_DIR}/src) # compiler: include directories where the source code is located include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src) -# compiler: source code files +# compiler: source code from test cases +set(TESTS_SOURCES + test_messagepayload.cpp +) + +# compiler: source code to be tested set(SOURCES - test_messagepayload.cpp - ../src/host/messagepayload.cpp + ${CMAKE_SOURCE_DIR}/src/host/messagepayload.cpp ) # compiler: creates the binary -add_executable(test_${TARGET} ${SOURCES}) +add_executable(test_${TARGET} ${SOURCES} ${TESTS_SOURCES}) # cmake: add a custom "make check" target which automatically builds the binary add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} DEPENDS test_${TARGET})