fix: add CMAKE_POLICY_VERSION_MINIMUM=3.31 to make it working with cmake 4.0

This commit is contained in:
Slava 2025-04-01 13:18:03 +03:00
parent bd9b8394a7
commit 00512d968b
No known key found for this signature in database
GPG Key ID: 351E7AA9BD0DFEB8
2 changed files with 8 additions and 4 deletions

View File

@ -12,7 +12,9 @@ const
"-G\"MSYS Makefiles\" -DCMAKE_BUILD_TYPE=Release -DLEVELDB_BUILD_BENCHMARKS=OFF"
else:
"-DCMAKE_BUILD_TYPE=Release -DLEVELDB_BUILD_BENCHMARKS=OFF"
LevelDbCMakeCommonFlags = " -DCMAKE_POLICY_VERSION_MINIMUM=3.31"
LevelDbDir {.strdefine.} = $(root/"vendor")
buildDir = $(root/"build")
@ -29,7 +31,7 @@ proc buildLevelDb() =
discard gorge "rm -rf " & buildDir
discard gorge "mkdir -p " & buildDir
let cmd = "cmake -S \"" & LevelDbDir & "\" -B \"" & buildDir & "\" " & LevelDbCMakeFlags
let cmd = "cmake -S \"" & LevelDbDir & "\" -B \"" & buildDir & "\" " & LevelDbCMakeFlags & LevelDbCMakeCommonFlags
echo "\nBuilding LevelDB: " & cmd
let (output, exitCode) = gorgeEx cmd
if exitCode != 0:

View File

@ -12,7 +12,9 @@ const
"-G\"MSYS Makefiles\" -DCMAKE_BUILD_TYPE=Release -DLEVELDB_BUILD_BENCHMARKS=OFF"
else:
"-DCMAKE_BUILD_TYPE=Release -DLEVELDB_BUILD_BENCHMARKS=OFF"
LevelDbCMakeCommonFlags = " -DCMAKE_POLICY_VERSION_MINIMUM=3.31"
LevelDbDir {.strdefine.} = $(root/"vendor")
buildDir = $(root/"build")
@ -29,7 +31,7 @@ proc buildLevelDb() =
discard gorge "rm -rf " & buildDir
discard gorge "mkdir -p " & buildDir
let cmd = "cmake -S \"" & LevelDbDir & "\" -B \"" & buildDir & "\" " & LevelDbCMakeFlags
let cmd = "cmake -S \"" & LevelDbDir & "\" -B \"" & buildDir & "\" " & LevelDbCMakeFlags & LevelDbCMakeCommonFlags
echo "\nBuilding LevelDB: " & cmd
let (output, exitCode) = gorgeEx cmd
if exitCode != 0: