@@ -46,19 +46,15 @@ clone_depth: 1
46
46
47
47
# Generate the .sln file with Cmake before running MSBuild
48
48
before_build :
49
- - cmd : mkdir c:\projects\platform_folders \build
50
- - cmd : cd c:\projects\platform_folders \build
49
+ - cmd : mkdir "%APPVEYOR_BUILD_FOLDER%" \build
50
+ - cmd : cd "%APPVEYOR_BUILD_FOLDER%" \build
51
51
# I know this is ugly, but the matrix didn't work, and newlines seem to not be supported
52
52
- cmd : IF "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2015" (IF "%PLATFORM%"=="x86" (cmake -G "Visual Studio 14 2015" ..) ELSE (cmake -G "Visual Studio 14 2015 Win64" -T host=x64 ..)) ELSE (IF "%PLATFORM%"=="x86" (cmake -G "Visual Studio 15 2017" ..) ELSE (cmake -G "Visual Studio 15 2017 Win64" -T host=x64 ..))
53
53
54
- # Runs MSBuild.exe with logging & some options
55
- build :
56
- # Allows for faster builds
57
- parallel : true
58
- # The solution file is the name of the project() given to Cmake
59
- project : c:\projects\platform_folders\build\platform_folders.sln
60
- # Trust me, you don't want higher than minimal. Even this is spammy
61
- verbosity : minimal
54
+ # CMake generates the platform as "Win32" instead of "x86" when building 32-bit
55
+ # but 64-bit is "x64"
56
+ build_script :
57
+ - cmd : IF "%PLATFORM%"=="x86" (MSBuild.exe "%APPVEYOR_BUILD_FOLDER%"\build\platform_folders.sln /p:Configuration="%CONFIGURATION%" /p:Platform="Win32" /v:minimal /m /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll") ELSE (MSBuild.exe "%APPVEYOR_BUILD_FOLDER%"\build\platform_folders.sln /p:Configuration="%CONFIGURATION%" /p:Platform="%PLATFORM%" /v:minimal /m /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll")
62
58
63
59
# ---------------------------------#
64
60
# tests configuration #
@@ -67,12 +63,12 @@ build:
67
63
# to run your custom scripts instead of automatic tests
68
64
# The %CONFIGURATION% and %PLATFORM% variables are set from Appveyor as env-vars
69
65
test_script :
70
- - cmd : MSBuild.exe /p:Configuration="%CONFIGURATION%" /p:Platform="%PLATFORM%" /v:minimal c:\projects\platform_folders \build\RUN_TESTS.vcxproj
66
+ - cmd : MSBuild.exe /p:Configuration="%CONFIGURATION%" /p:Platform="%PLATFORM%" /v:minimal "%APPVEYOR_BUILD_FOLDER%" \build\RUN_TESTS.vcxproj
71
67
72
68
# ---------------------------------#
73
69
# global handlers #
74
70
# ---------------------------------#
75
71
76
72
# on build failure dump cmake err log
77
73
on_failure :
78
- - cmd : IF exist c:\projects\platform_folders\ build\CMakeFiles\CMakeError.log (type c:\projects\platform_folders \build\CMakeFiles\CMakeError.log)
74
+ - cmd : IF exist "%APPVEYOR_BUILD_FOLDER%"\ build\CMakeFiles\CMakeError.log (type "%APPVEYOR_BUILD_FOLDER%" \build\CMakeFiles\CMakeError.log)
0 commit comments