module restructuring

This commit is contained in:
lganzzzo 2019-01-21 05:03:23 +02:00
parent 3c1e3b2f5d
commit 6dc0898ef7
221 changed files with 377 additions and 348 deletions

9
.gitignore vendored
View File

@ -30,3 +30,12 @@
*.exe
*.out
*.app
#idea
.idea/
cmake-build-debug/
#local build
build/
srt/build/
test/build/

View File

@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
file(STRINGS "${CMAKE_CURRENT_LIST_DIR}/core/base/Environment.hpp" OATPP_VERSION_MACRO REGEX "#define OATPP_VERSION \"[0-9]+.[0-9]+.[0-9]+\"$")
file(STRINGS "${CMAKE_CURRENT_LIST_DIR}/src/oatpp/core/base/Environment.hpp" OATPP_VERSION_MACRO REGEX "#define OATPP_VERSION \"[0-9]+.[0-9]+.[0-9]+\"$")
string(REGEX REPLACE "#define OATPP_VERSION \"([0-9]+.[0-9]+.[0-9]+)\"$" "\\1" oatpp_VERSION "${OATPP_VERSION_MACRO}")
project(oatpp VERSION ${oatpp_VERSION} LANGUAGES CXX)
@ -9,297 +9,9 @@ option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
option(OATPP_INSTALL "Create installation target for oat++" ON)
option(OATPP_BUILD_TESTS "Create test target for oat++" ON)
add_library(oatpp
algorithm/CRC.cpp
algorithm/CRC.hpp
codegen/codegen_define_ApiClient_.hpp
codegen/codegen_define_ApiController_.hpp
codegen/codegen_define_DTO_.hpp
codegen/codegen_undef_ApiClient_.hpp
codegen/codegen_undef_ApiController_.hpp
codegen/codegen_undef_DTO_.hpp
core/Types.cpp
core/Types.hpp
core/async/Coroutine.cpp
core/async/Coroutine.hpp
core/async/Processor.cpp
core/async/Processor.hpp
core/async/Executor.cpp
core/async/Executor.hpp
core/base/CommandLineArguments.cpp
core/base/CommandLineArguments.hpp
core/base/Config.hpp
core/base/Controllable.cpp
core/base/Controllable.hpp
core/base/Environment.cpp
core/base/Environment.hpp
core/base/StrBuffer.cpp
core/base/StrBuffer.hpp
core/base/memory/Allocator.cpp
core/base/memory/Allocator.hpp
core/base/memory/MemoryPool.cpp
core/base/memory/MemoryPool.hpp
core/base/memory/ObjectPool.cpp
core/base/memory/ObjectPool.hpp
core/collection/FastQueue.cpp
core/collection/FastQueue.hpp
core/collection/LinkedList.cpp
core/collection/LinkedList.hpp
core/collection/ListMap.cpp
core/collection/ListMap.hpp
core/concurrency/Runnable.cpp
core/concurrency/Runnable.hpp
core/concurrency/SpinLock.cpp
core/concurrency/SpinLock.hpp
core/concurrency/Thread.cpp
core/concurrency/Thread.hpp
core/data/buffer/FIFOBuffer.cpp
core/data/buffer/FIFOBuffer.hpp
core/data/buffer/IOBuffer.cpp
core/data/buffer/IOBuffer.hpp
core/data/mapping/ObjectMapper.cpp
core/data/mapping/ObjectMapper.hpp
core/data/mapping/type/List.cpp
core/data/mapping/type/List.hpp
core/data/mapping/type/ListMap.cpp
core/data/mapping/type/ListMap.hpp
core/data/mapping/type/Object.cpp
core/data/mapping/type/Object.hpp
core/data/mapping/type/Primitive.cpp
core/data/mapping/type/Primitive.hpp
core/data/mapping/type/Type.cpp
core/data/mapping/type/Type.hpp
core/data/share/MemoryLabel.cpp
core/data/share/MemoryLabel.hpp
core/data/stream/ChunkedBuffer.cpp
core/data/stream/ChunkedBuffer.hpp
core/data/stream/Delegate.cpp
core/data/stream/Delegate.hpp
core/data/stream/Stream.cpp
core/data/stream/Stream.hpp
core/data/stream/StreamBufferedProxy.cpp
core/data/stream/StreamBufferedProxy.hpp
core/macro/basic.hpp
core/macro/codegen.hpp
core/macro/component.hpp
core/os/io/Library.cpp
core/os/io/Library.hpp
core/parser/ParsingCaret.cpp
core/parser/ParsingCaret.hpp
core/utils/ConversionUtils.cpp
core/utils/ConversionUtils.hpp
encoding/Base64.cpp
encoding/Base64.hpp
encoding/Hex.cpp
encoding/Hex.hpp
encoding/Unicode.cpp
encoding/Unicode.hpp
network/Connection.cpp
network/Connection.hpp
network/ConnectionProvider.cpp
network/ConnectionProvider.hpp
network/Url.cpp
network/Url.hpp
network/client/SimpleTCPConnectionProvider.cpp
network/client/SimpleTCPConnectionProvider.hpp
network/server/ConnectionHandler.cpp
network/server/ConnectionHandler.hpp
network/server/Server.cpp
network/server/Server.hpp
network/server/SimpleTCPConnectionProvider.cpp
network/server/SimpleTCPConnectionProvider.hpp
network/virtual_/Interface.cpp
network/virtual_/Interface.hpp
network/virtual_/Pipe.cpp
network/virtual_/Pipe.hpp
network/virtual_/Socket.cpp
network/virtual_/Socket.hpp
network/virtual_/client/ConnectionProvider.cpp
network/virtual_/client/ConnectionProvider.hpp
network/virtual_/server/ConnectionProvider.cpp
network/virtual_/server/ConnectionProvider.hpp
parser/json/Utils.cpp
parser/json/Utils.hpp
parser/json/mapping/Deserializer.cpp
parser/json/mapping/Deserializer.hpp
parser/json/mapping/ObjectMapper.cpp
parser/json/mapping/ObjectMapper.hpp
parser/json/mapping/Serializer.cpp
parser/json/mapping/Serializer.hpp
web/client/ApiClient.cpp
web/client/ApiClient.hpp
web/client/HttpRequestExecutor.cpp
web/client/HttpRequestExecutor.hpp
web/client/RequestExecutor.cpp
web/client/RequestExecutor.hpp
web/protocol/CommunicationError.cpp
web/protocol/CommunicationError.hpp
web/protocol/http/Http.cpp
web/protocol/http/Http.hpp
web/protocol/http/incoming/BodyDecoder.cpp
web/protocol/http/incoming/BodyDecoder.hpp
web/protocol/http/incoming/Request.cpp
web/protocol/http/incoming/Request.hpp
web/protocol/http/incoming/RequestHeadersReader.cpp
web/protocol/http/incoming/RequestHeadersReader.hpp
web/protocol/http/incoming/Response.cpp
web/protocol/http/incoming/Response.hpp
web/protocol/http/incoming/ResponseHeadersReader.cpp
web/protocol/http/incoming/ResponseHeadersReader.hpp
web/protocol/http/incoming/SimpleBodyDecoder.cpp
web/protocol/http/incoming/SimpleBodyDecoder.hpp
web/protocol/http/outgoing/Body.cpp
web/protocol/http/outgoing/Body.hpp
web/protocol/http/outgoing/BufferBody.cpp
web/protocol/http/outgoing/BufferBody.hpp
web/protocol/http/outgoing/ChunkedBufferBody.cpp
web/protocol/http/outgoing/ChunkedBufferBody.hpp
web/protocol/http/outgoing/CommunicationUtils.cpp
web/protocol/http/outgoing/CommunicationUtils.hpp
web/protocol/http/outgoing/DtoBody.cpp
web/protocol/http/outgoing/DtoBody.hpp
web/protocol/http/outgoing/Request.cpp
web/protocol/http/outgoing/Request.hpp
web/protocol/http/outgoing/Response.cpp
web/protocol/http/outgoing/Response.hpp
web/protocol/http/outgoing/ResponseFactory.cpp
web/protocol/http/outgoing/ResponseFactory.hpp
web/server/AsyncHttpConnectionHandler.cpp
web/server/AsyncHttpConnectionHandler.hpp
web/server/HttpConnectionHandler.cpp
web/server/HttpConnectionHandler.hpp
web/server/HttpProcessor.cpp
web/server/HttpProcessor.hpp
web/server/HttpRouter.cpp
web/server/HttpRouter.hpp
web/server/api/ApiController.cpp
web/server/api/ApiController.hpp
web/server/api/Endpoint.cpp
web/server/api/Endpoint.hpp
web/server/handler/ErrorHandler.cpp
web/server/handler/ErrorHandler.hpp
web/server/handler/Interceptor.cpp
web/server/handler/Interceptor.hpp
web/url/mapping/Pattern.cpp
web/url/mapping/Pattern.hpp
web/url/mapping/Router.cpp
web/url/mapping/Router.hpp
web/url/mapping/Subscriber.cpp
web/url/mapping/Subscriber.hpp
)
set(CMAKE_THREAD_PREFER_PTHREAD ON)
find_package(Threads REQUIRED)
target_link_libraries(oatpp PUBLIC ${CMAKE_THREAD_LIBS_INIT})
target_include_directories(oatpp PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
set_target_properties(oatpp PROPERTIES
CXX_STANDARD 11
CXX_EXTENSIONS OFF
CXX_STANDARD_REQUIRED ON
)
add_library(oatpp::oatpp ALIAS oatpp)
if(OATPP_INSTALL)
include(GNUInstallDirs)
install(TARGETS oatpp
EXPORT oatpp-targets
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
install(DIRECTORY algorithm codegen core encoding network parser web
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/oatpp
FILES_MATCHING PATTERN "*.hpp"
)
install(EXPORT oatpp-targets
FILE oatppTargets.cmake
NAMESPACE oatpp::
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/oatpp
)
include(CMakePackageConfigHelpers)
string(CONCAT oatppConfig_cmake_in
"@PACKAGE_INIT@\n"
"\n"
"set_and_check(oatpp_INCLUDE_DIRS \"\$\{PACKAGE_PREFIX_DIR\}/include\")\n"
"if(NOT TARGET oatpp::oatpp)\n"
" include(\"\$\{CMAKE_CURRENT_LIST_DIR\}/oatppTargets.cmake\")\n"
"endif()\n"
"set(oatpp_LIBRARIES \"oatpp::oatpp\")\n"
)
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/oatppConfig.cmake.in" "${oatppConfig_cmake_in}")
configure_package_config_file(${CMAKE_CURRENT_BINARY_DIR}/oatppConfig.cmake.in
oatppConfig.cmake
INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/oatpp"
NO_CHECK_REQUIRED_COMPONENTS_MACRO
)
write_basic_package_version_file(oatppConfigVersion.cmake
VERSION ${oatpp_VERSION}
COMPATIBILITY SameMajorVersion
)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/oatppConfig.cmake" "${CMAKE_CURRENT_BINARY_DIR}/oatppConfigVersion.cmake"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/oatpp"
)
endif()
add_subdirectory(src)
if(OATPP_BUILD_TESTS)
enable_testing()
add_executable(oatppAllTests
test/AllTestsMain.cpp
test/Checker.cpp
test/Checker.hpp
test/UnitTest.cpp
test/UnitTest.hpp
test/core/base/CommandLineArgumentsTest.cpp
test/core/base/CommandLineArgumentsTest.hpp
test/core/base/RegRuleTest.cpp
test/core/base/RegRuleTest.hpp
test/core/base/collection/LinkedListTest.cpp
test/core/base/collection/LinkedListTest.hpp
test/core/base/memory/MemoryPoolTest.cpp
test/core/base/memory/MemoryPoolTest.hpp
test/core/base/memory/PerfTest.cpp
test/core/base/memory/PerfTest.hpp
test/core/data/mapping/type/TypeTest.cpp
test/core/data/mapping/type/TypeTest.hpp
test/core/data/share/MemoryLabelTest.cpp
test/core/data/share/MemoryLabelTest.hpp
test/encoding/Base64Test.cpp
test/encoding/Base64Test.hpp
test/encoding/UnicodeTest.cpp
test/encoding/UnicodeTest.hpp
test/network/virtual_/InterfaceTest.cpp
test/network/virtual_/InterfaceTest.hpp
test/network/virtual_/PipeTest.cpp
test/network/virtual_/PipeTest.hpp
test/parser/json/mapping/DTOMapperPerfTest.cpp
test/parser/json/mapping/DTOMapperPerfTest.hpp
test/parser/json/mapping/DTOMapperTest.cpp
test/parser/json/mapping/DTOMapperTest.hpp
test/parser/json/mapping/DeserializerTest.cpp
test/parser/json/mapping/DeserializerTest.hpp
test/web/FullAsyncTest.cpp
test/web/FullAsyncTest.hpp
test/web/FullTest.cpp
test/web/FullTest.hpp
test/web/app/Client.hpp
test/web/app/Controller.hpp
test/web/app/ControllerAsync.hpp
test/web/app/DTOs.hpp
)
target_link_libraries(oatppAllTests PRIVATE oatpp)
set_target_properties(oatppAllTests PROPERTIES
CXX_STANDARD 11
CXX_EXTENSIONS OFF
CXX_STANDARD_REQUIRED ON
)
target_compile_definitions(oatppAllTests
PRIVATE OATPP_ENABLE_ALL_TESTS_MAIN
)
add_test(oatppAllTests oatppAllTests)
add_subdirectory(test)
endif()

260
src/CMakeLists.txt Normal file
View File

@ -0,0 +1,260 @@
add_library(oatpp
oatpp/algorithm/CRC.cpp
oatpp/algorithm/CRC.hpp
oatpp/codegen/codegen_define_ApiClient_.hpp
oatpp/codegen/codegen_define_ApiController_.hpp
oatpp/codegen/codegen_define_DTO_.hpp
oatpp/codegen/codegen_undef_ApiClient_.hpp
oatpp/codegen/codegen_undef_ApiController_.hpp
oatpp/codegen/codegen_undef_DTO_.hpp
oatpp/core/Types.cpp
oatpp/core/Types.hpp
oatpp/core/async/Coroutine.cpp
oatpp/core/async/Coroutine.hpp
oatpp/core/async/Executor.cpp
oatpp/core/async/Executor.hpp
oatpp/core/async/Processor.cpp
oatpp/core/async/Processor.hpp
oatpp/core/base/CommandLineArguments.cpp
oatpp/core/base/CommandLineArguments.hpp
oatpp/core/base/Config.hpp
oatpp/core/base/Controllable.cpp
oatpp/core/base/Controllable.hpp
oatpp/core/base/Environment.cpp
oatpp/core/base/Environment.hpp
oatpp/core/base/StrBuffer.cpp
oatpp/core/base/StrBuffer.hpp
oatpp/core/base/memory/Allocator.cpp
oatpp/core/base/memory/Allocator.hpp
oatpp/core/base/memory/MemoryPool.cpp
oatpp/core/base/memory/MemoryPool.hpp
oatpp/core/base/memory/ObjectPool.cpp
oatpp/core/base/memory/ObjectPool.hpp
oatpp/core/collection/FastQueue.cpp
oatpp/core/collection/FastQueue.hpp
oatpp/core/collection/LinkedList.cpp
oatpp/core/collection/LinkedList.hpp
oatpp/core/collection/ListMap.cpp
oatpp/core/collection/ListMap.hpp
oatpp/core/concurrency/Runnable.cpp
oatpp/core/concurrency/Runnable.hpp
oatpp/core/concurrency/SpinLock.cpp
oatpp/core/concurrency/SpinLock.hpp
oatpp/core/concurrency/Thread.cpp
oatpp/core/concurrency/Thread.hpp
oatpp/core/data/buffer/FIFOBuffer.cpp
oatpp/core/data/buffer/FIFOBuffer.hpp
oatpp/core/data/buffer/IOBuffer.cpp
oatpp/core/data/buffer/IOBuffer.hpp
oatpp/core/data/mapping/ObjectMapper.cpp
oatpp/core/data/mapping/ObjectMapper.hpp
oatpp/core/data/mapping/type/List.cpp
oatpp/core/data/mapping/type/List.hpp
oatpp/core/data/mapping/type/ListMap.cpp
oatpp/core/data/mapping/type/ListMap.hpp
oatpp/core/data/mapping/type/Object.cpp
oatpp/core/data/mapping/type/Object.hpp
oatpp/core/data/mapping/type/Primitive.cpp
oatpp/core/data/mapping/type/Primitive.hpp
oatpp/core/data/mapping/type/Type.cpp
oatpp/core/data/mapping/type/Type.hpp
oatpp/core/data/share/MemoryLabel.cpp
oatpp/core/data/share/MemoryLabel.hpp
oatpp/core/data/stream/ChunkedBuffer.cpp
oatpp/core/data/stream/ChunkedBuffer.hpp
oatpp/core/data/stream/Delegate.cpp
oatpp/core/data/stream/Delegate.hpp
oatpp/core/data/stream/Stream.cpp
oatpp/core/data/stream/Stream.hpp
oatpp/core/data/stream/StreamBufferedProxy.cpp
oatpp/core/data/stream/StreamBufferedProxy.hpp
oatpp/core/macro/basic.hpp
oatpp/core/macro/codegen.hpp
oatpp/core/macro/component.hpp
oatpp/core/os/io/Library.cpp
oatpp/core/os/io/Library.hpp
oatpp/core/parser/ParsingCaret.cpp
oatpp/core/parser/ParsingCaret.hpp
oatpp/core/utils/ConversionUtils.cpp
oatpp/core/utils/ConversionUtils.hpp
oatpp/encoding/Base64.cpp
oatpp/encoding/Base64.hpp
oatpp/encoding/Hex.cpp
oatpp/encoding/Hex.hpp
oatpp/encoding/Unicode.cpp
oatpp/encoding/Unicode.hpp
oatpp/network/Connection.cpp
oatpp/network/Connection.hpp
oatpp/network/ConnectionProvider.cpp
oatpp/network/ConnectionProvider.hpp
oatpp/network/Url.cpp
oatpp/network/Url.hpp
oatpp/network/client/SimpleTCPConnectionProvider.cpp
oatpp/network/client/SimpleTCPConnectionProvider.hpp
oatpp/network/server/ConnectionHandler.cpp
oatpp/network/server/ConnectionHandler.hpp
oatpp/network/server/Server.cpp
oatpp/network/server/Server.hpp
oatpp/network/server/SimpleTCPConnectionProvider.cpp
oatpp/network/server/SimpleTCPConnectionProvider.hpp
oatpp/network/virtual_/Interface.cpp
oatpp/network/virtual_/Interface.hpp
oatpp/network/virtual_/Pipe.cpp
oatpp/network/virtual_/Pipe.hpp
oatpp/network/virtual_/Socket.cpp
oatpp/network/virtual_/Socket.hpp
oatpp/network/virtual_/client/ConnectionProvider.cpp
oatpp/network/virtual_/client/ConnectionProvider.hpp
oatpp/network/virtual_/server/ConnectionProvider.cpp
oatpp/network/virtual_/server/ConnectionProvider.hpp
oatpp/parser/json/Utils.cpp
oatpp/parser/json/Utils.hpp
oatpp/parser/json/mapping/Deserializer.cpp
oatpp/parser/json/mapping/Deserializer.hpp
oatpp/parser/json/mapping/ObjectMapper.cpp
oatpp/parser/json/mapping/ObjectMapper.hpp
oatpp/parser/json/mapping/Serializer.cpp
oatpp/parser/json/mapping/Serializer.hpp
oatpp/web/client/ApiClient.cpp
oatpp/web/client/ApiClient.hpp
oatpp/web/client/HttpRequestExecutor.cpp
oatpp/web/client/HttpRequestExecutor.hpp
oatpp/web/client/RequestExecutor.cpp
oatpp/web/client/RequestExecutor.hpp
oatpp/web/protocol/CommunicationError.cpp
oatpp/web/protocol/CommunicationError.hpp
oatpp/web/protocol/http/Http.cpp
oatpp/web/protocol/http/Http.hpp
oatpp/web/protocol/http/incoming/BodyDecoder.cpp
oatpp/web/protocol/http/incoming/BodyDecoder.hpp
oatpp/web/protocol/http/incoming/Request.cpp
oatpp/web/protocol/http/incoming/Request.hpp
oatpp/web/protocol/http/incoming/RequestHeadersReader.cpp
oatpp/web/protocol/http/incoming/RequestHeadersReader.hpp
oatpp/web/protocol/http/incoming/Response.cpp
oatpp/web/protocol/http/incoming/Response.hpp
oatpp/web/protocol/http/incoming/ResponseHeadersReader.cpp
oatpp/web/protocol/http/incoming/ResponseHeadersReader.hpp
oatpp/web/protocol/http/incoming/SimpleBodyDecoder.cpp
oatpp/web/protocol/http/incoming/SimpleBodyDecoder.hpp
oatpp/web/protocol/http/outgoing/Body.cpp
oatpp/web/protocol/http/outgoing/Body.hpp
oatpp/web/protocol/http/outgoing/BufferBody.cpp
oatpp/web/protocol/http/outgoing/BufferBody.hpp
oatpp/web/protocol/http/outgoing/ChunkedBufferBody.cpp
oatpp/web/protocol/http/outgoing/ChunkedBufferBody.hpp
oatpp/web/protocol/http/outgoing/CommunicationUtils.cpp
oatpp/web/protocol/http/outgoing/CommunicationUtils.hpp
oatpp/web/protocol/http/outgoing/DtoBody.cpp
oatpp/web/protocol/http/outgoing/DtoBody.hpp
oatpp/web/protocol/http/outgoing/Request.cpp
oatpp/web/protocol/http/outgoing/Request.hpp
oatpp/web/protocol/http/outgoing/Response.cpp
oatpp/web/protocol/http/outgoing/Response.hpp
oatpp/web/protocol/http/outgoing/ResponseFactory.cpp
oatpp/web/protocol/http/outgoing/ResponseFactory.hpp
oatpp/web/server/AsyncHttpConnectionHandler.cpp
oatpp/web/server/AsyncHttpConnectionHandler.hpp
oatpp/web/server/HttpConnectionHandler.cpp
oatpp/web/server/HttpConnectionHandler.hpp
oatpp/web/server/HttpProcessor.cpp
oatpp/web/server/HttpProcessor.hpp
oatpp/web/server/HttpRouter.cpp
oatpp/web/server/HttpRouter.hpp
oatpp/web/server/api/ApiController.cpp
oatpp/web/server/api/ApiController.hpp
oatpp/web/server/api/Endpoint.cpp
oatpp/web/server/api/Endpoint.hpp
oatpp/web/server/handler/ErrorHandler.cpp
oatpp/web/server/handler/ErrorHandler.hpp
oatpp/web/server/handler/Interceptor.cpp
oatpp/web/server/handler/Interceptor.hpp
oatpp/web/url/mapping/Pattern.cpp
oatpp/web/url/mapping/Pattern.hpp
oatpp/web/url/mapping/Router.cpp
oatpp/web/url/mapping/Router.hpp
oatpp/web/url/mapping/Subscriber.cpp
oatpp/web/url/mapping/Subscriber.hpp
)
set(CMAKE_THREAD_PREFER_PTHREAD ON)
find_package(Threads REQUIRED)
target_link_libraries(oatpp PUBLIC ${CMAKE_THREAD_LIBS_INIT})
target_include_directories(oatpp PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
set_target_properties(oatpp PROPERTIES
CXX_STANDARD 11
CXX_EXTENSIONS OFF
CXX_STANDARD_REQUIRED ON
)
add_library(oatpp::oatpp ALIAS oatpp)
add_library(oatpp-test
oatpp-test/Checker.cpp
oatpp-test/Checker.hpp
oatpp-test/UnitTest.cpp
oatpp-test/UnitTest.hpp
)
target_link_libraries(oatpp-test PUBLIC oatpp)
set_target_properties(oatpp-test PROPERTIES
CXX_STANDARD 11
CXX_EXTENSIONS OFF
CXX_STANDARD_REQUIRED ON
)
target_include_directories(oatpp-test PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
add_dependencies(oatpp-test oatpp)
add_library(oatpp::oatpp-test ALIAS oatpp-test)
if(OATPP_INSTALL)
include(GNUInstallDirs)
install(TARGETS oatpp
EXPORT oatpp-targets
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
install(DIRECTORY oatpp oatpp-test
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
FILES_MATCHING PATTERN "*.hpp"
)
install(EXPORT oatpp-targets
FILE oatppTargets.cmake
NAMESPACE oatpp::
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/oatpp
)
include(CMakePackageConfigHelpers)
string(CONCAT oatppConfig_cmake_in
"@PACKAGE_INIT@\n"
"\n"
"set_and_check(oatpp_INCLUDE_DIRS \"\$\{PACKAGE_PREFIX_DIR\}/include\")\n"
"if(NOT TARGET oatpp::oatpp)\n"
" include(\"\$\{CMAKE_CURRENT_LIST_DIR\}/oatppTargets.cmake\")\n"
"endif()\n"
"set(oatpp_LIBRARIES \"oatpp::oatpp\")\n"
)
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/oatppConfig.cmake.in" "${oatppConfig_cmake_in}")
configure_package_config_file(${CMAKE_CURRENT_BINARY_DIR}/oatppConfig.cmake.in
oatppConfig.cmake
INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/oatpp"
NO_CHECK_REQUIRED_COMPONENTS_MACRO
)
write_basic_package_version_file(oatppConfigVersion.cmake
VERSION ${oatpp_VERSION}
COMPATIBILITY SameMajorVersion
)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/oatppConfig.cmake" "${CMAKE_CURRENT_BINARY_DIR}/oatppConfigVersion.cmake"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/oatpp"
)
endif()

View File

@ -58,7 +58,7 @@ public:
}
};
#define OATPP_RUN_TEST(TEST) oatpp::test::UnitTest::runTest<TEST>(1)
}}

View File

@ -38,12 +38,6 @@
#define OATPP_VERSION "0.18.12"
#define OATPP_ASSERT(EXP) \
if(!(EXP)) { \
OATPP_LOGE("ASSERT[FAILED]", #EXP); \
exit(EXIT_FAILURE); \
}
typedef unsigned char v_char8;
typedef v_char8 *p_char8;
@ -80,7 +74,7 @@ namespace oatpp { namespace base{
class Logger {
public:
virtual ~Logger(){};
virtual ~Logger() = default;
virtual void log(v_int32 priority, const std::string& tag, const std::string& message) = 0;
};
@ -159,6 +153,12 @@ public:
static v_int64 getMicroTickCount();
};
#define OATPP_ASSERT(EXP) \
if(!(EXP)) { \
OATPP_LOGE("ASSERT[FAILED]", #EXP); \
exit(EXIT_FAILURE); \
}
#ifndef OATPP_DISABLE_LOGV
#define OATPP_LOGV(TAG, ...) oatpp::base::Environment::logFormatted(0, TAG, __VA_ARGS__);

View File

@ -27,7 +27,6 @@
#include "oatpp/network/Connection.hpp"
#include "oatpp/core/data/stream/ChunkedBuffer.hpp"
#include "oatpp/core/utils/ConversionUtils.hpp"
#include "oatpp/test/Checker.hpp"
#include <fcntl.h>
#include <netdb.h>

Some files were not shown because too many files have changed in this diff Show More