Thanks to visit codestin.com
Credit goes to github.com

Skip to content

build breaks with cmake 4 #166

@0-wiz-0

Description

@0-wiz-0

cmake 4 deprecated support for < 3.5.

This breaks the build of the last release:

CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 has been removed from CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.

  Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.


This patch fixes it:

--- CMakeLists.txt.orig 2025-08-14 20:01:20.968561125 +0000
+++ CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5)
 project(docopt.cpp VERSION 0.6.2)

 include(GNUInstallDirs)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions