Add format library to the tests.

This commit is contained in:
Victor Zverovich 2012-12-07 10:01:05 -08:00
parent 6767965583
commit 5e0765975c
2 changed files with 5 additions and 2 deletions

View File

@ -28,14 +28,17 @@ endif ()
# Speed test. # Speed test.
if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/tinyformat/tinyformat_test.cpp) if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/tinyformat/tinyformat_test.cpp)
add_executable(tinyformat_speed_test tinyformat/tinyformat_test.cpp) add_executable(tinyformat_speed_test tinyformat/tinyformat_test.cpp)
target_link_libraries(tinyformat_speed_test format)
set_target_properties(tinyformat_speed_test set_target_properties(tinyformat_speed_test
PROPERTIES COMPILE_DEFINITIONS SPEED_TEST) PROPERTIES COMPILE_DEFINITIONS "SPEED_TEST;HAVE_FORMAT")
add_custom_target(speed_test add_custom_target(speed_test
COMMAND @echo running speed tests... COMMAND @echo running speed tests...
COMMAND @echo printf timings: COMMAND @echo printf timings:
COMMAND @time -p ./tinyformat_speed_test printf > /dev/null COMMAND @time -p ./tinyformat_speed_test printf > /dev/null
COMMAND @echo iostreams timings: COMMAND @echo iostreams timings:
COMMAND @time -p ./tinyformat_speed_test iostreams > /dev/null COMMAND @time -p ./tinyformat_speed_test iostreams > /dev/null
COMMAND @echo format timings:
COMMAND @time -p ./tinyformat_speed_test format > /dev/null
COMMAND @echo tinyformat timings: COMMAND @echo tinyformat timings:
COMMAND @time -p ./tinyformat_speed_test tinyformat > /dev/null COMMAND @time -p ./tinyformat_speed_test tinyformat > /dev/null
COMMAND @echo boost timings: COMMAND @echo boost timings:

@ -1 +1 @@
Subproject commit f465a3e5461474b9e6a5c3e5739d95c93d66018f Subproject commit ba60b4838941bb9f5452a0bac73124a62d1499a4