37 return path.empty() ? false :
38 path.back()==
'/' || path.back()==
'\\';
59 const auto default_verbosity = (
cmdline.isset(
"Wall") ||
cmdline.isset(
"W4"))
67 ms_cl_version.
get(
"cl.exe");
99 const std::string std_string =
cmdline.get_value(
"std");
102 std_string ==
":c++14" || std_string ==
"=c++14" ||
103 std_string ==
":c++17" || std_string ==
"=c++17" ||
104 std_string ==
":c++latest" || std_string ==
"=c++latest")
109 else if(std_string ==
":c++11" || std_string ==
"=c++11")
117 log.warning() <<
"unknown language standard " << std_string
128 std::string Fo_value =
cmdline.get_value(
"Fo");
135 if(!std::filesystem::is_directory(Fo_value))
136 log.warning() <<
"not a directory: " << Fo_value <<
messaget::eom;
147 log.error() <<
"output directory required for /c with multiple input files"
181 config.ansi_c.char_is_unsigned=
true;
185 std::list<std::string>::iterator it;
187 std::cout <<
"Defines:\n";
188 for(it=
config.ansi_c.defines.begin();
189 it!=
config.ansi_c.defines.end();
192 std::cout <<
" " << (*it) <<
'\n';
195 std::cout <<
"Undefines:\n";
196 for(it=
config.ansi_c.undefines.begin();
197 it!=
config.ansi_c.undefines.end();
200 std::cout <<
" " << (*it) <<
'\n';
203 std::cout <<
"Preprocessor Options:\n";
204 for(it=
config.ansi_c.preprocessor_options.begin();
205 it!=
config.ansi_c.preprocessor_options.end();
208 std::cout <<
" " << (*it) <<
'\n';
211 std::cout <<
"Include Paths:\n";
212 for(it=
config.ansi_c.include_paths.begin();
213 it!=
config.ansi_c.include_paths.end();
216 std::cout <<
" " << (*it) <<
'\n';
219 std::cout <<
"Library Paths:\n";
224 std::cout <<
" " << (*it) <<
'\n';
227 std::cout <<
"Output file (object): "
229 std::cout <<
"Output file (executable): "
234 return compiler.
doit() ? EX_USAGE : EX_OK;
240 std::cout <<
"goto-cl understands the options of CL plus the following.\n\n";
@ COMPILE_LINK_EXECUTABLE
std::string output_file_object
std::string output_directory_object
bool doit()
reads and source and object files, compiles and links them into goto program objects.
std::string object_file_extension
enum compilet::@010007010156070135133373264143331307343141370152 mode
std::list< std::string > library_paths
std::string output_file_executable
const std::string base_name
void help()
display command line help
Class that provides messages with a built-in verbosity 'level'.
static unsigned eval_verbosity(const std::string &user_input, const message_levelt default_verbosity, message_handlert &dest)
Parse a (user-)provided string as a verbosity level and set it as the verbosity of dest.
cl_message_handlert message_handler
virtual int doit()
does it.
virtual void help_mode()
display command line help
void get(const std::string &executable)
enum ms_cl_versiont::targett target
Compile and link source and object files.
bool has_prefix(const std::string &s, const std::string &prefix)
std::string get_base_name(const std::string &in, bool strip_suffix)
cleans a filename from path and extension
static bool has_directory_suffix(const std::string &path)