Skip to content

Remove PCRE2_STATIC_RUNTIME #753

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

Merged
merged 1 commit into from
May 23, 2025

Conversation

NWilson
Copy link
Member

@NWilson NWilson commented May 21, 2025

Since we have raised our minimum CMake version to 3.15, this updates the default value of the "CMP0091" backwards- compatibility policy, such that PCRE2_STATIC_RUNTIME is now broken (since 10.45 when cmake_minimum_required was increased).

We can remove this flag, since the new built-in CMAKE_MSVC_RUNTIME_LIBRARY provides the same behaviour.

Fixes #752

Copy link
Contributor

@carenas carenas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to also update the bat CI job in dev.yml so it will continue testing this configuration.

Bonus points for making sure that the test actually verifies the static runtime was actually linked with by the produced artifacts so it is not silently broken, and maybe tell cmake in the Configure step to fail when an "unknown variable" warning is triggered to make its failure more visible.

@NWilson
Copy link
Member Author

NWilson commented May 22, 2025

This CMake flag is not currently covered by any tests, so if I did add a test, it would be a new one.

Given that the new flag is a built in CMake feature, I'm not sure we need to test it ourselves continuously. I will do a final manual test before merging. Is that ok?

+My mistake! Yes, we are testing it currently. My apologies.+

I can also ensure that the CMake calls in CI are treating warnings as errors.

@NWilson NWilson force-pushed the user/niwilson/remove-PCRE2_STATIC_RUNTIME branch from ff123ee to 9c5635a Compare May 22, 2025 11:55
@NWilson
Copy link
Member Author

NWilson commented May 22, 2025

I have updated the dev.yml file. I have done a manual test that CMake's new built-in option works, using dumpbin.exe.

I have opened another PR with improvements to our CMake warnings.

Since we have raised our minimum CMake version to 3.15, this updates the
default value of the "CMP0091" backwards-compatibility policy, such that
PCRE2_STATIC_RUNTIME is now broken (since 10.45	when
cmake_minimum_required was increased).

We can remove this flag, since the new built-in
CMAKE_MSVC_RUNTIME_LIBRARY provides the same behaviour.
@NWilson NWilson force-pushed the user/niwilson/remove-PCRE2_STATIC_RUNTIME branch from 9c5635a to da3897d Compare May 23, 2025 08:51
@NWilson NWilson requested a review from carenas May 23, 2025 08:58
@NWilson NWilson merged commit 4e8ab86 into master May 23, 2025
35 checks passed
@NWilson NWilson deleted the user/niwilson/remove-PCRE2_STATIC_RUNTIME branch May 23, 2025 14:12
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.

PCRE2_STATIC_RUNTIME no longer works
2 participants