Skip to content

LibZMQ cannot be built with CMake Version 4.0.1 on Windows #4786

Open
@uelkue

Description

@uelkue

Issue description

LibZMQ does not build with CMake version 4.0.1 on Windows.

Environment

  • libzmq version (commit hash if unreleased): 4.3.5, released on Oct 9, 2023
  • OS: Windows 10 (22H2)
  • CMake version: 4.0.1

Minimal test code / Steps to reproduce the issue

  1. Create a build folder and change to this folder.
  2. Build LibZMQ with the command cmake -G"MinGW Makefiles" -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 -DENABLE_CURVE=OFF -DZMQ_BUILD_TESTS=OFF -DMINGW=ON ..

What's the actual result? (include assertion message & call stack if applicable)

Build fails with the message:

CMake Warning (dev) at CMakeLists.txt:2 (project):
  cmake_minimum_required() should be called prior to this top-level project()
  call.  Please see the cmake-commands(7) manual for usage documentation of
  both commands.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- The C compiler identification is GNU 14.2.0
-- The CXX compiler identification is GNU 14.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/mingw64/bin/gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/mingw64/bin/c++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:7 (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.

-- Configuring incomplete, errors occurred!

What's the expected result?

LibZMQ builds successfully with CMake.

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