From f4cd95d8fbe067bde9b7cb530fdc6627e9263aab Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Tue, 18 Nov 2025 11:32:20 +0500 Subject: [PATCH 1/2] cmake - bump min required version Resolves warning: ``` CMake Deprecation Warning at common/CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 3.10 will be removed from a future version of CMake. ``` --- CMakeLists.txt | 2 +- bison/CMakeLists.txt | 2 +- common/CMakeLists.txt | 2 +- flex/CMakeLists.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1c9f7e0..183c896 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR) +cmake_minimum_required(VERSION 3.10 FATAL_ERROR) project (winflexbison) diff --git a/bison/CMakeLists.txt b/bison/CMakeLists.txt index 55de8a1..3ccebb6 100644 --- a/bison/CMakeLists.txt +++ b/bison/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR) +cmake_minimum_required(VERSION 3.10 FATAL_ERROR) set(PROJECT_NAME win_bison) diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 4b57c62..9db2ee4 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR) +cmake_minimum_required(VERSION 3.10 FATAL_ERROR) set(PROJECT_NAME winflexbison_common) diff --git a/flex/CMakeLists.txt b/flex/CMakeLists.txt index f634f81..4530c63 100644 --- a/flex/CMakeLists.txt +++ b/flex/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR) +cmake_minimum_required(VERSION 3.10 FATAL_ERROR) set(PROJECT_NAME win_flex) From 80f4917e77cb6365f24e8bb7a4fa7e9406130475 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Tue, 18 Nov 2025 11:36:47 +0500 Subject: [PATCH 2/2] cmake - set `CMP0177` to `OLD` explicitly Helps to avoid lots of warnings below: ``` CMake Warning (dev) at CMakeLists.txt:80 (install): Policy CMP0177 is not set: install() DESTINATION paths are normalized. Run "cmake --help-policy CMP0177" for policy details. Use the cmake_policy command to set the policy and suppress this warning. ``` --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 183c896..c72d75d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,11 @@ cmake_minimum_required(VERSION 3.10 FATAL_ERROR) project (winflexbison) +# cmake 3.31+ - enable `install` destination paths normalization. +if(POLICY CMP0177) + cmake_policy(SET CMP0177 OLD) +endif() + if(NOT MSVC) message( WARNING "Visual Studio Build supported only" ) endif()