windows build: Add build scripts + appveyor.yml
In order to guarantee that Hammer can build on Windows, an appveyor.yml and associated build scripts will build hammer and its examples. The idea is that as soon as the appveyor.yml exists in the repository, pull requests that would impede Windows portability would be immediately detected. The scripts expect CL.EXE to be in the path, and will produce their results in build/ The highest level of warning is enabled on CL.EXE, minus warnings that bring CL.EXE to a level that ressembles C99. The only notable warning that was disabled is the one that tells you about implicit truncating conversions. Hammer's source code has quite a few implicit conversions say from a 64bit unsigned integer to a integer of a lesser size (signed or otherwise)
This commit is contained in:
parent
402721ddb7
commit
be30820023
8 changed files with 224 additions and 0 deletions
37
tools/windows/clvars.bat
Normal file
37
tools/windows/clvars.bat
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
REM Don't call me directly
|
||||
REM Exports CLFLAGS
|
||||
|
||||
REM Start with the most strict warning level
|
||||
set WARNINGS=-W4 -Wall -WX
|
||||
|
||||
REM We disable implicit casting warnings (c4244), as they occur too often here.
|
||||
REM Its gcc/clang counterpart is Wconversion which does not seem to
|
||||
REM be enabled by default.
|
||||
REM See: [[https://gcc.gnu.org/wiki/NewWconversion#Frequently_Asked_Questions]]
|
||||
set WARNINGS=%WARNINGS% -wd4244
|
||||
|
||||
REM c4100 (unreferenced formal parameter) is equivalent to -Wno-unused-parameter
|
||||
set WARNINGS=%WARNINGS% -wd4100
|
||||
|
||||
REM c4200 (zero-sized array) is a C idiom supported by C99
|
||||
set WARNINGS=%WARNINGS% -wd4200
|
||||
|
||||
REM c4204 (non-constant aggregate initializers) ressembles C99 support
|
||||
set WARNINGS=%WARNINGS% -wd4204
|
||||
|
||||
REM c4820 (warnings about padding) is not useful
|
||||
set WARNINGS=%WARNINGS% -wd4820
|
||||
|
||||
REM c4710 (inlining could not be performed) is not useful
|
||||
set WARNINGS=%WARNINGS% -wd4710
|
||||
|
||||
REM c4255 ( () vs (void) ambiguity) is not useful
|
||||
set WARNINGS=%WARNINGS% -wd4255
|
||||
|
||||
REM c4996 (deprecated functions)
|
||||
set WARNINGS=%WARNINGS% -wd4996
|
||||
|
||||
REM we use sprintf
|
||||
set DEFINES=-D_CRT_SECURE_NO_WARNINGS
|
||||
|
||||
set CLFLAGS=%DEFINES% %WARNINGS%
|
||||
Loading…
Add table
Add a link
Reference in a new issue