8000 CMakeLists.txt: Enable CMAKE_MSVC_RUNTIME_LIBRARY support (#2652) by malkia · Pull Request #43 · malkia/opentelemetry-cpp · GitHub
[go: up one dir, main page]

Skip to content

Conversation

malkia
Copy link
Owner
@malkia malkia commented Jun 6, 2024

The documentation for CMAKE_MSVC_RUNTIME_LIBRARY states 1:

This variable has effect only when policy CMP0091 is set to NEW prior to
the first project() or enable_language() command that enables a language
using a compiler targeting the MSVC ABI.

so the current usage of CMAKE_MSVC_RUNTIME_LIBRARY for vcpkg does not work at all.

Let's fix that by setting policy 91 to new if present.

Fixes # (issue)

Changes

Please provide a brief description of the changes here.

For significant contributions please make sure you have completed the following items:

  • CHANGELOG.md updated for non-trivial changes
  • Unit tests have been added
  • Changes in public API reviewed

828B
The documentation for CMAKE_MSVC_RUNTIME_LIBRARY states [1]:

> This variable has effect only when policy CMP0091 is set to NEW prior to
> the first project() or enable_language() command that enables a language
> using a compiler targeting the MSVC ABI.

so the current usage of CMAKE_MSVC_RUNTIME_LIBRARY for vcpkg does not work
at all.

Let's fix that by setting policy 91 to new if present.

[1]: https://cmake.org/cmake/help/latest/variable/CMAKE_MSVC_RUNTIME_LIBRARY.html

Co-authored-by: Tom Tan <Tom.Tan@microsoft.com>
@malkia malkia merged commit 5f0bd61 into malkia:main Jun 6, 2024
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.

2 participants

0