microsoft / microsoft/DirectXShaderCompiler

[Azure pipelines] Too high CMake 4.x version

Open
#7,275 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
3.7k
Forks
900
Avg merge
2d 11h
Merged PRs (30d)
44

Description

I created a PR regarding toggling ETW https://github.com/microsoft/DirectXShaderCompiler/pull/7274, my attention took Nix Linux_Clang_Release job and failure at configuration step - it appears latest workflow runner took recent CMake 4.0 which banned a lot of old policies still present in DXC build system.

2025-03-29T07:27:57.0741231Z CMake Warning (dev) at /usr/local/share/cmake-4.0/Modules/FindPackageHandleStandardArgs.cmake:430 (message):

hence it generated errors at configuration step

2025-03-29T07:27:44.1835242Z CMake Error at CMakeLists.txt:26 (cmake_policy):
2025-03-29T07:27:44.1835689Z Policy CMP0051 may not be set to OLD behavior because this version of CMake
2025-03-29T07:27:44.1836135Z no longer supports it. The policy was introduced in CMake version 3.1.0,
2025-03-29T07:27:44.1837000Z and use of NEW behavior is now required.
2025-03-29T07:27:44.1837293Z
2025-03-29T07:27:44.1837475Z Please either update your CMakeLists.txt files to conform to the new
2025-03-29T07:27:44.1837806Z behavior or use an older version of CMake that still supports the old
2025-03-29T07:27:44.1838037Z behavior. Run cmake --help-policy CMP0051 for more information.

2025-03-29T07:28:01.1773504Z CMake Error at tools/clang/CMakeLists.txt:1 (cmake_minimum_required):
2025-03-29T07:28:01.1775286Z Compatibility with CMake < 3.5 has been removed from CMake.
2025-03-29T07:28:01.1775369Z
2025-03-29T07:28:01.1775538Z Update the VERSION argument value. Or, use the ... syntax
2025-03-29T07:28:01.1775768Z to tell CMake that the project requires at least but has been updated
2025-03-29T07:28:01.1775957Z to work with policies introduced by or earlier.
2025-03-29T07:28:01.1776026Z
2025-03-29T07:28:01.1776189Z Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.
2025-03-29T07:28:01.1776273Z
2025-03-29T07:28:01.1776313Z
2025-03-29T07:28:01.1867560Z -- Configuring incomplete, errors occurred!

and failed the job; maybe one could consider using 3.x with workflows or update build system?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with CMakeLists.txt and tools/clang/CMakeLists.txt, then reproduce the configuration failure in the Nix Linux_Clang_Release job using the linked build log. Compare the project’s policy and minimum-version settings with the runner’s CMake version; done means the job configures successfully with an explicitly chosen CMake version or updated policies.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system, ci-cd
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.