aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristofer Jonsson <kristofer.jonsson@arm.com>2022-11-17 14:31:51 +0100
committerKristofer Jonsson <kristofer.jonsson@arm.com>2022-11-17 15:11:59 +0100
commiteb1d711bf6e01fd3744b4eddc272d626716d48ca (patch)
tree594fda2130b41ef3dcd5096d214dad61cd673ff2
parent5ebfa3aa8b2152e53aadbf399bb854988edc419e (diff)
downloadethos-u-core-software-eb1d711bf6e01fd3744b4eddc272d626716d48ca.tar.gz
Fix CMake warning when downloading external projects
Setting policy CMP0135 to NEW adopts the new behavior without breaking backwards compatibility. Change-Id: I2a6cf783a6b2ed00d6c2119cf6d780c3054c25c5
-rw-r--r--tflite_micro.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/tflite_micro.cmake b/tflite_micro.cmake
index e6db207..2d5bc3b 100644
--- a/tflite_micro.cmake
+++ b/tflite_micro.cmake
@@ -30,6 +30,12 @@ include(FetchContent)
# Download third party
macro(download_third_party target)
+ cmake_policy(PUSH)
+
+ if(POLICY CMP0135)
+ cmake_policy(SET CMP0135 NEW)
+ endif()
+
cmake_parse_arguments(DOWNLOAD "" "URL;URL_MD5;SOURCE_DIR" "" ${ARGN})
message("Downloading ${DOWNLOAD_URL}")
@@ -44,6 +50,8 @@ macro(download_third_party target)
if (NOT ${target}_POPULATED)
FetchContent_Populate(${target})
endif()
+
+ cmake_policy(POP)
endmacro()
function(tensorflow_source_exists RESULT TARGET SOURCE)