Browse Source

/permissive- is a good default for MSVC

default_compile_flags
vector-of-bool 5 years ago
parent
commit
17f436f53a
1 changed files with 9 additions and 2 deletions
  1. +9
    -2
      src/dds/toolchain.cpp

+ 9
- 2
src/dds/toolchain.cpp View File

@@ -324,8 +324,15 @@ std::optional<toolchain> toolchain::get_builtin(std::string_view s) noexcept {
ret._inc_template = {"/I<PATH>"};
ret._def_template = {"/D<DEF>"};
ret._c_compile = {"cl.exe", "/nologo", "<FLAGS>", "/c", "<IN>", "/Fo<OUT>"};
ret._cxx_compile
= {"cl.exe", "/nologo", "<FLAGS>", "/std:c++latest", "/EHsc", "/c", "<IN>", "/Fo<OUT>"};
ret._cxx_compile = {"cl.exe",
"/nologo",
"<FLAGS>",
"/std:c++latest",
"/permissive-",
"/EHsc",
"/c",
"<IN>",
"/Fo<OUT>"};
std::vector<std::string_view> common_flags = {"/Z7", "/O2", "/MT", "/DEBUG"};
extend(ret._c_compile, common_flags);
extend(ret._cxx_compile, common_flags);

Loading…
Cancel
Save