From 491cf0ca21eed806f491fb43c120a7f7d0d6b4fb Mon Sep 17 00:00:00 2001 From: Sylvain Lefebvre Date: Sun, 12 Apr 2026 12:56:14 +0200 Subject: [PATCH] cmake: adding an existence check around FindBoost policy (CMP0167) to avoid build errors on older versions --- libgm/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libgm/CMakeLists.txt b/libgm/CMakeLists.txt index 06a02a6..ccde502 100644 --- a/libgm/CMakeLists.txt +++ b/libgm/CMakeLists.txt @@ -1,7 +1,10 @@ cmake_minimum_required(VERSION 3.13) project(libgatemate) -cmake_policy(SET CMP0167 NEW) +if (POLICY CMP0167) + # The existence check above avoids breaking the build on older cmake versions + cmake_policy(SET CMP0167 NEW) +endif() option(BUILD_SHARED "Build shared GateMate library" OFF) option(STATIC_BUILD "Create static build of GateMate tools" ON)