Skip to content

Commit

Permalink
extern/asio: Bump and require v1.18.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisklein committed May 28, 2021
1 parent ce0a052 commit d15bc17
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 73 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
url = https://github.com/google/googletest
[submodule "extern/asio"]
path = extern/asio
url = https://github.com/chriskohlhoff/asio
url = https://github.com/FairRootGroup/asio
[submodule "extern/PicoSHA2"]
path = extern/PicoSHA2
url = https://github.com/okdshin/PicoSHA2
30 changes: 17 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
# copied verbatim in the file "LICENSE" #
################################################################################

cmake_minimum_required(VERSION 3.12 FATAL_ERROR)
cmake_policy(VERSION 3.12...3.15)
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
cmake_policy(VERSION 3.14...3.20)

# Project ######################################################################
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
Expand Down Expand Up @@ -132,7 +132,7 @@ endif()

if(BUILD_SDK)
find_package2(BUNDLED asio
VERSION 1.18.0
VERSION 1.18.1
)
if(NOT asio_FOUND)
build_bundled(asio extern/asio)
Expand Down Expand Up @@ -236,18 +236,18 @@ if(BUILD_DOCS)
)
endif()
if(BUILD_SDK)
install(FILES cmake/Findasio.cmake
DESTINATION ${PROJECT_INSTALL_CMAKEMODDIR}
)
if(asio_BUNDLED)
add_library(bundled_asio_headers INTERFACE)
target_include_directories(bundled_asio_headers INTERFACE
$<BUILD_INTERFACE:${asio_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}>
$<INSTALL_INTERFACE:${PROJECT_INSTALL_INCDIR}/bundled>
)
install(TARGETS bundled_asio_headers EXPORT ${PROJECT_EXPORT_SET})
install(DIRECTORY "${asio_BUILD_INCLUDE_DIR}/asio"
DESTINATION ${asio_INSTALL_INCLUDE_DIR}
PATTERN "Makefile.am" EXCLUDE
PATTERN ".gitignore" EXCLUDE
install(DIRECTORY "${asio_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/asio"
DESTINATION ${PROJECT_INSTALL_INCDIR}/bundled
)
install(FILES "${asio_BUILD_INCLUDE_DIR}/asio.hpp"
DESTINATION ${asio_INSTALL_INCLUDE_DIR}
install(FILES "${asio_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/asio.hpp"
DESTINATION ${PROJECT_INSTALL_INCDIR}/bundled
)
endif()
endif()
Expand Down Expand Up @@ -336,7 +336,11 @@ if(PROJECT_PACKAGE_DEPENDENCIES)
endif()
get_filename_component(prefix ${flatbuffers_include}/.. ABSOLUTE)
else()
get_filename_component(prefix ${${dep}_INCLUDE_DIR}/.. ABSOLUTE)
if(${dep}_PREFIX)
set(prefix ${${dep}_PREFIX})
else()
get_filename_component(prefix ${${dep}_INCLUDE_DIR}/.. ABSOLUTE)
endif()
endif()
if(NOT ${dep}_BUNDLED)
message(STATUS " ${BWhite}${dep_padded}${CR}${version_padded}${prefix}")
Expand Down
14 changes: 10 additions & 4 deletions cmake/FairMQLib.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ if(\"\${CMAKE_MAJOR_VERSION}.\${CMAKE_MINOR_VERSION}\" VERSION_LESS 3.11)
message(FATAL_ERROR \"CMake >= 3.11 required\")
endif()
set_target_properties(${PROJECT_NAME}::bundled_asio_headers PROPERTIES IMPORTED_GLOBAL TRUE)
add_library(asio::headers ALIAS ${PROJECT_NAME}::bundled_asio_headers)
add_library(asio::asio ALIAS ${PROJECT_NAME}::bundled_asio_headers)
set(asio_VERSION ${asio_VERSION})
")
Expand Down Expand Up @@ -502,9 +502,15 @@ function(build_bundled package bundle)
exec(${CMAKE_COMMAND} --build ${${package}_BINARY_DIR})
exec(${CMAKE_COMMAND} --build ${${package}_BINARY_DIR} --target install)
elseif(${package} STREQUAL asio)
set(${package}_BUILD_INCLUDE_DIR ${${package}_SOURCE_DIR}/asio/include CACHE PATH "Bundled ${package} build-interface include dir")
set(${package}_INSTALL_INCLUDE_DIR ${PROJECT_INSTALL_INCDIR}/bundled CACHE PATH "Bundled ${package} install-interface include dir")
set(${package}_ROOT ${${package}_SOURCE_DIR}/asio)
set(${package}_INSTALL_DIR ${CMAKE_BINARY_DIR}/${bundle}_install)
file(MAKE_DIRECTORY ${${package}_INSTALL_DIR})
set(${package}_ROOT ${${package}_INSTALL_DIR})

exec(${CMAKE_COMMAND} -S ${${package}_SOURCE_DIR} -B ${${package}_BINARY_DIR} -G ${CMAKE_GENERATOR}
-DCMAKE_INSTALL_PREFIX=${${package}_INSTALL_DIR}
)
exec(${CMAKE_COMMAND} --build ${${package}_BINARY_DIR})
exec(${CMAKE_COMMAND} --build ${${package}_BINARY_DIR} --target install)
elseif(${package} STREQUAL PicoSHA2)
set(${package}_ROOT ${${package}_SOURCE_DIR})
endif()
Expand Down
53 changes: 0 additions & 53 deletions cmake/Findasio.cmake

This file was deleted.

2 changes: 1 addition & 1 deletion extern/asio
Submodule asio updated 64 files
+0 −139 .appveyor.yml
+0 −16 .cirrus.yml
+0 −372 .travis.yml
+70 −0 CMakeLists.txt
+15 −0 asio-config.cmake.in
+1 −1 asio/INSTALL
+2 −2 asio/README
+26 −0 asio/asio.manifest
+65 −3 asio/boost_asio.manifest
+1 −1 asio/configure.ac
+2 −0 asio/include/Makefile.am
+2 −2 asio/include/asio/async_result.hpp
+4 −0 asio/include/asio/basic_signal_set.hpp
+4 −0 asio/include/asio/detail/bind_handler.hpp
+27 −13 asio/include/asio/detail/config.hpp
+2 −1 asio/include/asio/detail/executor_function.hpp
+9 −7 asio/include/asio/detail/impl/eventfd_select_interrupter.ipp
+9 −9 asio/include/asio/detail/impl/socket_ops.ipp
+1 −0 asio/include/asio/detail/impl/win_iocp_io_context.hpp
+6 −0 asio/include/asio/detail/push_options.hpp
+2 −2 asio/include/asio/detail/resolve_query_op.hpp
+6 −6 asio/include/asio/detail/resolver_service.hpp
+15 −0 asio/include/asio/detail/resolver_service_base.hpp
+1 −0 asio/include/asio/detail/socket_types.hpp
+1 −1 asio/include/asio/detail/std_event.hpp
+4 −4 asio/include/asio/detail/thread.hpp
+4 −0 asio/include/asio/detail/thread_group.hpp
+8 −1 asio/include/asio/detail/thread_info_base.hpp
+193 −111 asio/include/asio/execution/any_executor.hpp
+1 −1 asio/include/asio/execution/executor.hpp
+135 −0 asio/include/asio/experimental/as_single.hpp
+225 −0 asio/include/asio/experimental/impl/as_single.hpp
+1 −1 asio/include/asio/impl/awaitable.hpp
+2 −0 asio/include/asio/impl/buffered_read_stream.hpp
+2 −0 asio/include/asio/impl/buffered_write_stream.hpp
+1 −1 asio/include/asio/impl/read.hpp
+1 −1 asio/include/asio/impl/read_at.hpp
+1 −0 asio/include/asio/impl/redirect_error.hpp
+1 −0 asio/include/asio/impl/spawn.hpp
+13 −13 asio/include/asio/impl/use_awaitable.hpp
+1 −1 asio/include/asio/impl/write.hpp
+1 −1 asio/include/asio/impl/write_at.hpp
+46 −0 asio/include/asio/ip/basic_resolver.hpp
+4 −0 asio/include/asio/posix/basic_stream_descriptor.hpp
+1 −0 asio/include/asio/ssl/detail/io.hpp
+4 −1 asio/include/asio/strand.hpp
+6 −2 asio/include/asio/traits/equality_comparable.hpp
+2 −1 asio/include/asio/traits/static_require_concept.hpp
+1 −1 asio/include/asio/version.hpp
+7 −0 asio/src/Makefile.msc
+1 −1 asio/src/doc/asio.qbk
+0 −1 asio/src/doc/examples.qbk
+85 −0 asio/src/doc/history.qbk
+11 −2 asio/src/doc/overview/implementation.qbk
+88 −0 asio/src/doc/platform_macros.pl
+585 −0 asio/src/doc/platform_macros.qbk
+2 −0 asio/src/doc/quickref.xml
+1 −0 asio/src/doc/reference.dox
+475 −4 asio/src/doc/reference.qbk
+120 −10 asio/src/doc/using.qbk
+2 −0 asio/src/examples/cpp17/Makefile.am
+1 −0 asio/src/examples/cpp17/coroutines_ts/.gitignore
+71 −0 asio/src/examples/cpp17/coroutines_ts/echo_server_with_as_single_default.cpp
+8 −0 asio/src/tests/unit/thread_pool.cpp
2 changes: 1 addition & 1 deletion fairmq/sdk/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ target_include_directories(${target}
)
target_link_libraries(${target}
PUBLIC
asio::headers
asio::asio
Boost::boost
Boost::filesystem
FairLogger::FairLogger
Expand Down

0 comments on commit d15bc17

Please sign in to comment.