Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #125 from orbea/tinyformat
Replace the tinyformat submodule with a git subtree
- Loading branch information
Showing
10 changed files
with
2,007 additions
and
4 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Submodule tinyformat
deleted from
b7f5a2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,3 @@ | |||
_bloat_test_tmp* | |||
tinyformat_test_cxx* | |||
tinyformat_speed_test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,56 @@ | |||
# Build and run the unit tests (or speed tests) on linux | |||
# | |||
# Should work with recent versions of both gcc and clang. (To compile with | |||
# clang use "make CXX=clang++".) | |||
|
|||
CXXFLAGS?=-Wall | |||
CXX11FLAGS?=-std=c++0x | |||
|
|||
test: tinyformat_test_cxx98 tinyformat_test_cxx11 | |||
@echo running tests... | |||
@./tinyformat_test_cxx98 && \ | |||
./tinyformat_test_cxx11 && \ | |||
! $(CXX) $(CXXFLAGS) -std=c++98 -DTINYFORMAT_NO_VARIADIC_TEMPLATES \ | |||
-DTEST_WCHAR_T_COMPILE tinyformat_test.cpp 2> /dev/null && \ | |||
echo "No errors" || echo "Tests failed" | |||
|
|||
doc: tinyformat.html | |||
|
|||
speed_test: tinyformat_speed_test | |||
@echo running speed tests... | |||
@echo printf timings: | |||
@time -p ./tinyformat_speed_test printf > /dev/null | |||
@echo iostreams timings: | |||
@time -p ./tinyformat_speed_test iostreams > /dev/null | |||
@echo tinyformat timings: | |||
@time -p ./tinyformat_speed_test tinyformat > /dev/null | |||
@echo boost timings: | |||
@time -p ./tinyformat_speed_test boost > /dev/null | |||
|
|||
tinyformat_test_cxx98: tinyformat.h tinyformat_test.cpp Makefile | |||
$(CXX) $(CXXFLAGS) -std=c++98 -DTINYFORMAT_NO_VARIADIC_TEMPLATES tinyformat_test.cpp -o tinyformat_test_cxx98 | |||
|
|||
tinyformat_test_cxx11: tinyformat.h tinyformat_test.cpp Makefile | |||
$(CXX) $(CXXFLAGS) $(CXX11FLAGS) -DTINYFORMAT_USE_VARIADIC_TEMPLATES tinyformat_test.cpp -o tinyformat_test_cxx11 | |||
|
|||
tinyformat.html: README.rst | |||
@echo building docs... | |||
rst2html.py README.rst > tinyformat.html | |||
|
|||
tinyformat_speed_test: tinyformat.h tinyformat_speed_test.cpp Makefile | |||
$(CXX) $(CXXFLAGS) -O3 -DNDEBUG tinyformat_speed_test.cpp -o tinyformat_speed_test | |||
|
|||
bloat_test: | |||
@for opt in '' '-O3 -DNDEBUG' ; do \ | |||
for use in '' '-DUSE_IOSTREAMS' '-DUSE_TINYFORMAT' '-DUSE_TINYFORMAT $(CXX11FLAGS)' '-DUSE_BOOST' ; do \ | |||
echo ; \ | |||
echo ./bloat_test.sh $(CXX) $$opt $$use ; \ | |||
./bloat_test.sh $(CXX) $$opt $$use ; \ | |||
done ; \ | |||
done | |||
|
|||
|
|||
clean: | |||
rm -f tinyformat_test_cxx98 tinyformat_test_cxx11 tinyformat_speed_test | |||
rm -f tinyformat.html | |||
rm -f _bloat_test_tmp_* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,12 @@ | |||
# Build and run the unit tests on windows with MSVC. | |||
# | |||
# To use, open a visual studio command prompt and type | |||
# | |||
# nmake -f Makefile.nmake | |||
|
|||
test: tinyformat_test_cxx98 | |||
@echo running tests... | |||
@tinyformat_test_cxx98 && echo "No errors" | |||
|
|||
tinyformat_test_cxx98: tinyformat.h tinyformat_test.cpp | |||
cl -W3 -EHsc -DTINYFORMAT_NO_VARIADIC_TEMPLATES tinyformat_test.cpp -Fetinyformat_test_cxx98 |
Oops, something went wrong.