File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -406,6 +406,7 @@ const char *ms_cl_prefixes[]=
406406 " MT" , // link with LIBCMT.LIB
407407 " MDd" , // link with MSVCRTD.LIB debug lib
408408 " MTd" , // link with LIBCMTD.LIB debug lib
409+ " std:" , // specify C++ language standard
409410 nullptr
410411};
411412
Original file line number Diff line number Diff line change @@ -77,6 +77,23 @@ int ms_cl_modet::doit()
7777 else
7878 compiler.mode =compilet::COMPILE_LINK_EXECUTABLE;
7979
80+ if (cmdline.isset (" std:" ))
81+ {
82+ const std::string std_string = cmdline.get_value (" std:" );
83+
84+ if (
85+ std_string == " c++14" || std_string == " c++17" ||
86+ std_string == " c++latest" )
87+ {
88+ // we don't have any newer version at the moment
89+ config.cpp .set_cpp14 ();
90+ }
91+ else
92+ warning () << " unknown language standard " << std_string << eom;
93+ }
94+ else
95+ config.cpp .set_cpp14 ();
96+
8097 compiler.echo_file_name =true ;
8198
8299 if (cmdline.isset (" Fo" ))
You can’t perform that action at this time.
0 commit comments