mirror of
https://github.com/boostorg/beast.git
synced 2025-08-01 05:44:38 +02:00
committed by
Mohammad Nejati
parent
ee2b5b2ff9
commit
0451018f25
@@ -22,39 +22,39 @@ endif()
|
||||
find_package(Threads REQUIRED)
|
||||
find_package(OpenSSL REQUIRED)
|
||||
|
||||
# lib-asio
|
||||
add_library(lib-asio STATIC lib_asio.cpp)
|
||||
source_group("" FILES lib_asio.cpp)
|
||||
target_compile_definitions(lib-asio PUBLIC
|
||||
# boost_beast_lib_asio
|
||||
add_library(boost_beast_lib_asio STATIC lib_asio.cpp)
|
||||
source_group("" FILES boost_beast_lib_asio.cpp)
|
||||
target_compile_definitions(boost_beast_lib_asio PUBLIC
|
||||
BOOST_ASIO_SEPARATE_COMPILATION
|
||||
BOOST_ASIO_NO_DEPRECATED
|
||||
BOOST_ASIO_DISABLE_BOOST_ARRAY
|
||||
BOOST_ASIO_DISABLE_BOOST_BIND
|
||||
BOOST_ASIO_DISABLE_BOOST_DATE_TIME
|
||||
BOOST_ASIO_DISABLE_BOOST_REGEX)
|
||||
target_link_libraries(lib-asio PUBLIC Boost::asio Threads::Threads)
|
||||
set_target_properties(lib-asio PROPERTIES FOLDER "static-libs")
|
||||
target_link_libraries(boost_beast_lib_asio PUBLIC Boost::asio Threads::Threads)
|
||||
set_target_properties(boost_beast_lib_asio PROPERTIES FOLDER "static-libs")
|
||||
|
||||
# lib-asio-ssl
|
||||
add_library(lib-asio-ssl STATIC lib_asio_ssl.cpp)
|
||||
source_group("" FILES lib_asio_ssl.cpp)
|
||||
target_link_libraries(lib-asio-ssl PUBLIC lib-asio)
|
||||
target_link_libraries(lib-asio-ssl PUBLIC OpenSSL::SSL OpenSSL::Crypto)
|
||||
set_target_properties(lib-asio-ssl PROPERTIES FOLDER "static-libs")
|
||||
# boost_beast_lib_asio_ssl
|
||||
add_library(boost_beast_lib_asio_ssl STATIC lib_asio_ssl.cpp)
|
||||
source_group("" FILES boost_beast_lib_asio_ssl.cpp)
|
||||
target_link_libraries(boost_beast_lib_asio_ssl PUBLIC boost_beast_lib_asio)
|
||||
target_link_libraries(boost_beast_lib_asio_ssl PUBLIC OpenSSL::SSL OpenSSL::Crypto)
|
||||
set_target_properties(boost_beast_lib_asio_ssl PROPERTIES FOLDER "static-libs")
|
||||
|
||||
# lib-beast
|
||||
add_library(lib-beast STATIC lib_beast.cpp)
|
||||
source_group("" FILES lib_beast.cpp)
|
||||
target_compile_definitions(lib-beast PUBLIC
|
||||
# boost_beast_lib_beast
|
||||
add_library(boost_beast_lib_beast STATIC lib_beast.cpp)
|
||||
source_group("" FILES boost_beast_lib_beast.cpp)
|
||||
target_compile_definitions(boost_beast_lib_beast PUBLIC
|
||||
BOOST_BEAST_SEPARATE_COMPILATION
|
||||
BOOST_BEAST_ALLOW_DEPRECATED
|
||||
BOOST_BEAST_TESTS)
|
||||
target_link_libraries(lib-beast PUBLIC Boost::beast lib-asio)
|
||||
set_target_properties(lib-beast PROPERTIES FOLDER "static-libs")
|
||||
target_link_libraries(boost_beast_lib_beast PUBLIC Boost::beast boost_beast_lib_asio)
|
||||
set_target_properties(boost_beast_lib_beast PROPERTIES FOLDER "static-libs")
|
||||
|
||||
# lib-zlib
|
||||
# boost_beast_lib_zlib
|
||||
enable_language(C)
|
||||
add_library(lib-zlib STATIC
|
||||
add_library(boost_beast_lib_zlib STATIC
|
||||
extern/zlib-1.2.12/adler32.c
|
||||
extern/zlib-1.2.12/compress.c
|
||||
extern/zlib-1.2.12/crc32.c
|
||||
@@ -66,22 +66,22 @@ add_library(lib-zlib STATIC
|
||||
extern/zlib-1.2.12/trees.c
|
||||
extern/zlib-1.2.12/uncompr.c
|
||||
extern/zlib-1.2.12/zutil.c)
|
||||
target_compile_options(lib-zlib PRIVATE
|
||||
target_compile_options(boost_beast_lib_zlib PRIVATE
|
||||
$<$<C_COMPILER_ID:GNU>:-w>
|
||||
$<$<C_COMPILER_ID:Clang>:-w>
|
||||
$<$<C_COMPILER_ID:AppleClang>:-w>
|
||||
$<$<C_COMPILER_ID:MSVC>:/wd4127>
|
||||
$<$<C_COMPILER_ID:MSVC>:/wd4244>
|
||||
$<$<C_COMPILER_ID:MSVC>:/wd4131>)
|
||||
target_include_directories(lib-zlib PUBLIC extern/zlib-1.2.12)
|
||||
set_target_properties(lib-zlib PROPERTIES FOLDER "static-libs")
|
||||
target_include_directories(boost_beast_lib_zlib PUBLIC extern/zlib-1.2.12)
|
||||
set_target_properties(boost_beast_lib_zlib PROPERTIES FOLDER "static-libs")
|
||||
|
||||
# lib-test
|
||||
add_library(lib-test STATIC lib_test.cpp)
|
||||
source_group("" FILES lib_test.cpp)
|
||||
target_include_directories(lib-test PUBLIC extras/include)
|
||||
target_link_libraries(lib-test PUBLIC lib-beast)
|
||||
set_target_properties(lib-test PROPERTIES FOLDER "static-libs")
|
||||
# boost_beast_lib_test
|
||||
add_library(boost_beast_lib_test STATIC lib_test.cpp)
|
||||
source_group("" FILES boost_beast_lib_test.cpp)
|
||||
target_include_directories(boost_beast_lib_test PUBLIC extras/include)
|
||||
target_link_libraries(boost_beast_lib_test PUBLIC boost_beast_lib_beast)
|
||||
set_target_properties(boost_beast_lib_test PROPERTIES FOLDER "static-libs")
|
||||
|
||||
add_subdirectory(beast)
|
||||
add_subdirectory(bench)
|
||||
|
@@ -15,7 +15,7 @@ add_subdirectory(ssl)
|
||||
add_subdirectory(websocket)
|
||||
add_subdirectory(zlib)
|
||||
|
||||
add_executable(tests-beast
|
||||
add_executable(boost_beast_tests_self_contained
|
||||
Jamfile
|
||||
core.cpp
|
||||
http.cpp
|
||||
@@ -33,12 +33,12 @@ source_group("" FILES
|
||||
websocket.cpp
|
||||
zlib.cpp)
|
||||
|
||||
target_link_libraries(tests-beast
|
||||
lib-asio-ssl
|
||||
lib-test)
|
||||
target_link_libraries(boost_beast_tests_self_contained
|
||||
boost_beast_lib_asio_ssl
|
||||
boost_beast_lib_test)
|
||||
|
||||
set_target_properties(tests-beast
|
||||
set_target_properties(boost_beast_tests_self_contained
|
||||
PROPERTIES FOLDER "tests")
|
||||
|
||||
add_test(NAME tests-beast COMMAND tests-beast)
|
||||
add_dependencies(tests tests-beast)
|
||||
add_test(NAME boost_beast_tests_self_contained COMMAND boost_beast_tests_self_contained)
|
||||
add_dependencies(tests boost_beast_tests_self_contained)
|
||||
|
@@ -8,7 +8,7 @@
|
||||
# Official repository: https://github.com/boostorg/beast
|
||||
#
|
||||
|
||||
add_executable(tests-beast-_experimental
|
||||
add_executable(boost_beast_tests__experimental
|
||||
Jamfile
|
||||
_test_detail_stream_state.cpp
|
||||
error.cpp
|
||||
@@ -22,12 +22,12 @@ source_group("" FILES
|
||||
icy_stream.cpp
|
||||
stream.cpp)
|
||||
|
||||
target_link_libraries(tests-beast-_experimental
|
||||
lib-asio-ssl
|
||||
lib-test)
|
||||
target_link_libraries(boost_beast_tests__experimental
|
||||
boost_beast_lib_asio_ssl
|
||||
boost_beast_lib_test)
|
||||
|
||||
set_target_properties(tests-beast-_experimental
|
||||
set_target_properties(boost_beast_tests__experimental
|
||||
PROPERTIES FOLDER "tests")
|
||||
|
||||
add_test(NAME tests-beast-_experimental COMMAND tests-beast-_experimental)
|
||||
add_dependencies(tests tests-beast-_experimental)
|
||||
add_test(NAME boost_beast_tests__experimental COMMAND boost_beast_tests__experimental)
|
||||
add_dependencies(tests boost_beast_tests__experimental)
|
||||
|
@@ -10,16 +10,16 @@
|
||||
|
||||
file(GLOB_RECURSE PFILES CONFIGURE_DEPENDS Jamfile *.cpp *.hpp)
|
||||
|
||||
add_executable(tests-beast-core ${PFILES})
|
||||
add_executable(boost_beast_tests_core ${PFILES})
|
||||
|
||||
source_group("" FILES ${PFILES})
|
||||
|
||||
target_link_libraries(tests-beast-core
|
||||
lib-test
|
||||
target_link_libraries(boost_beast_tests_core
|
||||
boost_beast_lib_test
|
||||
Boost::filesystem)
|
||||
|
||||
set_target_properties(tests-beast-core
|
||||
set_target_properties(boost_beast_tests_core
|
||||
PROPERTIES FOLDER "tests")
|
||||
|
||||
add_test(NAME tests-beast-core COMMAND tests-beast-core)
|
||||
add_dependencies(tests tests-beast-core)
|
||||
add_test(NAME boost_beast_tests_core COMMAND boost_beast_tests_core)
|
||||
add_dependencies(tests boost_beast_tests_core)
|
||||
|
@@ -10,16 +10,16 @@
|
||||
|
||||
file(GLOB_RECURSE PFILES CONFIGURE_DEPENDS Jamfile *.cpp *.hpp)
|
||||
|
||||
add_executable(tests-beast-http ${PFILES})
|
||||
add_executable(boost_beast_tests_http ${PFILES})
|
||||
|
||||
source_group("" FILES ${PFILES})
|
||||
|
||||
target_link_libraries(tests-beast-http
|
||||
lib-test
|
||||
target_link_libraries(boost_beast_tests_http
|
||||
boost_beast_lib_test
|
||||
Boost::filesystem)
|
||||
|
||||
set_target_properties(tests-beast-http
|
||||
set_target_properties(boost_beast_tests_http
|
||||
PROPERTIES FOLDER "tests")
|
||||
|
||||
add_test(NAME tests-beast-http COMMAND tests-beast-http)
|
||||
add_dependencies(tests tests-beast-http)
|
||||
add_test(NAME boost_beast_tests_http COMMAND boost_beast_tests_http)
|
||||
add_dependencies(tests boost_beast_tests_http)
|
||||
|
@@ -7,7 +7,7 @@
|
||||
# Official repository: https://github.com/boostorg/beast
|
||||
#
|
||||
|
||||
add_executable (tests-beast-ssl
|
||||
add_executable (boost_beast_tests_ssl
|
||||
Jamfile
|
||||
ssl_stream.cpp)
|
||||
|
||||
@@ -15,12 +15,12 @@ source_group("" FILES
|
||||
Jamfile
|
||||
ssl_stream.cpp)
|
||||
|
||||
target_link_libraries(tests-beast-ssl
|
||||
lib-asio-ssl
|
||||
lib-test)
|
||||
target_link_libraries(boost_beast_tests_ssl
|
||||
boost_beast_lib_asio_ssl
|
||||
boost_beast_lib_test)
|
||||
|
||||
set_target_properties(tests-beast-ssl
|
||||
set_target_properties(boost_beast_tests_ssl
|
||||
PROPERTIES FOLDER "tests")
|
||||
|
||||
add_test(NAME tests-beast-ssl COMMAND tests-beast-ssl)
|
||||
add_dependencies(tests tests-beast-ssl)
|
||||
add_test(NAME boost_beast_tests_ssl COMMAND boost_beast_tests_ssl)
|
||||
add_dependencies(tests boost_beast_tests_ssl)
|
||||
|
@@ -10,16 +10,16 @@
|
||||
|
||||
file(GLOB_RECURSE PFILES CONFIGURE_DEPENDS Jamfile *.cpp *.hpp)
|
||||
|
||||
add_executable(tests-beast-websocket ${PFILES})
|
||||
add_executable(boost_beast_tests_websocket ${PFILES})
|
||||
|
||||
source_group("" FILES ${PFILES})
|
||||
|
||||
target_link_libraries(tests-beast-websocket
|
||||
lib-asio-ssl
|
||||
lib-test)
|
||||
target_link_libraries(boost_beast_tests_websocket
|
||||
boost_beast_lib_asio_ssl
|
||||
boost_beast_lib_test)
|
||||
|
||||
set_target_properties(tests-beast-websocket
|
||||
set_target_properties(boost_beast_tests_websocket
|
||||
PROPERTIES FOLDER "tests")
|
||||
|
||||
add_test(NAME tests-beast-websocket COMMAND tests-beast-websocket)
|
||||
add_dependencies(tests tests-beast-websocket)
|
||||
add_test(NAME boost_beast_tests_websocket COMMAND boost_beast_tests_websocket)
|
||||
add_dependencies(tests boost_beast_tests_websocket)
|
||||
|
@@ -8,7 +8,7 @@
|
||||
# Official repository: https://github.com/boostorg/beast
|
||||
#
|
||||
|
||||
add_executable(tests-beast-zlib
|
||||
add_executable(boost_beast_tests_zlib
|
||||
Jamfile
|
||||
error.cpp
|
||||
deflate_stream.cpp
|
||||
@@ -22,15 +22,15 @@ source_group("" FILES
|
||||
inflate_stream.cpp
|
||||
zlib.cpp)
|
||||
|
||||
target_include_directories(tests-beast-zlib
|
||||
target_include_directories(boost_beast_tests_zlib
|
||||
PRIVATE ${PROJECT_SOURCE_DIR}/test/extern)
|
||||
|
||||
target_link_libraries(tests-beast-zlib
|
||||
lib-test
|
||||
lib-zlib)
|
||||
target_link_libraries(boost_beast_tests_zlib
|
||||
boost_beast_lib_test
|
||||
boost_beast_lib_zlib)
|
||||
|
||||
set_target_properties(tests-beast-zlib
|
||||
set_target_properties(boost_beast_tests_zlib
|
||||
PROPERTIES FOLDER "tests")
|
||||
|
||||
add_test(NAME tests-beast-zlib COMMAND tests-beast-zlib)
|
||||
add_dependencies(tests tests-beast-zlib)
|
||||
add_test(NAME boost_beast_tests_zlib COMMAND boost_beast_tests_zlib)
|
||||
add_dependencies(tests boost_beast_tests_zlib)
|
||||
|
@@ -8,7 +8,7 @@
|
||||
# Official repository: https://github.com/boostorg/beast
|
||||
#
|
||||
|
||||
add_executable(bench-buffers
|
||||
add_executable(boost_beast_bench_buffers
|
||||
Jamfile
|
||||
bench_buffers.cpp)
|
||||
|
||||
@@ -16,8 +16,8 @@ source_group("" FILES
|
||||
Jamfile
|
||||
bench_buffers.cpp)
|
||||
|
||||
target_link_libraries(bench-buffers
|
||||
lib-test)
|
||||
target_link_libraries(boost_beast_bench_buffers
|
||||
boost_beast_lib_test)
|
||||
|
||||
set_target_properties(bench-buffers
|
||||
set_target_properties(boost_beast_bench_buffers
|
||||
PROPERTIES FOLDER "tests-bench")
|
||||
|
@@ -8,7 +8,7 @@
|
||||
# Official repository: https://github.com/boostorg/beast
|
||||
#
|
||||
|
||||
add_executable(bench-parser
|
||||
add_executable(boost_beast_bench_parser
|
||||
Jamfile
|
||||
nodejs_parser.hpp
|
||||
nodejs_parser.cpp
|
||||
@@ -20,11 +20,11 @@ source_group("" FILES
|
||||
nodejs_parser.cpp
|
||||
bench_parser.cpp)
|
||||
|
||||
target_include_directories(bench-parser
|
||||
target_include_directories(boost_beast_bench_parser
|
||||
PRIVATE ${PROJECT_SOURCE_DIR})
|
||||
|
||||
target_link_libraries(bench-parser
|
||||
lib-test)
|
||||
target_link_libraries(boost_beast_bench_parser
|
||||
boost_beast_lib_test)
|
||||
|
||||
set_target_properties(bench-parser
|
||||
set_target_properties(boost_beast_bench_parser
|
||||
PROPERTIES FOLDER "tests-bench")
|
||||
|
@@ -8,7 +8,7 @@
|
||||
# Official repository: https://github.com/boostorg/beast
|
||||
#
|
||||
|
||||
add_executable(bench-utf8-checker
|
||||
add_executable(boost_beast_bench_utf8_checker
|
||||
Jamfile
|
||||
bench_utf8_checker.cpp)
|
||||
|
||||
@@ -16,8 +16,8 @@ source_group("" FILES
|
||||
Jamfile
|
||||
bench_utf8_checker.cpp)
|
||||
|
||||
target_link_libraries(bench-utf8-checker
|
||||
lib-test)
|
||||
target_link_libraries(boost_beast_bench_utf8_checker
|
||||
boost_beast_lib_test)
|
||||
|
||||
set_target_properties(bench-utf8-checker
|
||||
set_target_properties(boost_beast_bench_utf8_checker
|
||||
PROPERTIES FOLDER "tests-bench")
|
||||
|
@@ -8,7 +8,7 @@
|
||||
# Official repository: https://github.com/boostorg/beast
|
||||
#
|
||||
|
||||
add_executable(bench-wsload
|
||||
add_executable(boost_beast_bench_wsload
|
||||
Jamfile
|
||||
wsload.cpp)
|
||||
|
||||
@@ -16,8 +16,8 @@ source_group("" FILES
|
||||
Jamfile
|
||||
wsload.cpp)
|
||||
|
||||
target_link_libraries(bench-wsload
|
||||
lib-beast)
|
||||
target_link_libraries(boost_beast_bench_wsload
|
||||
boost_beast_lib_beast)
|
||||
|
||||
set_target_properties(bench-wsload
|
||||
set_target_properties(boost_beast_bench_wsload
|
||||
PROPERTIES FOLDER "tests-bench")
|
||||
|
@@ -8,7 +8,7 @@
|
||||
# Official repository: https://github.com/boostorg/beast
|
||||
#
|
||||
|
||||
add_executable(bench-zlib
|
||||
add_executable(boost_beast_bench_zlib
|
||||
Jamfile
|
||||
deflate_stream.cpp
|
||||
inflate_stream.cpp)
|
||||
@@ -18,12 +18,12 @@ source_group("" FILES
|
||||
deflate_stream.cpp
|
||||
inflate_stream.cpp)
|
||||
|
||||
target_include_directories(bench-zlib
|
||||
target_include_directories(boost_beast_bench_zlib
|
||||
PRIVATE ${PROJECT_SOURCE_DIR}/test/extern)
|
||||
|
||||
target_link_libraries(bench-zlib
|
||||
lib-test
|
||||
lib-zlib)
|
||||
target_link_libraries(boost_beast_bench_zlib
|
||||
boost_beast_lib_test
|
||||
boost_beast_lib_zlib)
|
||||
|
||||
set_target_properties(bench-zlib
|
||||
set_target_properties(boost_beast_bench_zlib
|
||||
PROPERTIES FOLDER "tests-bench")
|
||||
|
@@ -10,19 +10,19 @@
|
||||
|
||||
file(GLOB_RECURSE PFILES CONFIGURE_DEPENDS Jamfile *.cpp *.ipp *.hpp)
|
||||
|
||||
add_executable(tests-doc ${PFILES})
|
||||
add_executable(boost_beast_tests_doc ${PFILES})
|
||||
|
||||
source_group("" FILES ${PFILES})
|
||||
|
||||
target_include_directories(tests-doc
|
||||
target_include_directories(boost_beast_tests_doc
|
||||
PRIVATE ${PROJECT_SOURCE_DIR})
|
||||
|
||||
target_link_libraries(tests-doc
|
||||
lib-asio-ssl
|
||||
lib-test)
|
||||
target_link_libraries(boost_beast_tests_doc
|
||||
boost_beast_lib_asio_ssl
|
||||
boost_beast_lib_test)
|
||||
|
||||
set_target_properties(tests-doc
|
||||
set_target_properties(boost_beast_tests_doc
|
||||
PROPERTIES FOLDER "tests")
|
||||
|
||||
add_test(NAME tests-doc COMMAND tests-doc)
|
||||
add_dependencies(tests tests-doc)
|
||||
add_test(NAME boost_beast_tests_doc COMMAND boost_beast_tests_doc)
|
||||
add_dependencies(tests boost_beast_tests_doc)
|
||||
|
@@ -8,7 +8,7 @@
|
||||
# Official repository: https://github.com/boostorg/beast
|
||||
#
|
||||
|
||||
add_executable(tests-example-common
|
||||
add_executable(boost_beast_tests_example_common
|
||||
Jamfile
|
||||
root_certificates.cpp
|
||||
server_certificate.cpp)
|
||||
@@ -18,15 +18,15 @@ source_group("" FILES
|
||||
root_certificates.cpp
|
||||
server_certificate.cpp)
|
||||
|
||||
target_include_directories(tests-example-common
|
||||
target_include_directories(boost_beast_tests_example_common
|
||||
PRIVATE ${PROJECT_SOURCE_DIR})
|
||||
|
||||
target_link_libraries(tests-example-common
|
||||
lib-asio-ssl
|
||||
lib-test)
|
||||
target_link_libraries(boost_beast_tests_example_common
|
||||
boost_beast_lib_asio_ssl
|
||||
boost_beast_lib_test)
|
||||
|
||||
set_target_properties(tests-example-common
|
||||
set_target_properties(boost_beast_tests_example_common
|
||||
PROPERTIES FOLDER "tests")
|
||||
|
||||
add_test(NAME tests-example-common COMMAND tests-example-common)
|
||||
add_dependencies(tests tests-example-common)
|
||||
add_test(NAME boost_beast_tests_example_common COMMAND boost_beast_tests_example_common)
|
||||
add_dependencies(tests boost_beast_tests_example_common)
|
||||
|
Reference in New Issue
Block a user