Skip to content

Conversation

@drowaudio
Copy link
Contributor

No description provided.

@drowaudio drowaudio merged commit f48a381 into develop Jan 13, 2025
3 checks passed
@drowaudio drowaudio deleted the feature/static_windows_runtime branch January 13, 2025 16:22
@inkychris
Copy link

This method of customising the runtime library results in warnings for every source file compiled:

Command line warning D9025 : overriding '/MD' with '/MT'

The better way to set a default for this value (and also preserve the ability to customise it at configure time) is to use the following which was introduced in cmake 3.15 (so no need to bump the required cmake version for the project):

if(MSVC AND NOT CMAKE_MSVC_RUNTIME_LIBRARY)
    # Default to statically linking the runtime libraries
    set_property(TARGET pluginval PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
endif()

Techinically don't need the if(MSVC) in there since it will be ignored in non-MSVC environments, but it doesn't hurt and may seem more obvious to someone not familiar with this setting.

I suspect the build logs don't show any of these warnings because the build caching is swallowing them now and they showed up first time they ran in the pipeline.

@drowaudio
Copy link
Contributor Author

Thanks for the tip, I've updated it here:
3253dad

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.

3 participants