Add format.cc to the test instead of linking with format library to avoid link errors with MSVC.
This commit is contained in:
parent
e8ba960e16
commit
25d61171e8
@ -25,8 +25,8 @@ if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/gtest/CMakeLists.txt)
|
|||||||
include_directories(gtest/include)
|
include_directories(gtest/include)
|
||||||
link_directories(${CMAKE_CURRENT_BINARY_DIR}/gtest)
|
link_directories(${CMAKE_CURRENT_BINARY_DIR}/gtest)
|
||||||
enable_testing()
|
enable_testing()
|
||||||
add_executable(format_test format_test.cc gtest/src/gtest_main.cc)
|
add_executable(format_test format.cc format_test.cc gtest/src/gtest_main.cc)
|
||||||
target_link_libraries(format_test format gtest)
|
target_link_libraries(format_test gtest)
|
||||||
if (CMAKE_COMPILER_IS_GNUCXX)
|
if (CMAKE_COMPILER_IS_GNUCXX)
|
||||||
set_target_properties(format_test PROPERTIES COMPILE_FLAGS
|
set_target_properties(format_test PROPERTIES COMPILE_FLAGS
|
||||||
"-Wall -Wextra -pedantic -Wno-long-long -Wno-variadic-macros")
|
"-Wall -Wextra -pedantic -Wno-long-long -Wno-variadic-macros")
|
||||||
|
Loading…
Reference in New Issue
Block a user