aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bootstrap-msvc.bat2
-rw-r--r--build/root.build6
-rw-r--r--tests/build/root.build6
3 files changed, 13 insertions, 1 deletions
diff --git a/bootstrap-msvc.bat b/bootstrap-msvc.bat
index ad2d3a7..a81bec9 100644
--- a/bootstrap-msvc.bat
+++ b/bootstrap-msvc.bat
@@ -40,7 +40,7 @@ goto :eof
rem Note that echo does not override errorlevel.
rem
echo on
- %cxx% /I%owd%\%libbutl% /I%owd% /DBUILD2_BOOTSTRAP /DBUILD2_HOST_TRIPLET=\"i686-microsoft-win32-msvc\" %ops% /c /TP %*
+ %cxx% /I%owd%\%libbutl% /I%owd% /D_CRT_SECURE_NO_WARNINGS /D_SCL_SECURE_NO_WARNINGS /DBUILD2_BOOTSTRAP /DBUILD2_HOST_TRIPLET=\"i686-microsoft-win32-msvc\" %ops% /c /TP %*
@echo off
if errorlevel 1 exit /b 1
goto :eof
diff --git a/build/root.build b/build/root.build
index 24741ec..6213fe1 100644
--- a/build/root.build
+++ b/build/root.build
@@ -13,6 +13,12 @@ ixx{*}: extension = ixx
txx{*}: extension = txx
cxx{*}: extension = cxx
+if ($cxx.class == 'msvc')
+{
+ cxx.poptions += -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS
+ cxx.coptions += /wd4251 /wd4275 /wd4800
+}
+
cxx.poptions =+ "-I$out_root" "-I$src_root"
# While we don't have any C sources to compile, we need to get the C compiler
diff --git a/tests/build/root.build b/tests/build/root.build
index 749e6c3..d0f6a7e 100644
--- a/tests/build/root.build
+++ b/tests/build/root.build
@@ -9,6 +9,12 @@ using cxx
hxx{*}: extension = hxx
cxx{*}: extension = cxx
+if ($cxx.class == 'msvc')
+{
+ cxx.poptions += -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS
+ cxx.coptions += /wd4251 /wd4275 /wd4800
+}
+
# Setup the build system driver that we are testing (which may not be the same
# as our $build.path).
#