Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GH actions] Adding CMake 4.0 version to CI #17927

Draft
wants to merge 13 commits into
base: develop2
Choose a base branch
from

Conversation

ErniGH
Copy link
Contributor

@ErniGH ErniGH commented Mar 10, 2025

Waiting for CMake 4.0 release (4.0.0-rc4 for now)

Summary:

  • Conan seems compatible with CMake 4.0.
  • 99% of failures are due to cmake_minimum_required < 3.5
  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.
  • Another failure was related to --preset usage:
    cmake < 4.x
$ cmake . --preset conan-release
CMake Warning:
  Ignoring extra path from command line:

   "."

Preset CMake variables:

  CMAKE_BUILD_TYPE="Release"
  CMAKE_POLICY_DEFAULT_CMP0091="NEW"
  CMAKE_TOOLCHAIN_FILE:FILEPATH="generators/conan_toolchain.cmake"

# ............

cmake >= 4.x

$ cmake . --preset conan-release --log-level VERBOSE
CMake Warning:
  Ignoring extra path from command line:

   "."

Preset CMake variables:

  CMAKE_BUILD_TYPE="Release"
  CMAKE_POLICY_DEFAULT_CMP0091="NEW"
  CMAKE_TOOLCHAIN_FILE:FILEPATH="generators/conan_toolchain.cmake"

# ............

Then, CMake 4.x needs to add --log-level VERBOSE to show those variables.
The test that checks this is FAILED test/functional/toolchains/cmake/test_cmake_toolchain.py::test_cmake_user_presets_load[None]

Co-authored-by: Carlos Zoido <[email protected]>
Copy link
Contributor Author

@ErniGH ErniGH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add cmake--version

@franramirez688 franramirez688 force-pushed the erni/cmake-4.0_test_client branch from 2105dba to 95e5154 Compare March 13, 2025 09:35
@franramirez688 franramirez688 changed the title DO NOT MERGE - cmake 4.0 test client [GH actions] Adding CMake 4.0 version to CI Mar 13, 2025
@franramirez688 franramirez688 added this to the 2.15.0 milestone Mar 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants