diff --git a/asio/.CMakeUserPresets.json b/asio/.CMakeUserPresets.json index 1edd3e3934..b002ab47c2 100644 --- a/asio/.CMakeUserPresets.json +++ b/asio/.CMakeUserPresets.json @@ -72,13 +72,18 @@ "name": "dev", "configurePreset": "dev", "configuration": "Debug", - "jobs": 12 + "jobs": 12, + "targets": [ + "install" + ] }, { "name": "verify", "configurePreset": "dev", "jobs": 12, - "targets": ["all_verify_interface_header_sets"] + "targets": [ + "all_verify_interface_header_sets" + ] } ], "testPresets": [ diff --git a/asio/.cmakefiles.txt b/asio/.cmakefiles.txt index ec21cb1329..ef19448afe 100644 --- a/asio/.cmakefiles.txt +++ b/asio/.cmakefiles.txt @@ -37,6 +37,7 @@ cmake/spell-targets.cmake cmake/spell.cmake cmake/variables.cmake cmake/windows-set-path.cmake +src/examples/CMakeLists.txt src/tests/CMakeLists.txt ' diff --git a/asio/CMakeLists.txt b/asio/CMakeLists.txt index 1f6c26550a..de6432b037 100644 --- a/asio/CMakeLists.txt +++ b/asio/CMakeLists.txt @@ -26,6 +26,8 @@ endif() option(ASIO_SEPARATE_COMPILATION "build asio lib too" ${PROJECT_IS_TOP_LEVEL}) +set(CMAKE_DEBUG_POSTFIX D) + # ---- add dependency libraries ---- find_package(Threads REQUIRED) @@ -64,7 +66,7 @@ if(ASIO_SEPARATE_COMPILATION) # 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 ${_asio_headers}) + set(_public_headers include/asio.hpp ${_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]=]) diff --git a/asio/CMakePresets.json b/asio/CMakePresets.json index 4cddbf9df9..d3dd114d49 100644 --- a/asio/CMakePresets.json +++ b/asio/CMakePresets.json @@ -50,7 +50,7 @@ "hidden": true, "cacheVariables": { "CMAKE_CXX_EXTENSIONS": "OFF", - "CMAKE_CXX_STANDARD": "17", + "CMAKE_CXX_STANDARD": "20", "CMAKE_CXX_STANDARD_REQUIRED": "ON" } }, @@ -177,6 +177,13 @@ { "name": "ci-build", "binaryDir": "${sourceDir}/build", + "installDir": "${sourceDir}/stagedir", + "cacheVariables": { + "CMAKE_PREFIX_PATH": { + "type": "path", + "value": "${sourceDir}/stagedir" + } + }, "hidden": true }, { diff --git a/asio/cmake/dev-mode.cmake b/asio/cmake/dev-mode.cmake index 2817aff274..d8e86da20a 100644 --- a/asio/cmake/dev-mode.cmake +++ b/asio/cmake/dev-mode.cmake @@ -3,7 +3,9 @@ include(cmake/folders.cmake) option(ASIO_BUILD_TESTING "Use ctest" ON) if(ASIO_BUILD_TESTING) enable_testing() + add_subdirectory(src/tests) + add_subdirectory(src/examples) endif() option(ASIO_BUILD_MCSS_DOCS "Build documentation using Doxygen and m.css" OFF) diff --git a/asio/cmake/install-rules.cmake b/asio/cmake/install-rules.cmake index fa920450bc..9e2b2bf2dd 100644 --- a/asio/cmake/install-rules.cmake +++ b/asio/cmake/install-rules.cmake @@ -1,6 +1,6 @@ -if(PROJECT_IS_TOP_LEVEL) - set(CMAKE_INSTALL_INCLUDEDIR "include/asio-${PROJECT_VERSION}" CACHE PATH "") -endif() +# if(PROJECT_IS_TOP_LEVEL) +# NO! set(CMAKE_INSTALL_INCLUDEDIR "include/asio-${PROJECT_VERSION}" CACHE PATH "") +# endif() # Project is configured with no languages, so tell GNUInstallDirs the lib dir set(CMAKE_INSTALL_LIBDIR lib CACHE PATH "") @@ -10,6 +10,9 @@ include(cmake/AddUninstallTarget.cmake) include(CMakePackageConfigHelpers) include(GNUInstallDirs) +# Print Installing but not Up-to-date messages. +set(CMAKE_INSTALL_MESSAGE LAZY) + # find_package( to prevent problems! CK + if(CMAKE_BUILD_TYPE STREQUAL Debug) + add_test( + NAME find-package-test + COMMAND ${CMAKE_CTEST_COMMAND} --verbose --output-on-failure -C Debug --build-and-test + "${CMAKE_SOURCE_DIR}/src/examples" "${CMAKE_CURRENT_BINARY_DIR}/find-package-test" --build-generator + ${CMAKE_GENERATOR} --build-makeprogram ${CMAKE_MAKE_PROGRAM} --build-options + "-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}" "-DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD}" + "-DCMAKE_BUILD_TYPE=Debug" "-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}" + ) + endif() endif() # ---- Setup strict Compiler Warnings ----