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

Hans Wennborg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 16 09:22:49 PDT 2023


hans created this revision.
hans added reviewers: Mordante, rnk.
Herald added a subscriber: ekilmer.
Herald added a project: All.
hans requested review of this revision.
Herald added a project: LLVM.

The build uses other mechanism to select the runtime.

Fixes #62719


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D150688

Files:
  cmake/Modules/CMakePolicy.cmake


Index: cmake/Modules/CMakePolicy.cmake
===================================================================
--- cmake/Modules/CMakePolicy.cmake
+++ cmake/Modules/CMakePolicy.cmake
@@ -10,3 +10,8 @@
 if(POLICY CMP0116)
   cmake_policy(SET CMP0116 OLD)
 endif()
+# CMP0091: MSVC runtime library flags are selected by an abstraction.
+# New in CMake 3.15. https://cmake.org/cmake/help/latest/policy/CMP0091.html
+if(POLICY CMP0091)
+  cmake_policy(SET CMP0091 OLD)
+endif()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150688.522662.patch
Type: text/x-patch
Size: 470 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230516/2d21441b/attachment.bin>


More information about the llvm-commits mailing list