Skip to content

Commit 8cc3d3f

Browse files
massonalfpistm
authored andcommitted
fix: silence the warnings from ExternalProject_Add
CMake 3.24 introduced a change in behavior in ExternalProject_Add() regarding timestamps when extracting an archive. As updating the code would break compatibility with older CMake versions, this commit instead tells newer CMake versions to behave like older ones, using a policy setting. Note from the CMake docs: The OLD behavior of a policy is deprecated by definition and may be removed in a future version of CMake. -> so the code will have to be updated eventually, and compatibility be broken...
1 parent c9a7509 commit 8cc3d3f

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

cmake/FindArduinoCtags.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ include(FetchContent)
33
include(FindPackageHandleStandardArgs)
44

55
function(get_ctags)
6+
7+
# Prevent warnings in CMake>=3.24 regarding ExternalProject_Add()
8+
# cf. https://cmake.org/cmake/help/latest/policy/CMP0135.html
9+
cmake_policy(SET CMP0135 OLD)
10+
611
cmake_host_system_information(
712
RESULT HOSTINFO
813
QUERY OS_NAME OS_PLATFORM

cmake/ensure_core_deps.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ function(get_target_url JSONARR OUT_URL OUT_SHA)
5858
endfunction()
5959

6060
function(declare_deps CORE_VERSION)
61+
62+
# Prevent warnings in CMake>=3.24 regarding ExternalProject_Add()
63+
# cf. https://cmake.org/cmake/help/latest/policy/CMP0135.html
64+
cmake_policy(SET CMP0135 OLD)
65+
6166
file(REAL_PATH "${DL_DIR}/package_stmicroelectronics_index.json" JSONFILE)
6267
if (NOT EXISTS ${JSONFILE})
6368
file(DOWNLOAD "${JSONCONFIG_URL}" ${JSONFILE})

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy