forked from boostorg/beast
cmake: Use static libs to speed up builds
This commit is contained in:
1 parent
b01d692ad7
commit
b38901887b
60 files changed
+369
-91
No files matched your search
@@ -13,6 +13,7 @@ include_directories (./extras/include)
|
||||
file (GLOB_RECURSE EXTRAS_FILES
|
||||
${PROJECT_SOURCE_DIR}/test/extras/include/*.hpp
|
||||
${PROJECT_SOURCE_DIR}/test/extras/include/*.ipp
|
||||
${PROJECT_SOURCE_DIR}/test/lib_ssl.cpp
|
||||
)
|
||||
|
||||
if (OPENSSL_FOUND)
|
||||
@@ -44,6 +45,15 @@ set (ZLIB_SOURCES
|
||||
|
||||
set (TEST_MAIN ${PROJECT_SOURCE_DIR}/test/lib_beast.cpp)
|
||||
|
||||
GroupSources (. "/")
|
||||
|
||||
add_library (
|
||||
lib-test STATIC
|
||||
${PROJECT_SOURCE_DIR}/include/boost/beast/_experimental/unit_test/main.cpp
|
||||
)
|
||||
|
||||
set_property(TARGET lib-test PROPERTY FOLDER "static-libs")
|
||||
|
||||
add_definitions (-DBOOST_BEAST_INCLUDE_TEST_MAIN)
|
||||
add_definitions (-DBOOST_ASIO_SEPARATE_COMPILATION)
|
||||
add_definitions (-DBOOST_BEAST_SPLIT_COMPILATION)
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Official repository: https://github.com/boostorg/beast
|
||||
//
|
||||
|
||||
// This file is used to build a static library with
|
||||
// asio and beast definitions, to reduce compilation time.
|
||||
|
||||
// BOOST_ASIO_SEPARATE_COMPILATION for asio
|
||||
#include <boost/asio/impl/src.hpp>
|
||||
|
||||
// BOOST_BEAST_SPLIT_COMPILATION for beast
|
||||
#include <boost/beast/src.hpp>
|
||||
//#include <boost/beast/ssl/impl/src.hpp>
|
||||
|
||||
#ifdef BOOST_BEAST_INCLUDE_TEST_MAIN
|
||||
#include <boost/beast/_experimental/unit_test/main.cpp>
|
||||
#endif
|
||||
File renamed without changes.
@@ -8,8 +8,9 @@
|
||||
#
|
||||
|
||||
add_definitions (-DBOOST_BEAST_ALLOW_DEPRECATED)
|
||||
add_definitions (-DBOOST_BEAST_TESTS)
|
||||
|
||||
# For buffers_cat
|
||||
add_definitions (-DBOOST_BEAST_TESTS)
|
||||
|
||||
add_subdirectory (_experimental)
|
||||
add_subdirectory (core)
|
||||
@@ -21,13 +22,11 @@ add_subdirectory (zlib)
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
GroupSources (include/boost/beast beast)
|
||||
GroupSources (test/extras/include/boost/beast extras)
|
||||
GroupSources (test/beast "/")
|
||||
|
||||
add_executable (tests-beast
|
||||
${BOOST_BEAST_FILES}
|
||||
${EXTRAS_FILES}
|
||||
${TEST_MAIN}
|
||||
Jamfile
|
||||
core.cpp
|
||||
http.cpp
|
||||
@@ -37,4 +36,10 @@ add_executable (tests-beast
|
||||
zlib.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(tests-beast
|
||||
lib-asio
|
||||
lib-asio-ssl
|
||||
lib-beast
|
||||
lib-test)
|
||||
|
||||
set_property(TARGET tests-beast PROPERTY FOLDER "tests")
|
||||
@@ -8,17 +8,20 @@
|
||||
#
|
||||
|
||||
GroupSources (include/boost/beast beast)
|
||||
GroupSources (test/extras/include/boost/beast extras)
|
||||
GroupSources (test/beast/_experimental "/")
|
||||
|
||||
add_executable (tests-beast-_experimental
|
||||
${BOOST_BEAST_FILES}
|
||||
${EXTRAS_FILES}
|
||||
${TEST_MAIN}
|
||||
Jamfile
|
||||
error.cpp
|
||||
icy_stream.cpp
|
||||
stream.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(tests-beast-_experimental
|
||||
lib-asio
|
||||
lib-beast
|
||||
lib-test
|
||||
)
|
||||
|
||||
set_property(TARGET tests-beast-_experimental PROPERTY FOLDER "tests")
|
||||
@@ -8,13 +8,10 @@
|
||||
#
|
||||
|
||||
GroupSources (include/boost/beast beast)
|
||||
GroupSources (test/extras/include/boost/beast extras)
|
||||
GroupSources (test/beast/core "/")
|
||||
|
||||
add_executable (tests-beast-core
|
||||
${BOOST_BEAST_FILES}
|
||||
${EXTRAS_FILES}
|
||||
${TEST_MAIN}
|
||||
Jamfile
|
||||
test_buffer.hpp
|
||||
file_test.hpp
|
||||
@@ -69,4 +66,11 @@ add_executable (tests-beast-core
|
||||
tcp_stream.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(tests-beast-core
|
||||
lib-asio
|
||||
lib-asio-ssl
|
||||
lib-beast
|
||||
lib-test
|
||||
)
|
||||
|
||||
set_property(TARGET tests-beast-core PROPERTY FOLDER "tests")
|
||||
@@ -14,7 +14,6 @@ GroupSources (test/beast/http "/")
|
||||
add_executable (tests-beast-http
|
||||
${BOOST_BEAST_FILES}
|
||||
${EXTRAS_FILES}
|
||||
${TEST_MAIN}
|
||||
Jamfile
|
||||
message_fuzz.hpp
|
||||
test_parser.hpp
|
||||
@@ -43,4 +42,11 @@ add_executable (tests-beast-http
|
||||
write.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(tests-beast-http
|
||||
lib-asio
|
||||
lib-asio-ssl
|
||||
lib-beast
|
||||
lib-test
|
||||
)
|
||||
|
||||
set_property(TARGET tests-beast-http PROPERTY FOLDER "tests")
|
||||
@@ -12,9 +12,15 @@ GroupSources (test/beast/ssl "/")
|
||||
|
||||
add_executable (tests-beast-ssl
|
||||
${BOOST_BEAST_FILES}
|
||||
${TEST_MAIN}
|
||||
Jamfile
|
||||
ssl_stream.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(tests-beast-ssl
|
||||
lib-asio
|
||||
lib-asio-ssl
|
||||
lib-beast
|
||||
lib-test
|
||||
)
|
||||
|
||||
set_property(TARGET tests-beast-ssl PROPERTY FOLDER "tests")
|
||||
@@ -14,7 +14,6 @@ GroupSources (test/beast/websocket "/")
|
||||
add_executable (tests-beast-websocket
|
||||
${BOOST_BEAST_FILES}
|
||||
${EXTRAS_FILES}
|
||||
${TEST_MAIN}
|
||||
Jamfile
|
||||
_detail_decorator.cpp
|
||||
_detail_prng.cpp
|
||||
@@ -43,4 +42,11 @@ add_executable (tests-beast-websocket
|
||||
write.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(tests-beast-websocket
|
||||
lib-asio
|
||||
lib-asio-ssl
|
||||
lib-beast
|
||||
lib-test
|
||||
)
|
||||
|
||||
set_property(TARGET tests-beast-websocket PROPERTY FOLDER "tests")
|
||||
@@ -8,7 +8,6 @@
|
||||
#
|
||||
|
||||
GroupSources (include/boost/beast beast)
|
||||
GroupSources (test/extras/include/boost/beast extras)
|
||||
GroupSources (test/extern/zlib-1.2.11 zlib)
|
||||
GroupSources (test/beast/zlib "/")
|
||||
|
||||
@@ -18,9 +17,7 @@ endif()
|
||||
|
||||
add_executable (tests-beast-zlib
|
||||
${BOOST_BEAST_FILES}
|
||||
${EXTRAS_FILES}
|
||||
${ZLIB_SOURCES}
|
||||
${TEST_MAIN}
|
||||
Jamfile
|
||||
error.cpp
|
||||
deflate_stream.cpp
|
||||
@@ -28,4 +25,10 @@ add_executable (tests-beast-zlib
|
||||
zlib.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(tests-beast-zlib
|
||||
lib-asio
|
||||
lib-beast
|
||||
lib-test
|
||||
)
|
||||
|
||||
set_property(TARGET tests-beast-zlib PROPERTY FOLDER "tests")
|
||||
@@ -8,15 +8,18 @@
|
||||
#
|
||||
|
||||
GroupSources (include/boost/beast beast)
|
||||
GroupSources (test/extras/include/boost/beast extras)
|
||||
GroupSources (test/bench/buffers "/")
|
||||
|
||||
add_executable (bench-buffers
|
||||
${BOOST_BEAST_FILES}
|
||||
${EXTRAS_FILES}
|
||||
${TEST_MAIN}
|
||||
Jamfile
|
||||
bench_buffers.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(bench-buffers
|
||||
lib-asio
|
||||
lib-beast
|
||||
lib-test
|
||||
)
|
||||
|
||||
set_property(TARGET bench-buffers PROPERTY FOLDER "tests-bench")
|
||||
@@ -8,14 +8,11 @@
|
||||
#
|
||||
|
||||
GroupSources (include/boost/beast beast)
|
||||
GroupSources (test/extras/include/boost/beast extras)
|
||||
GroupSources (test/beast/http "/")
|
||||
GroupSources (test/bench/parser "/")
|
||||
|
||||
add_executable (bench-parser
|
||||
${BOOST_BEAST_FILES}
|
||||
${EXTRAS_FILES}
|
||||
${TEST_MAIN}
|
||||
Jamfile
|
||||
${PROJECT_SOURCE_DIR}/test/beast/http/message_fuzz.hpp
|
||||
nodejs_parser.hpp
|
||||
@@ -23,4 +20,10 @@ add_executable (bench-parser
|
||||
bench_parser.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(bench-parser
|
||||
lib-asio
|
||||
lib-beast
|
||||
lib-test
|
||||
)
|
||||
|
||||
set_property(TARGET bench-parser PROPERTY FOLDER "tests-bench")
|
||||
@@ -8,15 +8,18 @@
|
||||
#
|
||||
|
||||
GroupSources (include/boost/beast beast)
|
||||
GroupSources (test/extras/include/boost/beast extras)
|
||||
GroupSources (test/bench/utf8_checker "/")
|
||||
|
||||
add_executable (bench-utf8-checker
|
||||
${BOOST_BEAST_FILES}
|
||||
${EXTRAS_FILES}
|
||||
${TEST_MAIN}
|
||||
Jamfile
|
||||
bench_utf8_checker.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(bench-utf8-checker
|
||||
lib-asio
|
||||
lib-beast
|
||||
lib-test
|
||||
)
|
||||
|
||||
set_property(TARGET bench-utf8-checker PROPERTY FOLDER "tests-bench")
|
||||
@@ -8,20 +8,17 @@
|
||||
#
|
||||
|
||||
GroupSources (include/boost/beast beast)
|
||||
GroupSources (example/common common)
|
||||
GroupSources (test/extras/include/boost/beast extras)
|
||||
GroupSources (test/bench/wsload "/")
|
||||
|
||||
remove_definitions (-DBOOST_BEAST_INCLUDE_TEST_MAIN)
|
||||
remove_definitions (-DBOOST_ASIO_SEPARATE_COMPILATION)
|
||||
remove_definitions (-DBOOST_BEAST_SPLIT_COMPILATION)
|
||||
|
||||
add_executable (bench-wsload
|
||||
${BOOST_BEAST_FILES}
|
||||
${COMMON_FILES}
|
||||
${EXTRAS_FILES}
|
||||
Jamfile
|
||||
wsload.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(bench-wsload
|
||||
lib-asio
|
||||
lib-beast
|
||||
)
|
||||
|
||||
set_property(TARGET bench-wsload PROPERTY FOLDER "tests-bench")
|
||||
@@ -8,7 +8,6 @@
|
||||
#
|
||||
|
||||
GroupSources (include/boost/beast beast)
|
||||
GroupSources (test/extras/include/boost/beast extras)
|
||||
GroupSources (test/extern/zlib-1.2.11 zlib)
|
||||
GroupSources (test/bench/zlib "/")
|
||||
|
||||
@@ -18,12 +17,15 @@ endif()
|
||||
|
||||
add_executable (bench-zlib
|
||||
${BOOST_BEAST_FILES}
|
||||
${EXTRAS_FILES}
|
||||
${ZLIB_SOURCES}
|
||||
${TEST_MAIN}
|
||||
Jamfile
|
||||
deflate_stream.cpp
|
||||
inflate_stream.cpp
|
||||
)
|
||||
target_link_libraries(bench-zlib
|
||||
lib-asio
|
||||
lib-beast
|
||||
lib-test
|
||||
)
|
||||
|
||||
set_property(TARGET bench-zlib PROPERTY FOLDER "tests-bench")
|
||||
@@ -9,13 +9,10 @@
|
||||
|
||||
GroupSources (include/boost/beast beast)
|
||||
GroupSources (example example)
|
||||
GroupSources (test/extras/include/boost/beast extras)
|
||||
GroupSources (test/doc "/")
|
||||
|
||||
add_executable (tests-doc
|
||||
${BOOST_BEAST_FILES}
|
||||
${EXTRAS_FILES}
|
||||
${TEST_MAIN}
|
||||
Jamfile
|
||||
snippets.hpp
|
||||
snippets.ipp
|
||||
@@ -39,4 +36,11 @@ add_executable (tests-doc
|
||||
exemplars.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(tests-doc
|
||||
lib-asio
|
||||
lib-asio-ssl
|
||||
lib-beast
|
||||
lib-test
|
||||
)
|
||||
|
||||
set_property(TARGET tests-doc PROPERTY FOLDER "tests")
|
||||
@@ -16,10 +16,16 @@ add_executable (tests-example-common
|
||||
${BOOST_BEAST_FILES}
|
||||
${COMMON_FILES}
|
||||
${EXTRAS_FILES}
|
||||
${TEST_MAIN}
|
||||
Jamfile
|
||||
root_certificates.cpp
|
||||
server_certificate.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(tests-example-common
|
||||
lib-asio
|
||||
lib-asio-ssl
|
||||
lib-beast
|
||||
lib-test
|
||||
)
|
||||
|
||||
set_property(TARGET tests-example-common PROPERTY FOLDER "tests")
|
||||
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Official repository: https://github.com/boostorg/beast
|
||||
//
|
||||
|
||||
// This file is used to build a static library
|
||||
|
||||
#include <boost/asio/impl/src.hpp>
|
||||
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Official repository: https://github.com/boostorg/beast
|
||||
//
|
||||
|
||||
// This file is used to build a static library
|
||||
|
||||
#include <boost/asio/ssl/impl/src.hpp>
|
||||
+1
-11
@@ -7,16 +7,6 @@
|
||||
// Official repository: https://github.com/boostorg/beast
|
||||
//
|
||||
|
||||
// This file is used to build a static library with
|
||||
// asio and beast definitions, to reduce compilation time.
|
||||
// This file is used to build a static library
|
||||
|
||||
// BOOST_ASIO_SEPARATE_COMPILATION for asio
|
||||
#include <boost/asio/impl/src.hpp>
|
||||
|
||||
// BOOST_BEAST_SPLIT_COMPILATION for beast
|
||||
#include <boost/beast/src.hpp>
|
||||
//#include <boost/beast/ssl/impl/src.hpp>
|
||||
|
||||
#ifdef BOOST_BEAST_INCLUDE_TEST_MAIN
|
||||
#include <boost/beast/_experimental/unit_test/main.cpp>
|
||||
#endif
|
||||
Reference in new issue
Block a user