From aa0e94ca5d15618b88df272ff4b24124ba3a6d30 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 500aa2609..ed20162b1 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