From 34d852f2df80e17da0cd0e1159b1c1fa155735e2 Mon Sep 17 00:00:00 2001
From: Michele Calgaro <michele.calgaro@yahoo.it>
Date: Tue, 16 Dec 2025 17:32:21 +0900
Subject: Fix up logic to set minimum C++ standard.

This version does not enforce a downgrade if the default standard in use on a system is higher.
This relates to PR #134 and discussion in TDE/tqt#244.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
---
 modules/TDEMacros.cmake | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/modules/TDEMacros.cmake b/modules/TDEMacros.cmake
index c1285f9..cff3e8b 100644
--- a/modules/TDEMacros.cmake
+++ b/modules/TDEMacros.cmake
@@ -2926,9 +2926,7 @@ macro( tde_setup_compiler_flags )
 
   # Set minimum required ISO C++ standard and forces
   # failure in case the compiler doesn't support it
-  set(CMAKE_CXX_STANDARD 17)
-  set(CMAKE_CXX_STANDARD_REQUIRED ON)
-  set(CMAKE_CXX_EXTENSIONS OFF)
+  set( TDE_CXX_FEATURES cxx_std_17 )
 
 endmacro( )
 
-- 
cgit v1.2.3

