Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake ≥ 3.21: Fix ctest paths for shared libs (MSVC and CygWin) #146

Merged
merged 2 commits into from
Aug 13, 2024

Conversation

thbeu
Copy link
Contributor

@thbeu thbeu commented Aug 12, 2024

This PR fixes the DLL paths for the testsuite (both GoogleTest based unittests and script-based tests) when built with CMake shared libs for MSVC and CygWin.

I tried a lot actually. In the end the solution from https://stackoverflow.com/a/72341403/8520615 worked out.

Additionally

  • the special cases and workarounds in the CMake CI builds are removed from the GitHub Actions.
  • the ctest option --no-tests=error was added to not silently accept CI builds with -DBUILD_TESTING=OFF (as I did by accident during refactoring).

Resolves #142

@thbeu thbeu changed the title Fix ctest for shared libs Fix ctest for shared libs, i.e. DLL paths on MSVC and CygWin Aug 12, 2024
.github/workflows/main.yml Show resolved Hide resolved
CMakeLists.txt Show resolved Hide resolved
@thbeu thbeu changed the title Fix ctest for shared libs, i.e. DLL paths on MSVC and CygWin CMake ≥ 3.21: Fix ctest pahs for shared libs (MSVC and CygWin) Aug 12, 2024
@thbeu thbeu changed the title CMake ≥ 3.21: Fix ctest pahs for shared libs (MSVC and CygWin) CMake ≥ 3.21: Fix ctest paths for shared libs (MSVC and CygWin) Aug 12, 2024
@rouault rouault merged commit 1441087 into OSGeo:master Aug 13, 2024
6 checks passed
@thbeu thbeu deleted the fix-ctest-for-shared-libs branch August 13, 2024 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failing unittests for MSVC or CygWin if BUILD_SHARED_LIBS=1
2 participants