diff options
author | Kristofer Jonsson <kristofer.jonsson@arm.com> | 2022-11-17 14:31:51 +0100 |
---|---|---|
committer | Kristofer Jonsson <kristofer.jonsson@arm.com> | 2022-11-17 15:11:59 +0100 |
commit | eb1d711bf6e01fd3744b4eddc272d626716d48ca (patch) | |
tree | 594fda2130b41ef3dcd5096d214dad61cd673ff2 /tflite_micro.cmake | |
parent | 5ebfa3aa8b2152e53aadbf399bb854988edc419e (diff) | |
download | ethos-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
Diffstat (limited to 'tflite_micro.cmake')
-rw-r--r-- | tflite_micro.cmake | 8 |
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) |