cmake: adding an existence check around FindBoost policy (CMP0167) to avoid build errors on older versions

This commit is contained in:
Sylvain Lefebvre 2026-04-12 12:56:14 +02:00 committed by Catherine
parent dc48418a51
commit 4670d6ef4c
1 changed files with 4 additions and 1 deletions

View File

@ -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)