forked from boostorg/regex
commit of split-config, including any changes required to existing libraries (mainly regex).
[SVN r11138]
This commit is contained in:
@ -4,8 +4,8 @@ subproject libs/regex/example ;
|
||||
exe timer : timer/regex_timer.cpp
|
||||
<lib>../build/libboost_regex$(SUFLIB)
|
||||
:
|
||||
<include>$(BOOST_ROOT)
|
||||
<define>BOOST_RE_NO_LIB=1
|
||||
<include>../../../
|
||||
<define>BOOST_REGEX_NO_LIB=1
|
||||
:
|
||||
debug
|
||||
<runtime-link>dynamic
|
||||
@ -14,8 +14,8 @@ exe timer : timer/regex_timer.cpp
|
||||
exe jgrep : jgrep/jgrep.cpp jgrep/main.cpp
|
||||
<lib>../build/libboost_regex$(SUFLIB)
|
||||
:
|
||||
<include>$(BOOST_ROOT)
|
||||
<define>BOOST_RE_NO_LIB=1
|
||||
<include>../../../
|
||||
<define>BOOST_REGEX_NO_LIB=1
|
||||
:
|
||||
debug
|
||||
<runtime-link>dynamic
|
||||
@ -24,8 +24,8 @@ exe jgrep : jgrep/jgrep.cpp jgrep/main.cpp
|
||||
exe credit_card_example : snippets/credit_card_example.cpp
|
||||
<lib>../build/libboost_regex$(SUFLIB)
|
||||
:
|
||||
<include>$(BOOST_ROOT)
|
||||
<define>BOOST_RE_NO_LIB=1
|
||||
<include>../../../
|
||||
<define>BOOST_REGEX_NO_LIB=1
|
||||
:
|
||||
debug
|
||||
<runtime-link>dynamic
|
||||
@ -35,8 +35,8 @@ exe credit_card_example : snippets/credit_card_example.cpp
|
||||
exe partial_regex_grep : snippets/partial_regex_grep.cpp
|
||||
<lib>../build/libboost_regex$(SUFLIB)
|
||||
:
|
||||
<include>$(BOOST_ROOT)
|
||||
<define>BOOST_RE_NO_LIB=1
|
||||
<include>../../../
|
||||
<define>BOOST_REGEX_NO_LIB=1
|
||||
:
|
||||
debug
|
||||
<runtime-link>dynamic
|
||||
@ -45,8 +45,8 @@ exe partial_regex_grep : snippets/partial_regex_grep.cpp
|
||||
exe partial_regex_match : snippets/partial_regex_match.cpp
|
||||
<lib>../build/libboost_regex$(SUFLIB)
|
||||
:
|
||||
<include>$(BOOST_ROOT)
|
||||
<define>BOOST_RE_NO_LIB=1
|
||||
<include>../../../
|
||||
<define>BOOST_REGEX_NO_LIB=1
|
||||
:
|
||||
debug
|
||||
<runtime-link>dynamic
|
||||
@ -55,8 +55,8 @@ exe partial_regex_match : snippets/partial_regex_match.cpp
|
||||
exe regex_grep_example_1 : snippets/regex_grep_example_1.cpp
|
||||
<lib>../build/libboost_regex$(SUFLIB)
|
||||
:
|
||||
<include>$(BOOST_ROOT)
|
||||
<define>BOOST_RE_NO_LIB=1
|
||||
<include>../../../
|
||||
<define>BOOST_REGEX_NO_LIB=1
|
||||
:
|
||||
debug
|
||||
<runtime-link>dynamic
|
||||
@ -65,8 +65,8 @@ exe regex_grep_example_1 : snippets/regex_grep_example_1.cpp
|
||||
exe regex_grep_example_2 : snippets/regex_grep_example_2.cpp
|
||||
<lib>../build/libboost_regex$(SUFLIB)
|
||||
:
|
||||
<include>$(BOOST_ROOT)
|
||||
<define>BOOST_RE_NO_LIB=1
|
||||
<include>../../../
|
||||
<define>BOOST_REGEX_NO_LIB=1
|
||||
:
|
||||
debug
|
||||
<runtime-link>dynamic
|
||||
@ -75,8 +75,8 @@ exe regex_grep_example_2 : snippets/regex_grep_example_2.cpp
|
||||
exe regex_grep_example_3 : snippets/regex_grep_example_3.cpp
|
||||
<lib>../build/libboost_regex$(SUFLIB)
|
||||
:
|
||||
<include>$(BOOST_ROOT)
|
||||
<define>BOOST_RE_NO_LIB=1
|
||||
<include>../../../
|
||||
<define>BOOST_REGEX_NO_LIB=1
|
||||
:
|
||||
debug
|
||||
<runtime-link>dynamic
|
||||
@ -85,8 +85,8 @@ exe regex_grep_example_3 : snippets/regex_grep_example_3.cpp
|
||||
exe regex_grep_example_4 : snippets/regex_grep_example_4.cpp
|
||||
<lib>../build/libboost_regex$(SUFLIB)
|
||||
:
|
||||
<include>$(BOOST_ROOT)
|
||||
<define>BOOST_RE_NO_LIB=1
|
||||
<include>../../../
|
||||
<define>BOOST_REGEX_NO_LIB=1
|
||||
:
|
||||
debug
|
||||
<runtime-link>dynamic
|
||||
@ -95,8 +95,8 @@ exe regex_grep_example_4 : snippets/regex_grep_example_4.cpp
|
||||
exe regex_match_example : snippets/regex_match_example.cpp
|
||||
<lib>../build/libboost_regex$(SUFLIB)
|
||||
:
|
||||
<include>$(BOOST_ROOT)
|
||||
<define>BOOST_RE_NO_LIB=1
|
||||
<include>../../../
|
||||
<define>BOOST_REGEX_NO_LIB=1
|
||||
:
|
||||
debug
|
||||
<runtime-link>dynamic
|
||||
@ -105,8 +105,8 @@ exe regex_match_example : snippets/regex_match_example.cpp
|
||||
exe regex_merge_example : snippets/regex_merge_example.cpp
|
||||
<lib>../build/libboost_regex$(SUFLIB)
|
||||
:
|
||||
<include>$(BOOST_ROOT)
|
||||
<define>BOOST_RE_NO_LIB=1
|
||||
<include>../../../
|
||||
<define>BOOST_REGEX_NO_LIB=1
|
||||
:
|
||||
debug
|
||||
<runtime-link>dynamic
|
||||
@ -115,8 +115,8 @@ exe regex_merge_example : snippets/regex_merge_example.cpp
|
||||
exe regex_search_example : snippets/regex_search_example.cpp
|
||||
<lib>../build/libboost_regex$(SUFLIB)
|
||||
:
|
||||
<include>$(BOOST_ROOT)
|
||||
<define>BOOST_RE_NO_LIB=1
|
||||
<include>../../../
|
||||
<define>BOOST_REGEX_NO_LIB=1
|
||||
:
|
||||
debug
|
||||
<runtime-link>dynamic
|
||||
@ -125,8 +125,8 @@ exe regex_search_example : snippets/regex_search_example.cpp
|
||||
exe regex_split_example_1 : snippets/regex_split_example_1.cpp
|
||||
<lib>../build/libboost_regex$(SUFLIB)
|
||||
:
|
||||
<include>$(BOOST_ROOT)
|
||||
<define>BOOST_RE_NO_LIB=1
|
||||
<include>../../../
|
||||
<define>BOOST_REGEX_NO_LIB=1
|
||||
:
|
||||
debug
|
||||
<runtime-link>dynamic
|
||||
@ -135,8 +135,8 @@ exe regex_split_example_1 : snippets/regex_split_example_1.cpp
|
||||
exe regex_split_example_2 : snippets/regex_split_example_2.cpp
|
||||
<lib>../build/libboost_regex$(SUFLIB)
|
||||
:
|
||||
<include>$(BOOST_ROOT)
|
||||
<define>BOOST_RE_NO_LIB=1
|
||||
<include>../../../
|
||||
<define>BOOST_REGEX_NO_LIB=1
|
||||
:
|
||||
debug
|
||||
<runtime-link>dynamic
|
||||
|
@ -1,42 +0,0 @@
|
||||
|
||||
# very basic makefile for jgrep
|
||||
#
|
||||
|
||||
CXX=@CXX@
|
||||
CXXFLAGS=@CXXFLAGS@
|
||||
LIBS=@LIBS@
|
||||
EXE=@ac_exe_ext@
|
||||
OBJ=@ac_obj_ext@
|
||||
|
||||
LIBDEP=../../build/libboost_regex.a ../../../../boost/regex/detail/regex_options.hpp ../../../../boost/regex/detail/regex_config.hpp
|
||||
|
||||
jgrep$(EXE) : jgrep$(OBJ) main$(OBJ)
|
||||
$(CXX) -o jgrep$(EXE) jgrep$(OBJ) main$(OBJ) -L../../build -lboost_regex $(LIBS)
|
||||
|
||||
jgrep$(OBJ) : jgrep.cpp jgrep.h $(LIBDEP)
|
||||
$(CXX) -c $(CXXFLAGS) -I../../../../ -I./ jgrep.cpp
|
||||
|
||||
main$(OBJ) : main.cpp jgrep.h $(LIBDEP)
|
||||
$(CXX) -c $(CXXFLAGS) -I../../../../ -I./ main.cpp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <list>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <iterator>
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
boost::regex e("<\\s*A\\s+[^>]*href\\s*=\\s*\"([^\"]*)\"",
|
||||
|
@ -1,39 +0,0 @@
|
||||
|
||||
# very basic makefile for timer
|
||||
#
|
||||
CXX=@CXX@
|
||||
CXXFLAGS=@CXXFLAGS@
|
||||
LIBS=@LIBS@
|
||||
EXE=@ac_exe_ext@
|
||||
OBJ=@ac_obj_ext@
|
||||
|
||||
LIBDEP=../../build/libboost_regex.a ../../../../boost/regex/detail/regex_options.hpp ../../../../boost/regex/detail/regex_config.hpp
|
||||
|
||||
regex_timer$(EXE) : regex_timer$(OBJ)
|
||||
$(CXX) -o timer$(EXE) regex_timer$(OBJ) -L../../build -lboost_regex $(LIBS)
|
||||
|
||||
regex_timer$(OBJ) : regex_timer.cpp $(LIBDEP)
|
||||
$(CXX) -c $(CXXFLAGS) -DSTRICT -I../../../../ -I./ regex_timer.cpp
|
||||
|
||||
timer$(OBJ) : ../../../timer/timer.cpp $(LIBDEP)
|
||||
$(CXX) -c $(CXXFLAGS) -DSTRICT -I../../../../ -I./ ../../../timer/timer.cpp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -28,6 +28,7 @@ using std::endl;
|
||||
#include <algorithm>
|
||||
#include <string>
|
||||
#include <deque>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/regex.hpp>
|
||||
#include <boost/timer.hpp>
|
||||
#include <boost/smart_ptr.hpp>
|
||||
@ -37,7 +38,7 @@ using std::endl;
|
||||
using namespace boost;
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_RE_NO_WCSTRING
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
ostream& operator << (ostream& os, const std::wstring& s)
|
||||
{
|
||||
std::wstring::const_iterator i, j;
|
||||
@ -90,7 +91,7 @@ int main()
|
||||
{
|
||||
boost::regex ex;
|
||||
boost::match_results<std::string::const_iterator> sm;
|
||||
#ifndef BOOST_RE_NO_WCSTRING
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
std::wstring ws1, ws2;
|
||||
boost::wregex wex;
|
||||
boost::match_results<std::wstring::const_iterator> wsm;
|
||||
@ -112,13 +113,13 @@ int main()
|
||||
getline(cin, s1);
|
||||
if(s1 == "quit")
|
||||
break;
|
||||
#ifndef BOOST_RE_NO_WCSTRING
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
ws1.erase();
|
||||
std::copy(s1.begin(), s1.end(), string_out_iterator<std::wstring>(ws1));
|
||||
#endif
|
||||
try{
|
||||
ex.assign(s1);
|
||||
#ifndef BOOST_RE_NO_WCSTRING
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
wex.assign(ws1);
|
||||
#endif
|
||||
}
|
||||
@ -145,7 +146,7 @@ int main()
|
||||
if(s2 == "quit")
|
||||
break;
|
||||
|
||||
#ifndef BOOST_RE_NO_WCSTRING
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
ws2.erase();
|
||||
std::copy(s2.begin(), s2.end(), string_out_iterator<std::wstring>(ws2));
|
||||
#endif
|
||||
@ -156,7 +157,7 @@ int main()
|
||||
iters = 10;
|
||||
tim = 1.1;
|
||||
|
||||
#if defined(_WIN32) && defined(BOOST_RE_LOCALE_W32)
|
||||
#if defined(_WIN32) && defined(BOOST_REGEX_USE_WIN32_LOCALE)
|
||||
MSG msg;
|
||||
PeekMessage(&msg, 0, 0, 0, 0);
|
||||
Sleep(0);
|
||||
@ -194,7 +195,7 @@ int main()
|
||||
cout << "\" (matched=" << sm[-2].matched << ")" << endl << endl;
|
||||
}
|
||||
|
||||
#ifndef BOOST_RE_NO_WCSTRING
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
// measure time interval for boost::wregex
|
||||
iters = 10;
|
||||
tim = 1.1;
|
||||
|
Reference in New Issue
Block a user