Skip to content

Commit dc04f55

Browse files
SebastianBoenashif
authored andcommitted
cmake: Fix warning related to policy CMP0079
In CMake 3.13 a warning is produced if one does not explicitly state what the policy for CMP0079 should be. To resolve this warning we set policy CMP0079 to OLD. This is expected to have no semantical change. When we want a semantical change we can flip the policy and port the build scripts to the new behaviour. This fixes #11794 Signed-off-by: Sebastian Bøe <[email protected]>
1 parent 9062e97 commit dc04f55

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cmake/app/boilerplate.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ cmake_minimum_required(VERSION 3.8.2)
2727

2828
cmake_policy(SET CMP0002 NEW)
2929

30+
if(NOT (${CMAKE_VERSION} VERSION_LESS "3.13.0"))
31+
# Use the old CMake behaviour until 3.13.x is required and the build
32+
# scripts have been ported to the new behaviour.
33+
cmake_policy(SET CMP0079 OLD)
34+
endif()
35+
3036
define_property(GLOBAL PROPERTY ZEPHYR_LIBS
3137
BRIEF_DOCS "Global list of all Zephyr CMake libs that should be linked in"
3238
FULL_DOCS "Global list of all Zephyr CMake libs that should be linked in.

0 commit comments

Comments
 (0)