Skip to content

Commit 44784eb

Browse files
committed
Fix appveyor behavior for CMAKE 4.1+
1 parent db1cac7 commit 44784eb

1 file changed

Lines changed: 22 additions & 3 deletions

File tree

scripts/appveyor.bat

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,33 @@ if "%~1" == "test" (
6565
)
6666

6767
if "%PLATFORM%" == "x64" (
68-
@rem please excuse the hack - CMake is unable to produce multiarch MSVC projects
69-
cmake -G "%CMAKE_GENERATOR_PREFIX%" -DBOOST_ROOT=%BOOST_ROOT% -DBOOST_LIBRARYDIR=%BOOST_LIBRARYDIR% ..
68+
@rem Enable legacy FindBoost behavior and restore BOOST_ROOT handling required by CMake 3.30+/4.x
69+
cmake -G "%CMAKE_GENERATOR_PREFIX%" ^
70+
-DCMAKE_POLICY_DEFAULT_CMP0144=NEW ^
71+
-DCMAKE_POLICY_DEFAULT_CMP0167=OLD ^
72+
-DBOOST_ROOT="%BOOST_ROOT%" ^
73+
-DBoost_INCLUDE_DIR="%BOOST_ROOT%" ^
74+
-DBoost_NO_SYSTEM_PATHS=ON ^
75+
-DBoost_USE_STATIC_LIBS=OFF ^
76+
-DBoost_USE_STATIC_RUNTIME=OFF ^
77+
-DBoost_USE_MULTITHREADED=OFF ^
78+
..
79+
7080
cmake --build . --config %CONFIGURATION% --target portability_test32
7181
del CMakeCache.txt
7282
rmdir /s /q CMakeFiles
7383
)
7484

75-
cmake -G "%CMAKE_GENERATOR_PREFIX%" -A %PLATFORM% -DBOOST_ROOT=%BOOST_ROOT% -DBOOST_LIBRARYDIR=%BOOST_LIBRARYDIR% ..
85+
cmake -G "%CMAKE_GENERATOR_PREFIX%" -A %PLATFORM% ^
86+
-DCMAKE_POLICY_DEFAULT_CMP0144=NEW ^
87+
-DCMAKE_POLICY_DEFAULT_CMP0167=OLD ^
88+
-DBOOST_ROOT="%BOOST_ROOT%" ^
89+
-DBoost_INCLUDE_DIR="%BOOST_ROOT%" ^
90+
-DBoost_NO_SYSTEM_PATHS=ON ^
91+
-DBoost_USE_STATIC_LIBS=OFF ^
92+
-DBoost_USE_STATIC_RUNTIME=OFF ^
93+
-DBoost_USE_MULTITHREADED=OFF ^
94+
..
7695
@rem left the actual build for later - AppVeyor enables parallel jobs in a much cleaner way than msbuild
7796

7897
:done

0 commit comments

Comments
 (0)