From 88d71a1e0ff96f06db0623d07fe8e676cc9335ce Mon Sep 17 00:00:00 2001 From: Robert Ghilduta Date: Fri, 3 Mar 2023 23:02:15 -0800 Subject: [PATCH] libbladeRF: conditionally set CMake policy Allow for backward compatiblity with pre 3.20 versions of CMake by conditionally setting CMake policy CMP0115 --- host/libraries/libbladeRF/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/host/libraries/libbladeRF/CMakeLists.txt b/host/libraries/libbladeRF/CMakeLists.txt index fc8e9443d..ffe79771e 100644 --- a/host/libraries/libbladeRF/CMakeLists.txt +++ b/host/libraries/libbladeRF/CMakeLists.txt @@ -425,7 +425,9 @@ if(MSVC) ) endif() -cmake_policy(SET CMP0115 OLD) +if(POLICY CMP0115) + cmake_policy(SET CMP0115 OLD) +endif(POLICY CMP0115) add_library(libbladerf_shared SHARED ${LIBBLADERF_SOURCE})