Skip to content

Commit

Permalink
Wrap cmake policies in an if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
TrentHouliston authored and fpistm committed Oct 30, 2023
1 parent ff98229 commit 7c3c9f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion cmake/FindArduinoCtags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ function(get_ctags)

# Prevent warnings in CMake>=3.24 regarding ExternalProject_Add()
# cf. https://cmake.org/cmake/help/latest/policy/CMP0135.html
cmake_policy(SET CMP0135 OLD)
if (POLICY CMP0135)
cmake_policy(SET CMP0135 OLD)
endif()

cmake_host_system_information(
RESULT HOSTINFO
Expand Down
4 changes: 3 additions & 1 deletion cmake/ensure_core_deps.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ function(declare_deps CORE_VERSION)

# Prevent warnings in CMake>=3.24 regarding ExternalProject_Add()
# cf. https://cmake.org/cmake/help/latest/policy/CMP0135.html
cmake_policy(SET CMP0135 OLD)
if (POLICY CMP0135)
cmake_policy(SET CMP0135 OLD)
endif()

file(REAL_PATH "${DL_DIR}/package_stmicroelectronics_index.json" JSONFILE)
if (NOT EXISTS ${JSONFILE})
Expand Down

0 comments on commit 7c3c9f0

Please sign in to comment.