17 #define EX_SOFTWARE 70 39 char last_char=s[s.size()-1];
41 return last_char==
'\\' || last_char==
'/';
53 unsigned int verbosity=1;
69 debug() <<
"Visual Studio mode" <<
eom;
75 compiler.object_file_extension=
"obj";
86 compiler.echo_file_name=
true;
95 compiler.output_file_object+=
106 compiler.output_file_executable+=
114 compiler.output_file_executable=
123 std::list<std::string>::iterator it;
125 std::cout <<
"Defines:\n";
130 std::cout <<
" " << (*it) <<
'\n';
133 std::cout <<
"Undefines:\n";
138 std::cout <<
" " << (*it) <<
'\n';
141 std::cout <<
"Preprocessor Options:\n";
146 std::cout <<
" " << (*it) <<
'\n';
149 std::cout <<
"Include Paths:\n";
154 std::cout <<
" " << (*it) <<
'\n';
157 std::cout <<
"Library Paths:\n";
158 for(it=compiler.library_paths.begin();
159 it!=compiler.library_paths.end();
162 std::cout <<
" " << (*it) <<
'\n';
165 std::cout <<
"Output file (object): " 166 << compiler.output_file_object <<
'\n';
167 std::cout <<
"Output file (executable): " 168 << compiler.output_file_executable <<
'\n';
172 return compiler.doit() ? EX_USAGE : EX_OK;
178 std::cout <<
"goto-cl understands the options of CL plus the following.\n\n";
struct configt::ansi_ct ansi_c
unsigned unsafe_string2unsigned(const std::string &str, int base)
static bool is_directory(const std::string &s)
does it.
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
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.
message_handlert & get_message_handler()
virtual void help()
display command line help
void set_verbosity(unsigned _verbosity)
console_message_handlert message_handler
std::list< std::string > preprocessor_options
const std::string base_name
std::list< std::string > include_paths