Skip to content

Commit 7c3c9f0

Browse files
TrentHoulistonfpistm
authored andcommitted
Wrap cmake policies in an if statement
1 parent ff98229 commit 7c3c9f0

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

cmake/FindArduinoCtags.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ function(get_ctags)
66

77
# Prevent warnings in CMake>=3.24 regarding ExternalProject_Add()
88
# cf. https://cmake.org/cmake/help/latest/policy/CMP0135.html
9-
cmake_policy(SET CMP0135 OLD)
9+
if (POLICY CMP0135)
10+
cmake_policy(SET CMP0135 OLD)
11+
endif()
1012

1113
cmake_host_system_information(
1214
RESULT HOSTINFO

cmake/ensure_core_deps.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ function(declare_deps CORE_VERSION)
6161

6262
# Prevent warnings in CMake>=3.24 regarding ExternalProject_Add()
6363
# cf. https://cmake.org/cmake/help/latest/policy/CMP0135.html
64-
cmake_policy(SET CMP0135 OLD)
64+
if (POLICY CMP0135)
65+
cmake_policy(SET CMP0135 OLD)
66+
endif()
6567

6668
file(REAL_PATH "${DL_DIR}/package_stmicroelectronics_index.json" JSONFILE)
6769
if (NOT EXISTS ${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