From 25d61171e8b9d39744e7d52fe96d68ef3fd73ecd Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Wed, 12 Dec 2012 10:03:05 -0800 Subject: [PATCH] Add format.cc to the test instead of linking with format library to avoid link errors with MSVC. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5b4d9c6b..5dff223e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,8 +25,8 @@ if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/gtest/CMakeLists.txt) include_directories(gtest/include) link_directories(${CMAKE_CURRENT_BINARY_DIR}/gtest) enable_testing() - add_executable(format_test format_test.cc gtest/src/gtest_main.cc) - target_link_libraries(format_test format gtest) + add_executable(format_test format.cc format_test.cc gtest/src/gtest_main.cc) + target_link_libraries(format_test gtest) if (CMAKE_COMPILER_IS_GNUCXX) set_target_properties(format_test PROPERTIES COMPILE_FLAGS "-Wall -Wextra -pedantic -Wno-long-long -Wno-variadic-macros")