From eb84d48e5c158484a5db883eedb2bc04adc7054a Mon Sep 17 00:00:00 2001 From: Tuan Nghia Nguyen Date: Sun, 13 Sep 2026 07:46:43 +1000 Subject: [PATCH] fix(build): do not demand a policy older CMake has never heard of MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Line two set CMP0167 unconditionally. That policy arrived in CMake 3.30 and this project asks for 3.28, so every CMake between the two failed the configure at line two with "Policy CMP0167 is not known to this version" — before it had done anything at all. Found on the Windows machine that builds the CUDA engines, where it stopped the build dead. Guarded, so a newer CMake still gets the quiet FindBoost the policy was set for and an older one configures instead of refusing. Co-Authored-By: Claude Opus 5 --- CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 386bb2f..22e1092 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,11 @@ cmake_minimum_required(VERSION 3.28) -cmake_policy(SET CMP0167 NEW) # Suppress FindBoost removal warning +# CMP0167 (FindBoost removed from CMake) only exists from 3.30, and this +# project asks for 3.28 — so setting it unconditionally makes every older +# CMake fail at line two with "policy is not known to this version". Guarded, +# a newer CMake still gets the quiet FindBoost it was added for. +if(POLICY CMP0167) + cmake_policy(SET CMP0167 NEW) +endif() # ── CUDA is optional (not available on macOS) ─────────────────── include(CheckLanguage)