mirror of
https://github.com/drogonframework/drogon.git
synced 2025-08-10 00:01:14 -04:00
fix precompiled bugs
This commit is contained in:
parent
3041547b4e
commit
82855fc86e
@ -35,11 +35,11 @@ find_package (OpenSSL)
|
||||
if(OpenSSL_FOUND)
|
||||
#add_definitions(-DUSE_OPENSSL)
|
||||
set(DEFS "USE_OPENSSL;${DEFS}")
|
||||
endif()
|
||||
message(STATUS "openssl inc path:" ${OPENSSL_INCLUDE_DIR})
|
||||
include_directories(${OPENSSL_INCLUDE_DIR})
|
||||
link_directories(${OPENSSL_SSL_LIBRARY})
|
||||
link_directories(${OPENSSL_CRYPTO_LIBRARY})
|
||||
endif()
|
||||
message(STATUS "openssl inc path:" ${OPENSSL_INCLUDE_DIR})
|
||||
|
||||
find_package(Boost)
|
||||
if(Boost_FOUND)
|
||||
|
@ -170,7 +170,7 @@ void create_controller::createApiController(std::vector<std::string> &apiClasses
|
||||
void create_controller::createApiController(const std::string &className)
|
||||
{
|
||||
std::regex regex("::");
|
||||
std::string ctlName=std::regex_replace(className,regex,"_");
|
||||
std::string ctlName=std::regex_replace(className,regex,std::string("_"));
|
||||
|
||||
std::cout<<"create api controller:"<<className<<std::endl;
|
||||
std::string headFileName=ctlName+".h";
|
||||
@ -241,4 +241,4 @@ void create_controller::newApiControllerSourceFile(std::ofstream &file,const std
|
||||
}
|
||||
|
||||
file<<"//add definition of your processing function here\n";
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,7 @@
|
||||
link_libraries(drogon trantor uuid pthread jsoncpp ssl crypto dl)
|
||||
|
||||
link_libraries(drogon trantor uuid pthread jsoncpp dl)
|
||||
if(OpenSSL_FOUND)
|
||||
link_libraries(ssl crypto)
|
||||
endif()
|
||||
FILE(GLOB SCP_LIST ${CMAKE_CURRENT_SOURCE_DIR}/static_link_example/*.csp)
|
||||
foreach(cspFile ${SCP_LIST})
|
||||
message(STATUS "cspFile:" ${cspFile})
|
||||
|
@ -19,18 +19,20 @@
|
||||
|
||||
#ifdef USE_STD_ANY
|
||||
|
||||
#include <any>
|
||||
using std::any;
|
||||
using std::any_cast;
|
||||
#include <any>
|
||||
using std::any;
|
||||
using std::any_cast;
|
||||
|
||||
#elif USE_BOOST
|
||||
#else
|
||||
#ifdef USE_BOOST
|
||||
|
||||
#include <boost/any.hpp>
|
||||
using boost::any;
|
||||
using boost::any_cast;
|
||||
#include <boost/any.hpp>
|
||||
using boost::any;
|
||||
using boost::any_cast;
|
||||
|
||||
#else
|
||||
#error,must use c++17 or boost
|
||||
#else
|
||||
#error,must use c++17 or boost
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -22,18 +22,20 @@
|
||||
|
||||
#ifdef USE_STD_ANY
|
||||
|
||||
#include <any>
|
||||
using std::any;
|
||||
using std::any_cast;
|
||||
|
||||
#elif USE_BOOST
|
||||
|
||||
#include <boost/any.hpp>
|
||||
using boost::any;
|
||||
using boost::any_cast;
|
||||
#include <any>
|
||||
using std::any;
|
||||
using std::any_cast;
|
||||
|
||||
#else
|
||||
#error,must use c++17 or boost
|
||||
#ifdef USE_BOOST
|
||||
|
||||
#include <boost/any.hpp>
|
||||
using boost::any;
|
||||
using boost::any_cast;
|
||||
|
||||
#else
|
||||
#error,must use c++17 or boost
|
||||
#endif
|
||||
#endif
|
||||
|
||||
typedef std::map<std::string,any> SessionMap;
|
||||
|
@ -102,7 +102,7 @@ namespace drogon
|
||||
std::set<std::string> _fileTypeSet={"html","jpg"};
|
||||
std::string _rootPath=".";
|
||||
|
||||
std::atomic_bool _running=false;
|
||||
std::atomic_bool _running;
|
||||
|
||||
//tool funcs
|
||||
|
||||
@ -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 tmp=std::regex_replace(binder.pathParameterPattern,reg,std::string("[^/]*"));
|
||||
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,"([^/]*)");
|
||||
_binder.pathParameterPattern=std::regex_replace(originPath,regex,std::string("([^/]*)"));
|
||||
std::lock_guard<std::mutex> guard(_apiCtrlMutex);
|
||||
_apiCtrlVector.push_back(std::move(_binder));
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
#include "Utilities.h"
|
||||
#include <string.h>
|
||||
#ifdef USE_OPENSSL
|
||||
#include <openssl/sha.h>
|
||||
|
||||
#endif
|
||||
static const std::string base64_chars =
|
||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
||||
"abcdefghijklmnopqrstuvwxyz"
|
||||
|
2
trantor
2
trantor
@ -1 +1 @@
|
||||
Subproject commit 2816cb614f874898ed5bdc99211fd6a48ea711c7
|
||||
Subproject commit 4bcf7b3ce13f011d05dedf406a1975b2881e43ca
|
Loading…
x
Reference in New Issue
Block a user