[PATCH] D150688: [cmake] Set CMP0091 to fix Windows builds after the cmake_minimum_required bump

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 17 06:32:48 PDT 2023


mstorsjo added a comment.

In D150688#4349390 <https://reviews.llvm.org/D150688#4349390>, @mstorsjo wrote:

> In D150688#4349022 <https://reviews.llvm.org/D150688#4349022>, @hans wrote:
>
>> compiler-rt has seems to have its own thing in https://github.com/llvm/llvm-project/blob/llvmorg-16.0.3/compiler-rt/CMakeLists.txt#L398
>
> Oh, I see. This seems to look for the literal form `/MD`, but after the CMake update, CMake seems to set the option in the form `-MD`, so if this pattern is updated to check for both `/` and `-`, this might start working as expected.

Although, the new policy does place the flag in a different separate cmake variable, so it’s quite possible that it isn’t enough. In any case, with the new policy, the right thing to do is to set the variable (or target property) for deciding what CRT to use, not to manually exchange flags in the variables.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150688/new/

https://reviews.llvm.org/D150688



More information about the llvm-commits mailing list