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:
parent
462248a2de
commit
b46d872a5e
|
@ -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.
|
||||
|
|
|
@ -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})
|
||||
|
|
Loading…
Reference in New Issue