Add an option to the MSVC makefile to enable treating warnings as errors.

FossilOrigin-Name: 6a378c29b43d61313ca9daa599e59d8eeeed9a27
This commit is contained in:
mistachkin
2017-02-01 22:32:49 +00:00
parent 31a1349515
commit 8c5e8feb35
4 changed files with 35 additions and 9 deletions
+13
View File
@@ -24,6 +24,13 @@ TOP = .
USE_FULLWARN = 0
!ENDIF
# Set this non-0 to enable treating warnings as errors (-WX, etc) when
# compiling.
#
!IFNDEF USE_FATAL_WARN
USE_FATAL_WARN = 0
!ENDIF
# Set this non-0 to enable full runtime error checks (-RTC1, etc). This
# has no effect if (any) optimizations are enabled.
#
@@ -454,6 +461,12 @@ TCC = $(CC) -nologo -W4 -DINCLUDE_MSVC_H=1 $(CCOPTS) $(TCCOPTS)
TCC = $(CC) -nologo -W3 $(CCOPTS) $(TCCOPTS)
!ENDIF
# Check if warnings should be treated as errors when compiling.
#
!IF $(USE_FATAL_WARN)!=0
TCC = $(TCC) -WX
!ENDIF
TCC = $(TCC) -DSQLITE_OS_WIN=1 -I. -I$(TOP) -fp:precise
RCC = $(RC) -DSQLITE_OS_WIN=1 -I. -I$(TOP) $(RCOPTS) $(RCCOPTS)