From af46a1162a5c4a2e4a9fa1760e16980b966a9735 Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Fri, 2 Sep 2016 10:09:45 -0400 Subject: [PATCH] Tidy up CMakeLists --- CMakeLists.txt | 5 +++-- examples/CMakeLists.txt | 6 +++++- test/CMakeLists.txt | 3 ++- test/Jamfile | 18 +++++++++--------- test/core/CMakeLists.txt | 11 ++++++----- test/core/{detail => }/base64.cpp | 0 .../{detail => }/empty_base_optimization.cpp | 0 test/core/{detail => }/get_lowest_layer.cpp | 0 test/core/{detail => }/sha1.cpp | 0 test/http/CMakeLists.txt | 6 ++++-- test/http/{detail => }/chunk_encode.cpp | 0 test/websocket/CMakeLists.txt | 12 +++++++----- test/websocket/{detail => }/frame.cpp | 0 test/websocket/{detail => }/mask.cpp | 0 test/websocket/{detail => }/stream_base.cpp | 0 test/websocket/{detail => }/utf8_checker.cpp | 0 16 files changed, 36 insertions(+), 25 deletions(-) rename test/core/{detail => }/base64.cpp (100%) rename test/core/{detail => }/empty_base_optimization.cpp (100%) rename test/core/{detail => }/get_lowest_layer.cpp (100%) rename test/core/{detail => }/sha1.cpp (100%) rename test/http/{detail => }/chunk_encode.cpp (100%) rename test/websocket/{detail => }/frame.cpp (100%) rename test/websocket/{detail => }/mask.cpp (100%) rename test/websocket/{detail => }/stream_base.cpp (100%) rename test/websocket/{detail => }/utf8_checker.cpp (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index eaf24de9..20530bbb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -70,6 +70,9 @@ include_directories (include) file(GLOB_RECURSE BEAST_INCLUDES ${PROJECT_SOURCE_DIR}/include/beast/*.hpp ${PROJECT_SOURCE_DIR}/include/beast/*.ipp +) + +file(GLOB_RECURSE EXTRAS_INCLUDES ${PROJECT_SOURCE_DIR}/extras/beast/*.hpp ${PROJECT_SOURCE_DIR}/extras/beast/*.ipp ) @@ -79,5 +82,3 @@ add_subdirectory (test) add_subdirectory (test/core) add_subdirectory (test/http) add_subdirectory (test/websocket) - -#enable_testing() diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index a67c0d8b..d4815e90 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1,12 +1,13 @@ # Part of Beast -GroupSources(extras/beast beast) +GroupSources(extras/beast extras) GroupSources(include/beast beast) GroupSources(examples "/") add_executable (http-crawl ${BEAST_INCLUDES} + ${EXTRAS_INCLUDES} urls_large_data.hpp urls_large_data.cpp http_crawl.cpp @@ -18,6 +19,7 @@ endif() add_executable (http-server ${BEAST_INCLUDES} + ${EXTRAS_INCLUDES} file_body.hpp mime_type.hpp http_async_server.hpp @@ -31,6 +33,7 @@ endif() add_executable (http-example ${BEAST_INCLUDES} + ${EXTRAS_INCLUDES} http_example.cpp ) @@ -40,6 +43,7 @@ endif() add_executable (websocket-example ${BEAST_INCLUDES} + ${EXTRAS_INCLUDES} websocket_example.cpp ) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 6c8bb2b7..c2e53863 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,11 +1,12 @@ # Part of Beast -GroupSources(extras/beast beast) +GroupSources(extras/beast extras) GroupSources(include/beast beast) GroupSources(test "/") add_executable (lib-tests ${BEAST_INCLUDES} + ${EXTRAS_INCLUDES} ../extras/beast/unit_test/main.cpp core.cpp http.cpp diff --git a/test/Jamfile b/test/Jamfile index f3a82b04..7807972f 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -33,10 +33,10 @@ unit-test core-tests : core/streambuf.cpp core/to_string.cpp core/write_dynabuf.cpp - core/detail/base64.cpp - core/detail/empty_base_optimization.cpp - core/detail/get_lowest_layer.cpp - core/detail/sha1.cpp + core/base64.cpp + core/empty_base_optimization.cpp + core/get_lowest_layer.cpp + core/sha1.cpp ; unit-test http-tests : @@ -59,7 +59,7 @@ unit-test http-tests : http/streambuf_body.cpp http/string_body.cpp http/write.cpp - http/detail/chunk_encode.cpp + http/chunk_encode.cpp ; unit-test bench-tests : @@ -75,10 +75,10 @@ unit-test websocket-tests : websocket/rfc6455.cpp websocket/stream.cpp websocket/teardown.cpp - websocket/detail/frame.cpp - websocket/detail/mask.cpp - websocket/detail/stream_base.cpp - websocket/detail/utf8_checker.cpp + websocket/frame.cpp + websocket/mask.cpp + websocket/stream_base.cpp + websocket/utf8_checker.cpp ; exe websocket-echo : diff --git a/test/core/CMakeLists.txt b/test/core/CMakeLists.txt index b7ce10c9..e6d291cd 100644 --- a/test/core/CMakeLists.txt +++ b/test/core/CMakeLists.txt @@ -1,11 +1,12 @@ # Part of Beast -GroupSources(extras/beast beast) +GroupSources(extras/beast extras) GroupSources(include/beast beast) GroupSources(test/core "/") add_executable (core-tests ${BEAST_INCLUDES} + ${EXTRAS_INCLUDES} ../../extras/beast/unit_test/main.cpp buffer_test.hpp async_completion.cpp @@ -27,10 +28,10 @@ add_executable (core-tests streambuf.cpp to_string.cpp write_dynabuf.cpp - detail/base64.cpp - detail/empty_base_optimization.cpp - detail/get_lowest_layer.cpp - detail/sha1.cpp + base64.cpp + empty_base_optimization.cpp + get_lowest_layer.cpp + sha1.cpp ) if (NOT WIN32) diff --git a/test/core/detail/base64.cpp b/test/core/base64.cpp similarity index 100% rename from test/core/detail/base64.cpp rename to test/core/base64.cpp diff --git a/test/core/detail/empty_base_optimization.cpp b/test/core/empty_base_optimization.cpp similarity index 100% rename from test/core/detail/empty_base_optimization.cpp rename to test/core/empty_base_optimization.cpp diff --git a/test/core/detail/get_lowest_layer.cpp b/test/core/get_lowest_layer.cpp similarity index 100% rename from test/core/detail/get_lowest_layer.cpp rename to test/core/get_lowest_layer.cpp diff --git a/test/core/detail/sha1.cpp b/test/core/sha1.cpp similarity index 100% rename from test/core/detail/sha1.cpp rename to test/core/sha1.cpp diff --git a/test/http/CMakeLists.txt b/test/http/CMakeLists.txt index 233ea65e..af038f6d 100644 --- a/test/http/CMakeLists.txt +++ b/test/http/CMakeLists.txt @@ -1,11 +1,12 @@ # Part of Beast -GroupSources(extras/beast beast) +GroupSources(extras/beast extras) GroupSources(include/beast beast) GroupSources(test/http "/") add_executable (http-tests ${BEAST_INCLUDES} + ${EXTRAS_INCLUDES} message_fuzz.hpp fail_parser.hpp ../../extras/beast/unit_test/main.cpp @@ -27,7 +28,7 @@ add_executable (http-tests streambuf_body.cpp string_body.cpp write.cpp - detail/chunk_encode.cpp + chunk_encode.cpp ) if (NOT WIN32) @@ -36,6 +37,7 @@ endif() add_executable (bench-tests ${BEAST_INCLUDES} + ${EXTRAS_INCLUDES} nodejs_parser.hpp ../../extras/beast/unit_test/main.cpp nodejs_parser.cpp diff --git a/test/http/detail/chunk_encode.cpp b/test/http/chunk_encode.cpp similarity index 100% rename from test/http/detail/chunk_encode.cpp rename to test/http/chunk_encode.cpp diff --git a/test/websocket/CMakeLists.txt b/test/websocket/CMakeLists.txt index f408b903..5cc4c20b 100644 --- a/test/websocket/CMakeLists.txt +++ b/test/websocket/CMakeLists.txt @@ -1,11 +1,12 @@ # Part of Beast -GroupSources(extras/beast beast) +GroupSources(extras/beast extras) GroupSources(include/beast beast) GroupSources(test/websocket "/") add_executable (websocket-tests ${BEAST_INCLUDES} + ${EXTRAS_INCLUDES} ../../extras/beast/unit_test/main.cpp websocket_async_echo_server.hpp websocket_sync_echo_server.hpp @@ -14,10 +15,10 @@ add_executable (websocket-tests rfc6455.cpp stream.cpp teardown.cpp - detail/frame.cpp - detail/mask.cpp - detail/stream_base.cpp - detail/utf8_checker.cpp + frame.cpp + mask.cpp + stream_base.cpp + utf8_checker.cpp ) if (NOT WIN32) @@ -26,6 +27,7 @@ endif() add_executable (websocket-echo ${BEAST_INCLUDES} + ${EXTRAS_INCLUDES} websocket_async_echo_server.hpp websocket_sync_echo_server.hpp websocket_echo.cpp diff --git a/test/websocket/detail/frame.cpp b/test/websocket/frame.cpp similarity index 100% rename from test/websocket/detail/frame.cpp rename to test/websocket/frame.cpp diff --git a/test/websocket/detail/mask.cpp b/test/websocket/mask.cpp similarity index 100% rename from test/websocket/detail/mask.cpp rename to test/websocket/mask.cpp diff --git a/test/websocket/detail/stream_base.cpp b/test/websocket/stream_base.cpp similarity index 100% rename from test/websocket/detail/stream_base.cpp rename to test/websocket/stream_base.cpp diff --git a/test/websocket/detail/utf8_checker.cpp b/test/websocket/utf8_checker.cpp similarity index 100% rename from test/websocket/detail/utf8_checker.cpp rename to test/websocket/utf8_checker.cpp