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
This commit is contained in:
BostonVaulter 2011-02-15 07:44:14 +00:00
parent 462248a2de
commit b46d872a5e
2 changed files with 5 additions and 4 deletions

View File

@ -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.

View File

@ -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})