[libc-commits] [PATCH] D145983: [libc] Fix policy CMP0116 warnings for cmake 3.20 or above.

Tue Ly via Phabricator via libc-commits libc-commits at lists.llvm.org
Mon Mar 13 13:32:07 PDT 2023


lntue updated this revision to Diff 504830.
lntue added a comment.

Include LLVM's cmake policies instead.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145983

Files:
  libc/CMakeLists.txt


Index: libc/CMakeLists.txt
===================================================================
--- libc/CMakeLists.txt
+++ libc/CMakeLists.txt
@@ -1,5 +1,12 @@
 cmake_minimum_required(VERSION 3.13.4)
 
+# Include LLVM's cmake policies.
+if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS)
+  set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)
+endif()
+include(${LLVM_COMMON_CMAKE_UTILS}/Modules/CMakePolicy.cmake
+  NO_POLICY_SCOPE)
+
 # Default to C++17
 set(CMAKE_CXX_STANDARD 17)
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145983.504830.patch
Type: text/x-patch
Size: 489 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230313/72157905/attachment.bin>


More information about the libc-commits mailing list