From fda8db23380e997e08b45a00476c6965ac33c92c Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 12 Jun 2020 14:14:25 +0200 Subject: Add standard Microsoft warning "disclaimer" to ad hoc C++ recipe projects --- libbuild2/rule-adhoc-cxx.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libbuild2/rule-adhoc-cxx.cxx b/libbuild2/rule-adhoc-cxx.cxx index d95994d..547bb69 100644 --- a/libbuild2/rule-adhoc-cxx.cxx +++ b/libbuild2/rule-adhoc-cxx.cxx @@ -464,6 +464,12 @@ namespace build2 ofs << "import imp_libs += build2%lib{build2}" << '\n' << "libs{" << id << "}: cxx{rule} hxx{location} $imp_libs" << '\n' << '\n' + << "if ($cxx.target.system == 'win32-msvc')" << '\n' + << " cxx.poptions += -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS" << '\n' + << '\n' + << "if ($cxx.class == 'msvc')" << '\n' + << " cxx.coptions += /wd4251 /wd4275 /wd4800" << '\n' + << '\n' << psig << '\n'; ofs.close (); -- cgit v1.1