Skip to content

Commit 7d7d73c

Browse files
committed
build: Fix --build-3rdparty on cmake 4.x
Add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 when building dependencies with cmake, so that the build doesn't fail when we build old dependencies with new cmake. While this is not guaranteed to work in general case, it seems to work fine with all our dependencies. (cherry picked from commit 7b8392c)
1 parent 9c65791 commit 7d7d73c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

scripts/scons_helpers/build-3rdparty.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,11 @@ def _getvar(var, default):
281281
'-DCMAKE_C_FLAGS_RELEASE:STRING=' + quote(' '.join(cc_flags)),
282282
]
283283

284+
# compatibility with older cmake files
285+
args += [
286+
'-DCMAKE_POLICY_VERSION_MINIMUM=3.5',
287+
]
288+
284289
execute(ctx, 'cmake ' + src_dir + ' ' + ' '.join(args))
285290

286291
def execute_cmake_build(ctx):

0 commit comments

Comments
 (0)