Modifiy CMakeLists.txt
This commit is contained in:
parent
82855fc86e
commit
80542e42c2
|
@ -4,9 +4,9 @@ project (DROGON CXX)
|
|||
|
||||
|
||||
|
||||
EXEC_PROGRAM (gcc ARGS "--version | grep '^gcc'|awk '{print $3}' | sed s'/)//g'" OUTPUT_VARIABLE version)
|
||||
EXEC_PROGRAM (gcc ARGS "--version | grep '^gcc'|awk '{print $3}' | sed s'/)//g' | sed s'/-.*//g'" OUTPUT_VARIABLE version)
|
||||
MESSAGE(STATUS "This is gcc version:: " ${version})
|
||||
if(version LESS 4.7.0)
|
||||
if(version LESS 4.9.0)
|
||||
MESSAGE(STATUS "gcc is too old")
|
||||
stop()
|
||||
elseif (version LESS 6.1.0)
|
||||
|
|
|
@ -150,7 +150,7 @@ void HttpAppFrameworkImpl::initRegex() {
|
|||
for(auto binder:_apiCtrlVector)
|
||||
{
|
||||
std::regex reg("\\(\\[\\^/\\]\\*\\)");
|
||||
std::string tmp=std::regex_replace(binder.pathParameterPattern,reg,std::string("[^/]*"));
|
||||
std::string tmp=std::regex_replace(binder.pathParameterPattern,reg,"[^/]*");
|
||||
regString.append("(").append(tmp).append(")|");
|
||||
}
|
||||
if(regString.length()>0)
|
||||
|
@ -227,7 +227,7 @@ void HttpAppFrameworkImpl::addApiPath(const std::string &path,
|
|||
_binder.queryParametersPlaces=std::move(parametersPlaces);
|
||||
_binder.binderPtr=binder;
|
||||
_binder.filtersName=filters;
|
||||
_binder.pathParameterPattern=std::regex_replace(originPath,regex,std::string("([^/]*)"));
|
||||
_binder.pathParameterPattern=std::regex_replace(originPath,regex,"([^/]*)");
|
||||
std::lock_guard<std::mutex> guard(_apiCtrlMutex);
|
||||
_apiCtrlVector.push_back(std::move(_binder));
|
||||
}
|
||||
|
|
2
trantor
2
trantor
|
@ -1 +1 @@
|
|||
Subproject commit 4bcf7b3ce13f011d05dedf406a1975b2881e43ca
|
||||
Subproject commit 6c401f8f83b94d60c2dca60e481cab1a786485e4
|
Loading…
Reference in New Issue