mirror of
https://github.com/CrowCpp/Crow.git
synced 2024-06-07 21:10:44 +00:00
Merge branch 'master' into cors-middleware
This commit is contained in:
commit
870028ec99
@ -107,7 +107,7 @@ namespace crow
|
||||
// should not add an item below this line: used for array count
|
||||
};
|
||||
|
||||
const char* method_strings[] =
|
||||
constexpr const char* method_strings[] =
|
||||
{
|
||||
"DELETE",
|
||||
"GET",
|
||||
|
@ -130,12 +130,17 @@ namespace crow
|
||||
{
|
||||
url.clear();
|
||||
raw_url.clear();
|
||||
header_building_state = 0;
|
||||
header_field.clear();
|
||||
header_value.clear();
|
||||
headers.clear();
|
||||
url_params.clear();
|
||||
body.clear();
|
||||
header_building_state = 0;
|
||||
qs_point = 0;
|
||||
http_major = 0;
|
||||
http_minor = 0;
|
||||
keep_alive = false;
|
||||
close_connection = false;
|
||||
}
|
||||
|
||||
inline void process_header()
|
||||
|
@ -17,6 +17,7 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
endif()
|
||||
|
||||
add_subdirectory(template)
|
||||
add_subdirectory(multi_file)
|
||||
if (CROW_ENABLE_SSL)
|
||||
add_subdirectory(ssl)
|
||||
endif()
|
||||
|
6
tests/multi_file/CMakeLists.txt
Normal file
6
tests/multi_file/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
project(test_multi_file)
|
||||
|
||||
file (GLOB_RECURSE SRC ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
|
||||
add_executable(${PROJECT_NAME} ${SRC})
|
||||
target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
target_link_libraries(${PROJECT_NAME} PUBLIC Crow::Crow)
|
15
tests/multi_file/main.cpp
Normal file
15
tests/multi_file/main.cpp
Normal file
@ -0,0 +1,15 @@
|
||||
// Test of a project containing more than 1 source file which includes Crow headers.
|
||||
// The test succeeds if the project is linked successfully.
|
||||
#include "crow.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
crow::SimpleApp app;
|
||||
|
||||
CROW_ROUTE(app, "/")
|
||||
([]() {
|
||||
return "Hello, world!";
|
||||
});
|
||||
|
||||
app.port(18080).run();
|
||||
}
|
1
tests/multi_file/secondary.cpp
Normal file
1
tests/multi_file/secondary.cpp
Normal file
@ -0,0 +1 @@
|
||||
#include <crow.h>
|
Loading…
Reference in New Issue
Block a user