From d0ea0d1a8536f16a8911fe137d42b2e718240c57 Mon Sep 17 00:00:00 2001 From: Rajeev Ranjan Date: Tue, 22 Oct 2024 16:47:25 +0200 Subject: [PATCH] test version compatability --- .github/workflows/version_compatability.yml | 11 +++-------- CMakeLists.txt | 5 +++-- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/workflows/version_compatability.yml b/.github/workflows/version_compatability.yml index 44a02db..65e4ec3 100644 --- a/.github/workflows/version_compatability.yml +++ b/.github/workflows/version_compatability.yml @@ -17,14 +17,16 @@ jobs: - uses: actions/checkout@v4 - name: build openssl run: | - git clone https://github.com/openssl/openssl.git --branch ${{ matrix.branch }} + git clone https://github.com/openssl/openssl.git --branch ${{ matrix.branch }} --depth 1 cd openssl ./config --banner=Configured --strict-warnings --prefix=/usr/local/${{ matrix.branch }} --openssldir=/usr/local/${{ matrix.branch }}/ssl shared zlib make -s -j4 sudo make install_sw install_ssldirs cd .. echo "OPENSSL_DIR=/usr/local/${{ matrix.branch }}" >> $GITHUB_ENV + echo "OpenSSL_DIR=/usr/local/${{ matrix.branch }}" >> $GITHUB_ENV echo "OPENSSL_LIB=/usr/local/${{ matrix.branch }}/lib64" >> $GITHUB_ENV + echo "OpenSSL_LIB=/usr/local/${{ matrix.branch }}/lib64" >> $GITHUB_ENV echo "PATH=/usr/local/${{ matrix.branch }}/bin:$PATH" >> $GITHUB_ENV - name: make run: | @@ -36,13 +38,6 @@ jobs: run: | cmake . make - mkdir build - cd build - cmake -S .. -B . - cmake --build . - cmake -DCMAKE_BUILD_TYPE=Release .. - make clean build - cd .. mkdir build-with-libcmp cd build-with-libcmp USE_LIBCMP=1 cmake -S .. -B . diff --git a/CMakeLists.txt b/CMakeLists.txt index d9bedc8..b282427 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,13 +19,14 @@ if(NOT DEFINED OPENSSL_ROOT_DIR AND NOT "$ENV{OPENSSL_DIR}" STREQUAL "") set(OPENSSL_INCLUDE_DIR "${OPENSSL_ROOT_DIR}/include") endif() if(NOT DEFINED OPENSSL_FOUND) # not already done by superordinate module - # set(CMAKE_FIND_DEBUG_MODE TRUE) + set(CMAKE_FIND_DEBUG_MODE TRUE) + message(STATUS "OPENSSL_ROOT_DIR: ${OPENSSL_ROOT_DIR}") if(DEFINED OPENSSL_ROOT_DIR) find_package(OpenSSL HINTS "${OPENSSL_ROOT_DIR}" NO_DEFAULT_PATH REQUIRED COMPONENTS Crypto SSL) else() find_package(OpenSSL REQUIRED COMPONENTS Crypto SSL) # SSL not needed for libcmp endif() - # set(CMAKE_FIND_DEBUG_MODE FALSE) + set(CMAKE_FIND_DEBUG_MODE FALSE) STRING(REGEX REPLACE "/libcrypto\..*" "" OPENSSL_LIB "${OPENSSL_CRYPTO_LIBRARY}") endif() message(STATUS "using OpenSSL version ${OPENSSL_VERSION}")