17 #define EX_SOFTWARE 70 36 char last_char=s[s.size()-1];
38 return last_char==
'\\' || last_char==
'/';
61 debug() <<
"Visual Studio mode" <<
eom;
67 compiler.object_file_extension=
"obj";
83 std_string ==
":c++14" || std_string ==
"=c++14" ||
84 std_string ==
":c++17" || std_string ==
"=c++17" ||
85 std_string ==
":c++latest" || std_string ==
"=c++latest")
90 else if(std_string ==
":c++11" || std_string ==
"=c++11")
97 warning() <<
"unknown language standard " << std_string <<
eom;
102 compiler.echo_file_name=
true;
111 compiler.output_file_object+=
122 compiler.output_file_executable+=
130 compiler.output_file_executable=
139 std::list<std::string>::iterator it;
141 std::cout <<
"Defines:\n";
146 std::cout <<
" " << (*it) <<
'\n';
149 std::cout <<
"Undefines:\n";
154 std::cout <<
" " << (*it) <<
'\n';
157 std::cout <<
"Preprocessor Options:\n";
162 std::cout <<
" " << (*it) <<
'\n';
165 std::cout <<
"Include Paths:\n";
170 std::cout <<
" " << (*it) <<
'\n';
173 std::cout <<
"Library Paths:\n";
174 for(it=compiler.library_paths.begin();
175 it!=compiler.library_paths.end();
178 std::cout <<
" " << (*it) <<
'\n';
181 std::cout <<
"Output file (object): " 182 << compiler.output_file_object <<
'\n';
183 std::cout <<
"Output file (executable): " 184 << compiler.output_file_executable <<
'\n';
188 return compiler.doit() ? EX_USAGE : EX_OK;
194 std::cout <<
"goto-cl understands the options of CL plus the following.\n\n";
struct configt::ansi_ct ansi_c
static bool is_directory(const std::string &s)
does it.
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...
std::list< std::string > defines
std::string get_value(char option) const
std::list< std::string > undefines
virtual void help_mode()
display command line help
static mstreamt & eom(mstreamt &m)
std::string get_base_name(const std::string &in, bool strip_suffix)
cleans a filename from path and extension
mstreamt & warning() const
bool set(const cmdlinet &cmdline)
virtual bool isset(char option) const
bool has_prefix(const std::string &s, const std::string &prefix)
Compile and link source and object files.
virtual void help()
display command line help
console_message_handlert message_handler
std::list< std::string > preprocessor_options
const std::string base_name
std::list< std::string > include_paths