From e9f612f58104ad59fb9b012a73c599f0c6b36fe7 Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Thu, 7 Sep 2023 09:58:22 -0700 Subject: [PATCH] [build] Guard policy setting for CMake versions below 3.24 (#5612) --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 012bcb7ccd..3c5f1d8962 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,7 +16,9 @@ project(allwpilib) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules") # Make timestamps of extracted files from FetchContent the time of extraction -cmake_policy(SET CMP0135 NEW) +if (POLICY CMP0135) + cmake_policy(SET CMP0135 NEW) +endif() message(STATUS "Platform version: ${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}")