From 655ef756fb6d27f37349e7a3b353b704db4fb547 Mon Sep 17 00:00:00 2001 From: Guilherme Maciel Ferreira Date: Sat, 7 Jan 2012 14:20:58 -0200 Subject: [PATCH] Fix: added missing statements in the makefile and split the sources variable. --- test/CMakeLists.txt | 15 +++++++++++---- 1 files changed, 11 insertions(+), 4 deletions(-) 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}) -- 1.7.1