Skip to content

Commit d10906b

Browse files
committed
fix(ci): fix windows cmake build with cmake 4.3
CMake 4.3 on windows-latest now validates CMAKE_POLICY_VERSION_MINIMUM requires major.minor format. PowerShell was splitting the unquoted argument 3.5 into 3 and .5, leaving the variable set to the invalid value "3". Quote the -D flag to prevent splitting. Also update cmake_minimum_required to use the VERSION range syntax (3.12...4.0) which is the proper cmake 4.x compatibility declaration. Signed-off-by: Roberto Scolaro <roberto.scolaro21@gmail.com>
1 parent 2b8ba54 commit d10906b

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ jobs:
134134
choco install nsis -y
135135
- name: Build
136136
run: |
137-
cmake -Wno-dev -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -S . -B build
137+
cmake -Wno-dev "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" -S . -B build
138138
cmake --build build --target package --config Release
139139
- name: Upload Artifacts
140140
uses: actions/upload-artifact@v4

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ if(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/CMakeLists.txt)
3333
"The following wiki page has more information on manually building sysdig: http://bit.ly/1oJ84UI")
3434
endif()
3535

36-
cmake_minimum_required(VERSION 3.12)
36+
cmake_minimum_required(VERSION 3.12...4.0)
3737

3838
project(sysdig)
3939

0 commit comments

Comments
 (0)