diff --git a/asio/.TODO.txt b/asio/.TODO.txt index 571f32b427..6819e6b0b4 100644 --- a/asio/.TODO.txt +++ b/asio/.TODO.txt @@ -1,89 +1,97 @@ -ninja -C build/dev spell-check +#!/bin/sh +set -x +set -e + +make +git ls-files '::*CMakeLists.txt' | xargs cmake-lint +ninja -C build/dev spell-check 2>&1 | tee .TODO.txt +# ninja: Entering directory `build/dev' [1/1] Checking spelling -FAILED: CMakeFiles/spell-check /home/klein_cl/Workspace/cpp/asio/asio/build/dev/CMakeFiles/spell-check -cd /home/klein_cl/Workspace/cpp/asio/asio && /home/klein_cl/.local/lib/python3.10/site-packages/cmake/data/bin/cmake -D SPELL_COMMAND=codespell -P /home/klein_cl/Workspace/cpp/asio/asio/cmake/spell.cmake +FAILED: CMakeFiles/spell-check /Users/clausklein/Workspace/cpp/asio/asio/build/dev/CMakeFiles/spell-check +cd /Users/clausklein/Workspace/cpp/asio/asio && /usr/local/bin/cmake -D SPELL_COMMAND=codespell -P /Users/clausklein/Workspace/cpp/asio/asio/cmake/spell.cmake Used config files: 1: .codespellrc -./src/examples/cpp14/operations/composed_7.cpp:73: asychronous ==> asynchronous -./src/examples/cpp14/operations/composed_7.cpp:119: asychronous ==> asynchronous -./src/examples/cpp14/operations/composed_6.cpp:111: asychronous ==> asynchronous +./include/asio/basic_datagram_socket.hpp:348: ore ==> or +./include/asio/basic_datagram_socket.hpp:380: ore ==> or +./include/asio/basic_raw_socket.hpp:342: ore ==> or +./include/asio/basic_raw_socket.hpp:373: ore ==> or +./include/asio/disposition.hpp:29: arbtirary ==> arbitrary +./include/asio/io_context.hpp:301: reponsibility ==> responsibility +./include/asio/io_context.hpp:350: reponsibility ==> responsibility +./include/asio/use_future.hpp:93: retuned ==> returned +./include/asio/impl/use_future.hpp:105: exeption ==> exception, exemption +./include/asio/experimental/impl/parallel_group.hpp:81: operatations ==> operations +./include/asio/experimental/impl/parallel_group.hpp:396: operatations ==> operations +./include/asio/detail/executor_function.hpp:119: copyable ==> copiable +./include/asio/detail/service_registry.hpp:79: Initalise ==> Initialise +./include/asio/detail/service_registry.hpp:84: Initalise ==> Initialise +./include/asio/detail/timer_queue_ptime.hpp:34: instantation ==> instantiation +./include/asio/detail/win_iocp_io_context.hpp:260: resouce ==> resource +./include/asio/detail/impl/socket_ops.ipp:3330: servent ==> servant, serpent, fervent +./include/asio/detail/impl/socket_ops.ipp:3341: servent ==> servant, serpent, fervent +./include/asio/detail/impl/socket_ops.ipp:3715: servent ==> servant, serpent, fervent +./include/asio/execution/any_executor.hpp:112: requre ==> require +./include/asio/execution/impl/bad_executor.ipp:2: exection ==> execution, ejection, election, exertion +./include/asio/ip/detail/endpoint.hpp:31: implementating ==> implementing +./src/examples/cpp20/operations/composed_6.cpp:116: asychronous ==> asynchronous +./src/examples/cpp20/operations/composed_7.cpp:74: asychronous ==> asynchronous +./src/examples/cpp20/operations/composed_7.cpp:120: asychronous ==> asynchronous ./src/examples/cpp11/timers/time_t_timer.cpp:66: absoluate ==> absolute ./src/examples/cpp11/porthopper/client.cpp:96: renegotation ==> renegotiation ./src/examples/cpp11/porthopper/client.cpp:120: renegotation ==> renegotiation ./src/examples/cpp11/porthopper/client.cpp:149: renegotation ==> renegotiation ./src/examples/cpp11/porthopper/client.cpp:162: renegotation ==> renegotiation -./src/examples/cpp11/operations/composed_7.cpp:60: asychronous ==> asynchronous ./src/examples/cpp11/operations/composed_6.cpp:93: asychronous ==> asynchronous -./src/examples/cpp20/operations/composed_7.cpp:74: asychronous ==> asynchronous -./src/examples/cpp20/operations/composed_7.cpp:120: asychronous ==> asynchronous -./src/examples/cpp20/operations/composed_6.cpp:116: asychronous ==> asynchronous -./src/doc/reference.qbk:1697: requre ==> require -./src/doc/reference.qbk:3966: requre ==> require -./src/doc/reference.qbk:17885: ore ==> or -./src/doc/reference.qbk:17947: ore ==> or -./src/doc/reference.qbk:32144: ore ==> or -./src/doc/reference.qbk:32206: ore ==> or -./src/doc/reference.qbk:89453: requre ==> require -./src/doc/reference.qbk:110672: reponsibility ==> responsibility -./src/doc/reference.qbk:110715: reponsibility ==> responsibility -./src/doc/reference.qbk:110799: reponsibility ==> responsibility -./src/doc/reference.qbk:110833: reponsibility ==> responsibility -./src/doc/reference.qbk:164642: retuned ==> returned -./src/doc/history.qbk:41: potental ==> potential -./src/doc/history.qbk:165: immmediate ==> immediate -./src/doc/history.qbk:863: occured ==> occurred -./src/doc/history.qbk:1710: compatiblity ==> compatibility -./src/doc/history.qbk:1827: Lightening ==> Lightning, Lighting -./src/doc/history.qbk:1903: copyable ==> copiable -./src/doc/history.qbk:1946: discconected ==> disconnected -./src/doc/history.qbk:2108: compatability ==> compatibility -./src/doc/history.qbk:2533: copyable ==> copiable -./src/doc/history.qbk:2568: accomodate ==> accommodate -./src/doc/history.qbk:2788: tranferred ==> transferred -./src/doc/history.qbk:2907: re-use ==> reuse +./src/examples/cpp11/operations/composed_7.cpp:60: asychronous ==> asynchronous +./src/examples/cpp14/operations/composed_6.cpp:111: asychronous ==> asynchronous +./src/examples/cpp14/operations/composed_7.cpp:73: asychronous ==> asynchronous +./src/examples/cpp14/operations/composed_7.cpp:119: asychronous ==> asynchronous +./src/doc/history.qbk:327: potental ==> potential +./src/doc/history.qbk:451: immmediate ==> immediate +./src/doc/history.qbk:1149: occured ==> occurred +./src/doc/history.qbk:1996: compatiblity ==> compatibility +./src/doc/history.qbk:2113: Lightening ==> Lightning, Lighting +./src/doc/history.qbk:2189: copyable ==> copiable +./src/doc/history.qbk:2232: discconected ==> disconnected +./src/doc/history.qbk:2394: compatability ==> compatibility +./src/doc/history.qbk:2819: copyable ==> copiable +./src/doc/history.qbk:2854: accomodate ==> accommodate +./src/doc/history.qbk:3074: tranferred ==> transferred +./src/doc/history.qbk:3193: re-use ==> reuse ./src/doc/quickref.xml:17: thead ==> thread ./src/doc/quickref.xml:26: thead ==> thread ./src/doc/quickref.xml:133: thead ==> thread ./src/doc/quickref.xml:139: thead ==> thread -./src/doc/quickref.xml:320: thead ==> thread -./src/doc/quickref.xml:326: thead ==> thread -./src/doc/quickref.xml:427: thead ==> thread -./src/doc/quickref.xml:433: thead ==> thread -./src/doc/quickref.xml:577: thead ==> thread -./src/doc/quickref.xml:592: thead ==> thread -./src/doc/quickref.xml:693: thead ==> thread -./src/doc/quickref.xml:705: thead ==> thread +./src/doc/quickref.xml:350: thead ==> thread +./src/doc/quickref.xml:356: thead ==> thread +./src/doc/quickref.xml:454: thead ==> thread +./src/doc/quickref.xml:460: thead ==> thread +./src/doc/quickref.xml:604: thead ==> thread +./src/doc/quickref.xml:619: thead ==> thread +./src/doc/quickref.xml:719: thead ==> thread +./src/doc/quickref.xml:731: thead ==> thread +./src/doc/reference.qbk:1705: requre ==> require +./src/doc/reference.qbk:3974: requre ==> require +./src/doc/reference.qbk:18087: ore ==> or +./src/doc/reference.qbk:18149: ore ==> or +./src/doc/reference.qbk:32346: ore ==> or +./src/doc/reference.qbk:32408: ore ==> or +./src/doc/reference.qbk:91119: requre ==> require +./src/doc/reference.qbk:112306: reponsibility ==> responsibility +./src/doc/reference.qbk:112349: reponsibility ==> responsibility +./src/doc/reference.qbk:112433: reponsibility ==> responsibility +./src/doc/reference.qbk:112467: reponsibility ==> responsibility +./src/doc/reference.qbk:167559: retuned ==> returned ./src/doc/using.qbk:232: Explictly ==> Explicitly ./src/doc/requirements/asynchronous_operations.qbk:332: asynchonous ==> asynchronous -./src/doc/overview/immediate_completion.qbk:16: immmediate ==> immediate -./src/doc/overview/cpp20_coroutines.qbk:223: Asynchonous ==> Asynchronous ./src/doc/overview/coro.qbk:15: transfomers ==> transformers ./src/doc/overview/coro.qbk:136: dermined ==> determined ./src/doc/overview/coro.qbk:137: follwing ==> following ./src/doc/overview/coro.qbk:194: direclty ==> directly +./src/doc/overview/cpp20_coroutines.qbk:223: Asynchonous ==> Asynchronous +./src/doc/overview/immediate_completion.qbk:16: immmediate ==> immediate ./src/doc/overview/implementation.qbk:63: asynchonous ==> asynchronous -./cmake/install-rules.cmake:19: requierd ==> required -./include/asio/io_context.hpp:300: reponsibility ==> responsibility -./include/asio/io_context.hpp:331: reponsibility ==> responsibility -./include/asio/io_context.hpp:381: reponsibility ==> responsibility -./include/asio/io_context.hpp:403: reponsibility ==> responsibility -./include/asio/basic_datagram_socket.hpp:348: ore ==> or -./include/asio/basic_datagram_socket.hpp:380: ore ==> or -./include/asio/use_future.hpp:102: retuned ==> returned -./include/asio/basic_raw_socket.hpp:342: ore ==> or -./include/asio/basic_raw_socket.hpp:373: ore ==> or -./include/asio/detail/timer_queue_ptime.hpp:32: instantation ==> instantiation -./include/asio/detail/executor_function.hpp:119: copyable ==> copiable -./include/asio/detail/service_registry.hpp:79: Initalise ==> Initialise -./include/asio/detail/service_registry.hpp:84: Initalise ==> Initialise -./include/asio/detail/win_iocp_io_context.hpp:267: resouce ==> resource -./include/asio/execution/any_executor.hpp:112: requre ==> require -./include/asio/execution/impl/bad_executor.ipp:2: exection ==> execution -./include/asio/experimental/impl/parallel_group.hpp:81: operatations ==> operations -./include/asio/experimental/impl/parallel_group.hpp:396: operatations ==> operations -./include/asio/ip/detail/endpoint.hpp:31: implementating ==> implementing -./include/asio/impl/use_future.hpp:104: exeption ==> exception, exemption CMake Error at cmake/spell.cmake:27 (message): Run again with FIX=YES to fix these errors. diff --git a/asio/.cmakefiles.txt b/asio/.cmakefiles.txt index a954372d4e..ec21cb1329 100644 --- a/asio/.cmakefiles.txt +++ b/asio/.cmakefiles.txt @@ -11,7 +11,7 @@ files=' .cmakefiles.txt .codespellrc .gitignore -GNUMakefile +GNUmakefile docs requirements.txt BUILDING.md @@ -33,7 +33,6 @@ cmake/install-rules.cmake cmake/lint-targets.cmake cmake/lint.cmake cmake/prelude.cmake -cmake/project-is-top-level.cmake cmake/spell-targets.cmake cmake/spell.cmake cmake/variables.cmake diff --git a/asio/CMakeLists.txt b/asio/CMakeLists.txt index c9e4ccae81..1f6c26550a 100644 --- a/asio/CMakeLists.txt +++ b/asio/CMakeLists.txt @@ -9,7 +9,6 @@ project(asio LANGUAGES CXX ) -# include(cmake/project-is-top-level.cmake) include(cmake/variables.cmake) if(PROJECT_IS_TOP_LEVEL) @@ -33,51 +32,59 @@ find_package(Threads REQUIRED) # ---- Declare library ---- -file(GLOB_RECURSE implementation "include/asio/*/*.hpp" "include/asio/*.ipp") -list(FILTER implementation EXCLUDE REGEX [=[.*/experimental/.*]=]) +file(GLOB_RECURSE _asio_implementation "include/asio/*/*.hpp" "include/asio/*.ipp") +list(FILTER _asio_implementation EXCLUDE REGEX [=[.*/experimental/.*]=]) add_library(asio_header INTERFACE) add_library(asio::asio_header ALIAS asio_header) -target_sources(asio_header INTERFACE FILE_SET HEADERS BASE_DIRS include FILES ${implementation}) +target_sources(asio_header INTERFACE FILE_SET HEADERS BASE_DIRS include FILES ${_asio_implementation}) target_compile_definitions(asio_header INTERFACE ${CPPdefinitions}) -target_compile_features(asio_header INTERFACE cxx_std_20) +target_compile_features( + asio_header INTERFACE "$<$:cxx_std_23>" + "$<$>:cxx_std_20>" +) target_link_libraries(asio_header INTERFACE Threads::Threads) if(ASIO_SEPARATE_COMPILATION) - #XXX find_package(OpenSSL) - set(libasio_SOURCES src/asio.cpp) + set(_libasio_SOURCES src/asio.cpp) + # TODO(ssl): find_package(OpenSSL) if(OpenSSL_FOUND) - #XXX set(libasio_SOURCES ${libasio_SOURCES} src/asio_ssl.cpp) + # TODO(ssl): list(APPEND _libasio_SOURCES src/asio_ssl.cpp) endif() set(CMAKE_VERIFY_INTERFACE_HEADER_SETS ${PROJECT_IS_TOP_LEVEL}) - file(GLOB_RECURSE headers "include/asio/*.hpp") - list(FILTER headers EXCLUDE REGEX [=[.*/experimental/.*\.hpp]=]) - list(FILTER headers EXCLUDE REGEX [=[.*/ssl\.hpp]=]) - list(FILTER headers EXCLUDE REGEX [=[.*/ssl/\.*]=]) - list(FILTER headers EXCLUDE REGEX [=[.*/spawn.*\.hpp]=]) + file(GLOB_RECURSE _asio_headers "include/asio/*.hpp") + list(FILTER _asio_headers EXCLUDE REGEX [=[.*/experimental/.*\.hpp]=]) + list(FILTER _asio_headers EXCLUDE REGEX [=[.*/ssl\.hpp]=]) + list(FILTER _asio_headers EXCLUDE REGEX [=[.*/ssl/\.*]=]) + list(FILTER _asio_headers EXCLUDE REGEX [=[.*/spawn.*\.hpp]=]) # FIXME: some header in include/asio/detail fails CMAKE_VERIFY_INTERFACE_HEADER_SETS! # NOTE: we need them installed, but we used them install with asio_header INTERFACE! CK - set(public_headers ${headers}) - list(FILTER public_headers EXCLUDE REGEX [=[.*/detail/.*\.hpp]=]) - list(FILTER public_headers EXCLUDE REGEX [=[.*/impl/.*\.hpp]=]) - list(FILTER public_headers EXCLUDE REGEX [=[.*/ssl/\.*]=]) - list(FILTER public_headers EXCLUDE REGEX [=[.*/spawn.*\.hpp]=]) - # foreach(header in LISTS ${public_headers}) + set(_public_headers ${_asio_headers}) + list(FILTER _public_headers EXCLUDE REGEX [=[.*/detail/.*\.hpp]=]) + list(FILTER _public_headers EXCLUDE REGEX [=[.*/impl/.*\.hpp]=]) + list(FILTER _public_headers EXCLUDE REGEX [=[.*/spawn.*\.hpp]=]) + # foreach(header in LISTS ${_public_headers}) # message(INFO "${header}") # endforeach() - add_library(asio ${libasio_SOURCES}) + add_library(asio ${_libasio_SOURCES}) add_library(asio::asio ALIAS asio) - target_sources(asio PUBLIC FILE_SET public_headers TYPE HEADERS BASE_DIRS include FILES ${public_headers}) + target_sources(asio PUBLIC FILE_SET public_headers TYPE HEADERS BASE_DIRS include FILES ${_public_headers}) target_compile_definitions(asio PUBLIC ASIO_SEPARATE_COMPILATION ${CPPdefinitions}) target_link_libraries(asio PUBLIC Threads::Threads) - target_compile_features(asio INTERFACE cxx_std_20) + target_compile_features( + asio INTERFACE "$<$:cxx_std_23>" "$<$>:cxx_std_20>" + ) + + if(ASIO_WARNINGS_AS_ERRORS AND ASIO_DEVELOPER_MODE AND UNIX) + target_compile_options(asio PUBLIC -Werror) + endif() if(OpenSSL_FOUND) target_link_libraries(asio PUBLIC OpenSSL::SSL) @@ -94,7 +101,7 @@ endif() # ---- Developer mode ---- -if(NOT asio_DEVELOPER_MODE) +if(NOT ASIO_DEVELOPER_MODE) return() elseif(NOT PROJECT_IS_TOP_LEVEL) message(AUTHOR_WARNING "Developer mode is intended for developers of asio") diff --git a/asio/CMakePresets.json b/asio/CMakePresets.json index 1be4fd62e3..4cddbf9df9 100644 --- a/asio/CMakePresets.json +++ b/asio/CMakePresets.json @@ -26,7 +26,7 @@ "hidden": true, "inherits": "cmake-pedantic", "cacheVariables": { - "asio_DEVELOPER_MODE": "ON" + "ASIO_DEVELOPER_MODE": "ON" } }, { diff --git a/asio/GNUMakefile b/asio/GNUmakefile similarity index 100% rename from asio/GNUMakefile rename to asio/GNUmakefile diff --git a/asio/HACKING.md b/asio/HACKING.md index 553503b8e3..731de4d571 100644 --- a/asio/HACKING.md +++ b/asio/HACKING.md @@ -9,7 +9,7 @@ guide. ## Developer mode Build system targets that are only useful for developers of this project are -hidden if the `asio_DEVELOPER_MODE` option is disabled. Enabling this +hidden if the `ASIO_DEVELOPER_MODE` option is disabled. Enabling this option makes tests and other developer targets and options available. Not enabling this option means that you are a consumer of this project and thus you have no need for these targets and options. @@ -23,7 +23,7 @@ the project. As a developer, you are recommended to always have the [latest CMake version][2] installed to make use of the latest Quality-of-Life additions. -You have a few options to pass `asio_DEVELOPER_MODE` to the configure +You have a few options to pass `ASIO_DEVELOPER_MODE` to the configure command, but this project prefers to use presets. As a developer, you should create a `CMakeUserPresets.json` file at the root of diff --git a/asio/cmake/install-rules.cmake b/asio/cmake/install-rules.cmake index 3973c7558d..fa920450bc 100644 --- a/asio/cmake/install-rules.cmake +++ b/asio/cmake/install-rules.cmake @@ -10,8 +10,8 @@ include(cmake/AddUninstallTarget.cmake) include(CMakePackageConfigHelpers) include(GNUInstallDirs) -# find_package() call for consumers to find this project -set(package asio) +# find_package(