mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-26 04:00:05 +00:00
Add a fused version of gtest.
This commit is contained in:
parent
31f7a7479d
commit
5e3e7fe7d3
@ -39,29 +39,27 @@ add_test(compile-test ${CMAKE_CTEST_COMMAND}
|
|||||||
# See the Google Test FAQ "Why is it not recommended to install a
|
# See the Google Test FAQ "Why is it not recommended to install a
|
||||||
# pre-compiled copy of Google Test (for example, into /usr/local)?"
|
# pre-compiled copy of Google Test (for example, into /usr/local)?"
|
||||||
# at http://code.google.com/p/googletest/wiki/FAQ for more details.
|
# at http://code.google.com/p/googletest/wiki/FAQ for more details.
|
||||||
if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/gtest/CMakeLists.txt)
|
|
||||||
option(
|
|
||||||
gtest_force_shared_crt
|
|
||||||
"Use shared (DLL) run-time lib even when Google Test is built as static lib."
|
|
||||||
ON)
|
|
||||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
|
||||||
add_definitions(-DGTEST_USE_OWN_TR1_TUPLE=1)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
add_subdirectory(gtest)
|
|
||||||
include_directories(gtest/include)
|
|
||||||
link_directories(${CMAKE_CURRENT_BINARY_DIR}/gtest)
|
|
||||||
|
|
||||||
add_executable(format-test format-test.cc)
|
include_directories(.)
|
||||||
target_link_libraries(format-test format gtest)
|
|
||||||
if (CMAKE_COMPILER_IS_GNUCXX)
|
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||||
set_target_properties(format-test PROPERTIES COMPILE_FLAGS
|
add_definitions(-DGTEST_USE_OWN_TR1_TUPLE=1)
|
||||||
"-Wall -Wextra -pedantic -Wno-long-long -Wno-variadic-macros")
|
endif ()
|
||||||
endif ()
|
|
||||||
add_test(format-test format-test)
|
add_library(gtest gtest/gtest-all.cc)
|
||||||
if (HAVE_STD_CPP11_FLAG)
|
|
||||||
set_target_properties(format-test PROPERTIES COMPILE_FLAGS "-std=c++11")
|
find_package(Threads)
|
||||||
endif ()
|
target_link_libraries(gtest ${CMAKE_THREAD_LIBS_INIT})
|
||||||
|
|
||||||
|
add_executable(format-test format-test.cc)
|
||||||
|
target_link_libraries(format-test format gtest)
|
||||||
|
if (CMAKE_COMPILER_IS_GNUCXX)
|
||||||
|
set_target_properties(format-test PROPERTIES COMPILE_FLAGS
|
||||||
|
"-Wall -Wextra -pedantic -Wno-long-long -Wno-variadic-macros")
|
||||||
|
endif ()
|
||||||
|
add_test(format-test format-test)
|
||||||
|
if (HAVE_STD_CPP11_FLAG)
|
||||||
|
set_target_properties(format-test PROPERTIES COMPILE_FLAGS "-std=c++11")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
find_library(PROFILER_LIB profiler)
|
find_library(PROFILER_LIB profiler)
|
||||||
|
9118
gtest/gtest-all.cc
Normal file
9118
gtest/gtest-all.cc
Normal file
File diff suppressed because it is too large
Load Diff
19537
gtest/gtest.h
Normal file
19537
gtest/gtest.h
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user