From b3e9fa93505a6f55b4be0c65e54949d2a821655a Mon Sep 17 00:00:00 2001 From: Gulliver Date: Sun, 14 Jul 2024 10:50:42 +0200 Subject: [PATCH] updated github flow with asio for newer crowcpp --- .github/workflows/cmake.yaml | 35 ++++++++++++++++++----------------- CMakeLists.txt | 11 +++++++---- 2 files changed, 25 insertions(+), 21 deletions(-) diff --git a/.github/workflows/cmake.yaml b/.github/workflows/cmake.yaml index 6f791ad..6e86440 100644 --- a/.github/workflows/cmake.yaml +++ b/.github/workflows/cmake.yaml @@ -19,28 +19,29 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-latest, + macos-latest, + windows-latest] steps: - uses: actions/checkout@v3 - name: Prepare dependencies run: | - if [ "$RUNNER_OS" == "Linux" ]; then - sudo apt-get update && \ - sudo apt-get install -yq \ - libboost-system-dev \ - libboost-date-time-dev \ - cmake \ - graphviz doxygen - elif [ "$RUNNER_OS" == "Windows" ]; then - choco install boost-msvc-14.3 graphviz doxygen.install - elif [ "$RUNNER_OS" == "macOS" ]; then - brew install boost graphviz doxygen - else - echo "$RUNNER_OS not supported" - exit 1 - fi - shell: bash + if [ "$RUNNER_OS" == "Linux" ]; then + sudo apt-get update && \ + sudo apt-get install -yq \ + libasio-dev \ + libssl-dev zlib1g-dev \ + cmake graphviz doxygen + elif [ "$RUNNER_OS" == "Windows" ]; then + VCPKG_DEFAULT_TRIPLET=x64-windows vcpkg install + elif [ "$RUNNER_OS" == "macOS" ]; then + brew install asio openssl zlib doxygen graphviz + else + echo "$RUNNER_OS not supported" + exit 1 + fi + shell: bash - name: Configure CMake run: cmake -B build shell: bash diff --git a/CMakeLists.txt b/CMakeLists.txt index 9e88286..a64be4d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,8 +1,11 @@ -cmake_minimum_required(VERSION 3.1.3) +cmake_minimum_required(VERSION 3.15.0 FATAL_ERROR) + +project(oc-issuer VERSION 0.0.2 LANGUAGES CXX) enable_language(C) enable_language(CXX) set(CMAKE_CXX_STANDARD 17) +set(CMAKE_EXPORT_COMPILE_COMMANDS On) if(POLICY CMP0077) cmake_policy(SET CMP0077 NEW) @@ -14,7 +17,6 @@ else() add_compile_options(-Wall -Wextra -pedantic) endif() -project(oc-issuer VERSION 0.0.2 LANGUAGES CXX) include(FetchContent) @@ -25,11 +27,12 @@ set(CROW_BUILD_EXAMPLES Off) set(CROW_BUILD_TOOLS Off) set(CROW_BUILD_TESTS Off) set(CROW_BUILD_DOCS Off) +set(CROW_FEATURES "ssl;compression") # add crow project to the build FetchContent_Declare(crow GIT_REPOSITORY https://github.com/CrowCpp/Crow.git - GIT_TAG v1.0+5 + GIT_TAG v1.2.0 ) if(NOT crow_POPULATED) @@ -54,7 +57,7 @@ set(CATCH_INSTALL_EXTRAS Off) FetchContent_Declare( Catch2 GIT_REPOSITORY https://github.com/catchorg/Catch2.git - GIT_TAG v3.3.1 + GIT_TAG v3.6.0 ) FetchContent_MakeAvailable(Catch2)