File tree Expand file tree Collapse file tree 1 file changed +15
-7
lines changed
Expand file tree Collapse file tree 1 file changed +15
-7
lines changed Original file line number Diff line number Diff line change 1- LIB_BOOST_TEST: =-lboost_unit_test_framework-mt
1+
2+ COMPILE := $(CXX ) -I. -Wall -Wextra -g $(CXXFLAGS )
3+ OPTIMIZE := -DNDEBUG -O2
4+
5+ LIB_BOOST_TEST := -lboost_unit_test_framework-mt
26
37all :
48 @echo This library is a C++ header file only.
711 mkdir -p .bin
812
913test : test/test.cpp timsort.hpp .bin
10- $(CXX ) -I. $(LIB_BOOST_TEST ) $(CXXFLAGS ) -Wall -Wextra $< -o .bin/$@
11- ./.bin/test
14+ $(COMPILE ) $(LIB_BOOST_TEST ) $< -o .bin/$@
15+ time ./.bin/$@
16+
17+ test-with-optimization : test/test.cpp timsort.hpp .bin
18+ $(COMPILE ) $(OPTIMIZE ) $(LIB_BOOST_TEST ) $< -o .bin/$@
19+ time ./.bin/$@
1220
1321test-with-std-move : test/test.cpp timsort.hpp .bin
14- $(CXX ) -I. $(LIB_BOOST_TEST ) $( CXXFLAGS ) -std=c++11 -Wall -Wextra $< -o .bin/$@
15- ./.bin/test
22+ $(COMPILE ) $(LIB_BOOST_TEST ) -std=c++11 -DENABLE_STD_MOVE $< -o .bin/$@
23+ time ./.bin/$@
1624
1725bench : example/bench.cpp timsort.hpp .bin
18- $(CXX ) -I. $( CXXFLAGS ) -DNDEBUG -O2 -Wall -Wextra $< -o .bin/$@
26+ $(COMPILE ) $( OPTIMIZE ) $< -o .bin/$@
1927 $(CXX ) -v
20- ./.bin/bench
28+ ./.bin/$@
2129
2230.PHONY : test bench
You can’t perform that action at this time.
0 commit comments