From 3a6ce18feb07cea0512590a1aac5a967484cac60 Mon Sep 17 00:00:00 2001 From: Valentin B Date: Tue, 21 Apr 2020 01:33:33 +0200 Subject: [PATCH] CMake: Silence CMP0048 warnings When libwebsockets is included as a subdirectory in other projects that rely on a minimum CMake version of 3.x, a CMP0048 policy warning will be raised due to the project not specifying a version in the project call. This patch silences the warning by explicitly setting the policy within libwebsockets to NEW if it has already been forwarded as such, without any further impact on the behavior of CMake. --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3d18d3123..dde6223e8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,9 @@ cmake_minimum_required(VERSION 2.8.9) +if(POLICY CMP0048) + cmake_policy(SET CMP0048 NEW) +endif() + # General Advice # # For selecting between DEBUG / RELEASE, use -DCMAKE_BUILD_TYPE=DEBUG or =RELEASE