[libc-commits] [libc] 60d2dbf - [libc] Fix policy CMP0116 warnings for cmake 3.20 or above.
Tue Ly via libc-commits
libc-commits at lists.llvm.org
Mon Mar 13 14:28:27 PDT 2023
Author: Tue Ly
Date: 2023-03-13T17:28:14-04:00
New Revision: 60d2dbf522c0a4d7dc85e6146a830dfbb40bbc96
URL: https://github.com/llvm/llvm-project/commit/60d2dbf522c0a4d7dc85e6146a830dfbb40bbc96
DIFF: https://github.com/llvm/llvm-project/commit/60d2dbf522c0a4d7dc85e6146a830dfbb40bbc96.diff
LOG: [libc] Fix policy CMP0116 warnings for cmake 3.20 or above.
Warnings due to changes in behavior of cmake 3.20 or above. See
https://cmake.org/cmake/latest/policy/CMP0116.html
Reviewed By: sivachandra
Differential Revision: https://reviews.llvm.org/D145983
Added:
Modified:
libc/CMakeLists.txt
Removed:
################################################################################
diff --git a/libc/CMakeLists.txt b/libc/CMakeLists.txt
index 743b241ce26ad..9fd9bce66bd53 100644
--- a/libc/CMakeLists.txt
+++ b/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)
More information about the libc-commits
mailing list