Skip to contentSkip to conversation

README.cmake.md: Document minimum required CMake version for --preset

PATCH In review Frank Lichtenheld 2 participants 4 messages Feb 1, 2024 – Feb 2, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 README.cmake.md: Document minimum required CMake version for --preset

CMakePreset.json is supported since 3.19, but we have a version 3 preset file, so need at least 3.21.

Github: OpenVPN/openvpn#489

Change-Id I44c555f6ffa08f2aee739c7f687fa3b678c86231
---
 README.cmake.md | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
README.cmake.md +6 -1
index 4f41c701..89d9419d 100644
@@ -17,6 +17,10 @@ also makes cross-building with MinGW on Linux much simpler. However,
 builds are also possible by providing the build dependencies manually,
 but that might require specifying more information to CMake.
 
+You need at least CMake version 3.21 or newer for the `CMakePreset.json`
+file to be supported. Manual builds might be possible with older CMake
+versions, see `cmake_minimum_required` in `CMakeLists.txt`.
+
 If you're looking to build the full Windows installer MSI, take a look
 at https://github.com/OpenVPN/openvpn-build.git .
 
@@ -27,7 +31,7 @@ The following tools are expected to be present on the system, you
 can install them with a package manager of your choice (e.g.
 chocolatey, winget) or manually:
 
-* CMake
+* CMake (>= 3.21)
 * Git
 * Python (3.x), plus the Python module `docutils`
 * Visual Studion 17 (2022), C/C++ Enviroment
@@ -101,6 +105,7 @@ To build the Windows executables on a Linux system:
     git clone https://github.com/OpenVPN/openvpn.git
     export VCPKG_ROOT=$PWD/vcpkg
     cd openvpn
+    # requires CMake 3.21 or newer
     cmake --preset mingw-x64
     cmake --build --preset mingw-x64
     # unit tests are built, but no testPreset is provided. You need to copy
Signature · 1 line
2.34.1
#1 lore raw

Makes sense (I did read the GH issue).

Your patch has been applied to the master branch.

commit 53b16d07e889b69128203d3b50ed47ceb77c5771

Author: Frank Lichtenheld
Date:   Thu Feb 1 13:30:39 2024 +0100
     README.cmake.md: Document minimum required CMake version for --preset

     Signed-off-by: Frank Lichtenheld <[email protected]...>
     Acked-by: Gert Doering <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg28160.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering

#2 lore raw
Quoted 3 lines · Gert Doering

Makes sense (I did read the GH issue).

Your patch has been applied to the master branch.

I think it would make sense to apply this to release/2.6 as well, since that uses the same CMake build.

Thanks,

Signature · 1 line
  Frank Lichtenheld
#3 lore raw

Hi,

Quoted 7 lines · Frank Lichtenheld
Quoted 3 lines · Gert Doering

Makes sense (I did read the GH issue).

Your patch has been applied to the master branch.

I think it would make sense to apply this to release/2.6 as well, since that uses the same CMake build.

Done!

commit 9ec524613662989ab165d8ca507c2e0abffc3dff (HEAD -> release/2.6)

Author: Frank Lichtenheld <[email protected]...>
Date:   Thu Feb 1 13:30:39 2024 +0100

README.cmake.md: Document minimum required CMake version for --preset

gert

Signature · 6 lines
"If was one thing all people took for granted, was conviction that if you 
 feed honest figures into a computer, honest figures come out. Never doubted 
 it myself till I met a computer with a sense of humor."
                             Robert A. Heinlein, The Moon is a Harsh Mistress

Gert Doering - Munich, Germany                             [email protected]...