In order to test I upgraded from CMake 3.x to CMake 4.x.
This has the consequence that backward compatibility gets broken as the minim supported level for
CMake 4.x is 3.5.
One would need to change all CMakeLists.txt files as follows:
from:
if (APPLE)
# apple build with lower cmake version have an @rpath problem
cmake_minimum_required (VERSION 3.12)
else()
#for other platforms
cmake_minimum_required (VERSION*2.8.12*)
endif()
cmake_policy(VERSION 2.8...*3.3*)
to:
if (APPLE)
# apple build with lower cmake version have an @rpath problem
cmake_minimum_required (VERSION 3.12)
else()
#for other platforms
cmake_minimum_required (VERSION*3.5*)
endif()
cmake_policy(VERSION 2.8...*3.5*)
Not sure what the increase to 3.5 in cmake_policy causes. Can anyone can shed some light on it? Do
we still need it?
---rony
P.S.: Anyway, to save you efforts, enclosed please find a diff where all the CMakeLists.txt files
get updated such that the project can be compiled with CMake 4.0.1.
P.P.S.: Still there is the following warning issued by CMake 4.0.1:
CMake Deprecation Warning at ....CMakeLists.txt:46 (cmake_minimum_required):
Compatibility with CMake < 3.10 will be removed from a future version of
CMake.
So it seems that eventually we need to have a minimum cmake_policy version fo
3.10 if using CMake 4.0.1.
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt (revision 12973)
+++ CMakeLists.txt (working copy)
@@ -45,10 +45,10 @@
cmake_minimum_required (VERSION 3.12)
else ()
# for other platforms
- cmake_minimum_required (VERSION 2.8.12)
+ cmake_minimum_required (VERSION 3.5)
endif ()
# CMP0091 introduced in 3.15 must stay OLD for our /MD -> /MT hack to work
-cmake_policy(VERSION 2.8...3.3)
+cmake_policy(VERSION 2.8...3.5)
# must come before the project command
# 10.13.6 High Sierra is the minimum system supported
Index: samples/CMakeLists.txt
===================================================================
--- samples/CMakeLists.txt (revision 12973)
+++ samples/CMakeLists.txt (working copy)
@@ -1,6 +1,6 @@
#/*----------------------------------------------------------------------------*/
#/*
*/
-#/* Copyright (c) 2014-2021 Rexx Language Association. All rights reserved.
*/
+#/* Copyright (c) 2014-2025 Rexx Language Association. All rights reserved.
*/
#/*
*/
#/* This program and the accompanying materials are made available under
*/
#/* the terms of the Common Public License v1.0 which accompanies this
*/
@@ -43,9 +43,9 @@
cmake_minimum_required (VERSION 3.12)
else()
#for other platforms
- cmake_minimum_required (VERSION 2.8.12)
+ cmake_minimum_required (VERSION 3.5)
endif()
-cmake_policy(VERSION 2.8...3.3)
+cmake_policy(VERSION 2.8...3.5)
#/*----------------------------------------------------------------------------*/
#/* Project settings
*/
Index: samples/api/CMakeLists.txt
===================================================================
--- samples/api/CMakeLists.txt (revision 12973)
+++ samples/api/CMakeLists.txt (working copy)
@@ -1,6 +1,6 @@
#/*----------------------------------------------------------------------------*/
#/*
*/
-#/* Copyright (c) 2014-2021 Rexx Language Association. All rights reserved.
*/
+#/* Copyright (c) 2014-2025 Rexx Language Association. All rights reserved.
*/
#/*
*/
#/* This program and the accompanying materials are made available under
*/
#/* the terms of the Common Public License v1.0 which accompanies this
*/
@@ -43,9 +43,9 @@
cmake_minimum_required (VERSION 3.12)
else()
#for other platforms
- cmake_minimum_required (VERSION 2.8.12)
+ cmake_minimum_required (VERSION 3.5)
endif()
-cmake_policy(VERSION 2.8...3.3)
+cmake_policy(VERSION 2.8...3.5)
#/*----------------------------------------------------------------------------*/
#/* Project settings
*/
Index: samples/api/c++/CMakeLists.txt
===================================================================
--- samples/api/c++/CMakeLists.txt (revision 12973)
+++ samples/api/c++/CMakeLists.txt (working copy)
@@ -1,6 +1,6 @@
#/*----------------------------------------------------------------------------*/
#/*
*/
-#/* Copyright (c) 2014-2021 Rexx Language Association. All rights reserved.
*/
+#/* Copyright (c) 2014-2025 Rexx Language Association. All rights reserved.
*/
#/*
*/
#/* This program and the accompanying materials are made available under
*/
#/* the terms of the Common Public License v1.0 which accompanies this
*/
@@ -43,9 +43,9 @@
cmake_minimum_required (VERSION 3.12)
else()
#for other platforms
- cmake_minimum_required (VERSION 2.8.12)
+ cmake_minimum_required (VERSION 3.5)
endif()
-cmake_policy(VERSION 2.8...3.3)
+cmake_policy(VERSION 2.8...3.5)
#/*----------------------------------------------------------------------------*/
#/* Project settings
*/
Index: samples/api/c++/call.example/CMakeLists.txt
===================================================================
--- samples/api/c++/call.example/CMakeLists.txt (revision 12973)
+++ samples/api/c++/call.example/CMakeLists.txt (working copy)
@@ -1,6 +1,6 @@
#/*----------------------------------------------------------------------------*/
#/*
*/
-#/* Copyright (c) 2014-2021 Rexx Language Association. All rights reserved.
*/
+#/* Copyright (c) 2014-2025 Rexx Language Association. All rights reserved.
*/
#/*
*/
#/* This program and the accompanying materials are made available under
*/
#/* the terms of the Common Public License v1.0 which accompanies this
*/
@@ -43,9 +43,9 @@
cmake_minimum_required (VERSION 3.12)
else()
#for other platforms
- cmake_minimum_required (VERSION 2.8.12)
+ cmake_minimum_required (VERSION 3.5)
endif()
-cmake_policy(VERSION 2.8...3.3)
+cmake_policy(VERSION 2.8...3.5)
#/*----------------------------------------------------------------------------*/
#/* Project settings
*/
Index: samples/api/c++/external/CMakeLists.txt
===================================================================
--- samples/api/c++/external/CMakeLists.txt (revision 12973)
+++ samples/api/c++/external/CMakeLists.txt (working copy)
@@ -1,6 +1,6 @@
#/*----------------------------------------------------------------------------*/
#/*
*/
-#/* Copyright (c) 2021 Rexx Language Association. All rights reserved.
*/
+#/* Copyright (c) 2025 Rexx Language Association. All rights reserved.
*/
#/*
*/
#/* This program and the accompanying materials are made available under
*/
#/* the terms of the Common Public License v1.0 which accompanies this
*/
@@ -43,9 +43,9 @@
cmake_minimum_required (VERSION 3.12)
else()
#for other platforms
- cmake_minimum_required (VERSION 2.8.12)
+ cmake_minimum_required (VERSION 3.5)
endif()
-cmake_policy(VERSION 2.8...3.3)
+cmake_policy(VERSION 2.8...3.5)
#/*----------------------------------------------------------------------------*/
#/* Project settings
*/
Index: samples/api/classic/CMakeLists.txt
===================================================================
--- samples/api/classic/CMakeLists.txt (revision 12973)
+++ samples/api/classic/CMakeLists.txt (working copy)
@@ -1,6 +1,6 @@
#/*----------------------------------------------------------------------------*/
#/*
*/
-#/* Copyright (c) 2014-2021 Rexx Language Association. All rights reserved.
*/
+#/* Copyright (c) 2014-2025 Rexx Language Association. All rights reserved.
*/
#/*
*/
#/* This program and the accompanying materials are made available under
*/
#/* the terms of the Common Public License v1.0 which accompanies this
*/
@@ -43,9 +43,9 @@
cmake_minimum_required (VERSION 3.12)
else()
#for other platforms
- cmake_minimum_required (VERSION 2.8.12)
+ cmake_minimum_required (VERSION 3.5)
endif()
-cmake_policy(VERSION 2.8...3.3)
+cmake_policy(VERSION 2.8...3.5)
#/*----------------------------------------------------------------------------*/
#/* Project settings
*/
Index: samples/api/classic/unix/CMakeLists.txt
===================================================================
--- samples/api/classic/unix/CMakeLists.txt (revision 12973)
+++ samples/api/classic/unix/CMakeLists.txt (working copy)
@@ -1,6 +1,6 @@
#/*----------------------------------------------------------------------------*/
#/*
*/
-#/* Copyright (c) 2014-2021 Rexx Language Association. All rights reserved.
*/
+#/* Copyright (c) 2014-2025 Rexx Language Association. All rights reserved.
*/
#/*
*/
#/* This program and the accompanying materials are made available under
*/
#/* the terms of the Common Public License v1.0 which accompanies this
*/
@@ -43,9 +43,9 @@
cmake_minimum_required (VERSION 3.12)
else()
#for other platforms
- cmake_minimum_required (VERSION 2.8.12)
+ cmake_minimum_required (VERSION 3.5)
endif()
-cmake_policy(VERSION 2.8...3.3)
+cmake_policy(VERSION 2.8...3.5)
#/*----------------------------------------------------------------------------*/
#/* Project settings
*/
Index: samples/api/classic/unix/callrexx/CMakeLists.txt
===================================================================
--- samples/api/classic/unix/callrexx/CMakeLists.txt (revision 12973)
+++ samples/api/classic/unix/callrexx/CMakeLists.txt (working copy)
@@ -1,6 +1,6 @@
#/*----------------------------------------------------------------------------*/
#/*
*/
-#/* Copyright (c) 2014-2021 Rexx Language Association. All rights reserved.
*/
+#/* Copyright (c) 2014-2025 Rexx Language Association. All rights reserved.
*/
#/*
*/
#/* This program and the accompanying materials are made available under
*/
#/* the terms of the Common Public License v1.0 which accompanies this
*/
@@ -43,9 +43,9 @@
cmake_minimum_required (VERSION 3.12)
else()
#for other platforms
- cmake_minimum_required (VERSION 2.8.12)
+ cmake_minimum_required (VERSION 3.5)
endif()
-cmake_policy(VERSION 2.8...3.3)
+cmake_policy(VERSION 2.8...3.5)
#/*----------------------------------------------------------------------------*/
#/* Project settings
*/
Index: samples/api/classic/unix/rexxapi1/CMakeLists.txt
===================================================================
--- samples/api/classic/unix/rexxapi1/CMakeLists.txt (revision 12973)
+++ samples/api/classic/unix/rexxapi1/CMakeLists.txt (working copy)
@@ -1,6 +1,6 @@
#/*----------------------------------------------------------------------------*/
#/*
*/
-#/* Copyright (c) 2014-2021 Rexx Language Association. All rights reserved.
*/
+#/* Copyright (c) 2014-2025 Rexx Language Association. All rights reserved.
*/
#/*
*/
#/* This program and the accompanying materials are made available under
*/
#/* the terms of the Common Public License v1.0 which accompanies this
*/
@@ -43,9 +43,9 @@
cmake_minimum_required (VERSION 3.12)
else()
#for other platforms
- cmake_minimum_required (VERSION 2.8.12)
+ cmake_minimum_required (VERSION 3.5)
endif()
-cmake_policy(VERSION 2.8...3.3)
+cmake_policy(VERSION 2.8...3.5)
#/*----------------------------------------------------------------------------*/
#/* Project settings
*/
Index: samples/api/classic/unix/rexxapi2/CMakeLists.txt
===================================================================
--- samples/api/classic/unix/rexxapi2/CMakeLists.txt (revision 12973)
+++ samples/api/classic/unix/rexxapi2/CMakeLists.txt (working copy)
@@ -1,6 +1,6 @@
#/*----------------------------------------------------------------------------*/
#/*
*/
-#/* Copyright (c) 2014-2021 Rexx Language Association. All rights reserved.
*/
+#/* Copyright (c) 2014-2025 Rexx Language Association. All rights reserved.
*/
#/*
*/
#/* This program and the accompanying materials are made available under
*/
#/* the terms of the Common Public License v1.0 which accompanies this
*/
@@ -43,9 +43,9 @@
cmake_minimum_required (VERSION 3.12)
else()
#for other platforms
- cmake_minimum_required (VERSION 2.8.12)
+ cmake_minimum_required (VERSION 3.5)
endif()
-cmake_policy(VERSION 2.8...3.3)
+cmake_policy(VERSION 2.8...3.5)
#/*----------------------------------------------------------------------------*/
#/* Project settings
*/
Index: samples/api/classic/unix/rexxapi3/CMakeLists.txt
===================================================================
--- samples/api/classic/unix/rexxapi3/CMakeLists.txt (revision 12973)
+++ samples/api/classic/unix/rexxapi3/CMakeLists.txt (working copy)
@@ -1,6 +1,6 @@
#/*----------------------------------------------------------------------------*/
#/*
*/
-#/* Copyright (c) 2014-2021 Rexx Language Association. All rights reserved.
*/
+#/* Copyright (c) 2014-2025 Rexx Language Association. All rights reserved.
*/
#/*
*/
#/* This program and the accompanying materials are made available under
*/
#/* the terms of the Common Public License v1.0 which accompanies this
*/
@@ -43,9 +43,9 @@
cmake_minimum_required (VERSION 3.12)
else()
#for other platforms
- cmake_minimum_required (VERSION 2.8.12)
+ cmake_minimum_required (VERSION 3.5)
endif()
-cmake_policy(VERSION 2.8...3.3)
+cmake_policy(VERSION 2.8...3.5)
#/*----------------------------------------------------------------------------*/
#/* Project settings
*/
Index: samples/api/classic/windows/CMakeLists.txt
===================================================================
--- samples/api/classic/windows/CMakeLists.txt (revision 12973)
+++ samples/api/classic/windows/CMakeLists.txt (working copy)
@@ -1,6 +1,6 @@
#/*----------------------------------------------------------------------------*/
#/*
*/
-#/* Copyright (c) 2014-2021 Rexx Language Association. All rights reserved.
*/
+#/* Copyright (c) 2014-2025 Rexx Language Association. All rights reserved.
*/
#/*
*/
#/* This program and the accompanying materials are made available under
*/
#/* the terms of the Common Public License v1.0 which accompanies this
*/
@@ -43,9 +43,9 @@
cmake_minimum_required (VERSION 3.12)
else()
#for other platforms
- cmake_minimum_required (VERSION 2.8.12)
+ cmake_minimum_required (VERSION 3.5)
endif()
-cmake_policy(VERSION 2.8...3.3)
+cmake_policy(VERSION 2.8...3.5)
#/*----------------------------------------------------------------------------*/
#/* Project settings
*/
Index: samples/api/classic/windows/callrxnt/CMakeLists.txt
===================================================================
--- samples/api/classic/windows/callrxnt/CMakeLists.txt (revision 12973)
+++ samples/api/classic/windows/callrxnt/CMakeLists.txt (working copy)
@@ -1,6 +1,6 @@
#/*----------------------------------------------------------------------------*/
#/*
*/
-#/* Copyright (c) 2014-2021 Rexx Language Association. All rights reserved.
*/
+#/* Copyright (c) 2014-2025 Rexx Language Association. All rights reserved.
*/
#/*
*/
#/* This program and the accompanying materials are made available under
*/
#/* the terms of the Common Public License v1.0 which accompanies this
*/
@@ -43,9 +43,9 @@
cmake_minimum_required (VERSION 3.12)
else()
#for other platforms
- cmake_minimum_required (VERSION 2.8.12)
+ cmake_minimum_required (VERSION 3.5)
endif()
-cmake_policy(VERSION 2.8...3.3)
+cmake_policy(VERSION 2.8...3.5)
#/*----------------------------------------------------------------------------*/
#/* Project settings
*/
Index: samples/api/classic/windows/callrxwn/CMakeLists.txt
===================================================================
--- samples/api/classic/windows/callrxwn/CMakeLists.txt (revision 12973)
+++ samples/api/classic/windows/callrxwn/CMakeLists.txt (working copy)
@@ -1,6 +1,6 @@
#/*----------------------------------------------------------------------------*/
#/*
*/
-#/* Copyright (c) 2014-2021 Rexx Language Association. All rights reserved.
*/
+#/* Copyright (c) 2014-2025 Rexx Language Association. All rights reserved.
*/
#/*
*/
#/* This program and the accompanying materials are made available under
*/
#/* the terms of the Common Public License v1.0 which accompanies this
*/
@@ -43,9 +43,9 @@
cmake_minimum_required (VERSION 3.12)
else()
#for other platforms
- cmake_minimum_required (VERSION 2.8.12)
+ cmake_minimum_required (VERSION 3.5)
endif()
-cmake_policy(VERSION 2.8...3.3)
+cmake_policy(VERSION 2.8...3.5)
#/*----------------------------------------------------------------------------*/
#/* Project settings
*/
Index: samples/api/classic/windows/rexxapi1/CMakeLists.txt
===================================================================
--- samples/api/classic/windows/rexxapi1/CMakeLists.txt (revision 12973)
+++ samples/api/classic/windows/rexxapi1/CMakeLists.txt (working copy)
@@ -1,6 +1,6 @@
#/*----------------------------------------------------------------------------*/
#/*
*/
-#/* Copyright (c) 2014-2021 Rexx Language Association. All rights reserved.
*/
+#/* Copyright (c) 2014-2025 Rexx Language Association. All rights reserved.
*/
#/*
*/
#/* This program and the accompanying materials are made available under
*/
#/* the terms of the Common Public License v1.0 which accompanies this
*/
@@ -43,9 +43,9 @@
cmake_minimum_required (VERSION 3.12)
else()
#for other platforms
- cmake_minimum_required (VERSION 2.8.12)
+ cmake_minimum_required (VERSION 3.5)
endif()
-cmake_policy(VERSION 2.8...3.3)
+cmake_policy(VERSION 2.8...3.5)
#/*----------------------------------------------------------------------------*/
#/* Project settings
*/
Index: samples/api/classic/windows/rexxapi2/CMakeLists.txt
===================================================================
--- samples/api/classic/windows/rexxapi2/CMakeLists.txt (revision 12973)
+++ samples/api/classic/windows/rexxapi2/CMakeLists.txt (working copy)
@@ -1,6 +1,6 @@
#/*----------------------------------------------------------------------------*/
#/*
*/
-#/* Copyright (c) 2014-2021 Rexx Language Association. All rights reserved.
*/
+#/* Copyright (c) 2014-2025 Rexx Language Association. All rights reserved.
*/
#/*
*/
#/* This program and the accompanying materials are made available under
*/
#/* the terms of the Common Public License v1.0 which accompanies this
*/
@@ -43,9 +43,9 @@
cmake_minimum_required (VERSION 3.12)
else()
#for other platforms
- cmake_minimum_required (VERSION 2.8.12)
+ cmake_minimum_required (VERSION 3.5)
endif()
-cmake_policy(VERSION 2.8...3.3)
+cmake_policy(VERSION 2.8...3.5)
#/*----------------------------------------------------------------------------*/
#/* Project settings
*/
Index: samples/api/classic/windows/rexxapi3/CMakeLists.txt
===================================================================
--- samples/api/classic/windows/rexxapi3/CMakeLists.txt (revision 12973)
+++ samples/api/classic/windows/rexxapi3/CMakeLists.txt (working copy)
@@ -1,6 +1,6 @@
#/*----------------------------------------------------------------------------*/
#/*
*/
-#/* Copyright (c) 2014-2021 Rexx Language Association. All rights reserved.
*/
+#/* Copyright (c) 2014-2025 Rexx Language Association. All rights reserved.
*/
#/*
*/
#/* This program and the accompanying materials are made available under
*/
#/* the terms of the Common Public License v1.0 which accompanies this
*/
@@ -43,9 +43,9 @@
cmake_minimum_required (VERSION 3.12)
else()
#for other platforms
- cmake_minimum_required (VERSION 2.8.12)
+ cmake_minimum_required (VERSION 3.5)
endif()
-cmake_policy(VERSION 2.8...3.3)
+cmake_policy(VERSION 2.8...3.5)
#/*----------------------------------------------------------------------------*/
#/* Project settings
*/
Index: samples/api/classic/windows/rexxexit/CMakeLists.txt
===================================================================
--- samples/api/classic/windows/rexxexit/CMakeLists.txt (revision 12973)
+++ samples/api/classic/windows/rexxexit/CMakeLists.txt (working copy)
@@ -1,6 +1,6 @@
#/*----------------------------------------------------------------------------*/
#/*
*/
-#/* Copyright (c) 2014-2021 Rexx Language Association. All rights reserved.
*/
+#/* Copyright (c) 2014-2025 Rexx Language Association. All rights reserved.
*/
#/*
*/
#/* This program and the accompanying materials are made available under
*/
#/* the terms of the Common Public License v1.0 which accompanies this
*/
@@ -43,9 +43,9 @@
cmake_minimum_required (VERSION 3.12)
else()
#for other platforms
- cmake_minimum_required (VERSION 2.8.12)
+ cmake_minimum_required (VERSION 3.5)
endif()
-cmake_policy(VERSION 2.8...3.3)
+cmake_policy(VERSION 2.8...3.5)
#/*----------------------------------------------------------------------------*/
#/* Project settings
*/
Index: samples/windows/CMakeLists.txt
===================================================================
--- samples/windows/CMakeLists.txt (revision 12973)
+++ samples/windows/CMakeLists.txt (working copy)
@@ -1,6 +1,6 @@
#/*----------------------------------------------------------------------------*/
#/*
*/
-#/* Copyright (c) 2014-2021 Rexx Language Association. All rights reserved.
*/
+#/* Copyright (c) 2014-2025 Rexx Language Association. All rights reserved.
*/
#/*
*/
#/* This program and the accompanying materials are made available under
*/
#/* the terms of the Common Public License v1.0 which accompanies this
*/
@@ -43,9 +43,9 @@
cmake_minimum_required (VERSION 3.12)
else()
#for other platforms
- cmake_minimum_required (VERSION 2.8.12)
+ cmake_minimum_required (VERSION 3.5)
endif()
-cmake_policy(VERSION 2.8...3.3)
+cmake_policy(VERSION 2.8...3.5)
#/*----------------------------------------------------------------------------*/
#/* Project settings
*/
Index: testbinaries/CMakeLists.txt
===================================================================
--- testbinaries/CMakeLists.txt (revision 12973)
+++ testbinaries/CMakeLists.txt (working copy)
@@ -1,6 +1,6 @@
#/*----------------------------------------------------------------------------*/
#/*
*/
-#/* Copyright (c) 2014-2021 Rexx Language Association. All rights reserved.
*/
+#/* Copyright (c) 2014-2025 Rexx Language Association. All rights reserved.
*/
#/*
*/
#/* This program and the accompanying materials are made available under
*/
#/* the terms of the Common Public License v1.0 which accompanies this
*/
@@ -43,9 +43,9 @@
cmake_minimum_required (VERSION 3.12)
else()
#for other platforms
- cmake_minimum_required (VERSION 2.8.12)
+ cmake_minimum_required (VERSION 3.5)
endif()
-cmake_policy(VERSION 2.8...3.3)
+cmake_policy(VERSION 2.8...3.5)
#/*----------------------------------------------------------------------------*/
#/* Project settings
*/
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel