Skip to content

Commit

Permalink
test version compatability
Browse files Browse the repository at this point in the history
  • Loading branch information
rajeev-0 committed Oct 22, 2024
1 parent 4c45d8d commit d0ea0d1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
11 changes: 3 additions & 8 deletions .github/workflows/version_compatability.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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 .
Expand Down
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down

0 comments on commit d0ea0d1

Please sign in to comment.