From b46d872a5e24db417ac18556cc416e260799814b Mon Sep 17 00:00:00 2001 From: BostonVaulter Date: Tue, 15 Feb 2011 07:44:14 +0000 Subject: [PATCH] Actually compile unit tests correctly Previously the unit tests were being compiled without linking in the actual test file, we will still need to prettify the cmake file (i.e. don't put the test file in the add executable section --- CMakeLists.txt | 3 ++- cmake/CMakeLists_test.txt | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bd5bfbe3..30348cd7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,9 +54,10 @@ INCLUDE(${cmake_dir}/CMakeLists_lib.txt) INCLUDE(${cmake_dir}/CMakeLists_synergyc.txt) INCLUDE(${cmake_dir}/CMakeLists_synergys.txt) INCLUDE(${cmake_dir}/CMakeLists_launcher.txt) +INCLUDE(${cmake_dir}/CMakeLists_gtest.txt) INCLUDE(${cmake_dir}/CMakeLists_test.txt) -add_subdirectory(third_party/gtest) +#add_subdirectory(third_party/gtest) if (CONF_CPACK) # Setup the CPack config. diff --git a/cmake/CMakeLists_test.txt b/cmake/CMakeLists_test.txt index ce11e975..a54eab73 100644 --- a/cmake/CMakeLists_test.txt +++ b/cmake/CMakeLists_test.txt @@ -86,6 +86,6 @@ SET(inc_dirs_test INCLUDE_DIRECTORIES(${inc_dirs_test}) #ADD_EXECUTABLE(tests ${root_dir}/third_party/gtest/src/gtest-all.cc) #ADD_EXECUTABLE(tests ${root_dir}/lib/synergy/CProtocolUtilTest.cpp) -ADD_LIBRARY(prototest STATIC ${src_cmd_synergyc_common}) -ADD_EXECUTABLE(tests ${root_dir}/third_party/gtest/src/gtest_main.cc) -TARGET_LINK_LIBRARIES(tests synergy prototest ${libs}) +#ADD_LIBRARY(prototest STATIC ${src_cmd_synergyc_common}) +ADD_EXECUTABLE(tests ${root_dir}/third_party/gtest/src/gtest_main.cc ${root_dir}/lib/synergy/CProtocolUtilTest.cpp) +TARGET_LINK_LIBRARIES(tests synergy gtest ${libs})