From e9243d4f706ab760f6c0f096d62e540ab2544c61 Mon Sep 17 00:00:00 2001 From: autoantwort <41973254+autoantwort@users.noreply.github.com> Date: Wed, 8 Mar 2023 02:05:25 +0100 Subject: Cmake static or shared (#1160) * cmake: build either static or shared libs * cmake: allow to build non-PIC static libs * fix typo * cmake: add ALIAS targets * cmake: link to OpenSSL imported targets CMake imported targets are more robust * turn ENABLE_EXAMPLES to a CMake option * fix typo * install pdb files if shared * fix hiredis_ssl-config file * Fix more targets * CMake knows when to enable CMAKE_POSITION_INDEPENDENT_CODE * Restore setting of /Z7 * [ci] fix building of shared and static libs * Apply suggestions from code review Co-authored-by: Bjorn Svensson * Make it possible to change name of exported target --------- Co-authored-by: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Co-authored-by: Bjorn Svensson --- .github/workflows/test.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to '.github/workflows/test.yml') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index af77544..7812af6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -82,12 +82,14 @@ jobs: steps: - uses: microsoft/setup-msbuild@v1.0.2 - uses: actions/checkout@v3 - - name: Run CMake - run: cmake -Wno-dev CmakeLists.txt - - name: Build hiredis + - name: Run CMake (shared lib) + run: cmake -Wno-dev CMakeLists.txt + - name: Build hiredis (shared lib) + run: MSBuild hiredis.vcxproj /p:Configuration=Debug + - name: Run CMake (static lib) + run: cmake -Wno-dev CMakeLists.txt -DBUILD_SHARED_LIBS=OFF + - name: Build hiredis (static lib) run: MSBuild hiredis.vcxproj /p:Configuration=Debug - - name: Build hiredis_static - run: MSBuild hiredis_static.vcxproj /p:Configuration=Debug - name: Build hiredis-test run: MSBuild hiredis-test.vcxproj /p:Configuration=Debug # use memurai, redis compatible server, since it is easy to install. Can't -- cgit v1.2.3