17 #define EX_SOFTWARE 70 37 return path.empty() ? false :
38 path.back()==
'/' || path.back()==
'\\';
62 debug() <<
"Visual Studio mode" <<
eom;
68 compiler.object_file_extension=
"obj";
84 std_string ==
":c++14" || std_string ==
"=c++14" ||
85 std_string ==
":c++17" || std_string ==
"=c++17" ||
86 std_string ==
":c++latest" || std_string ==
"=c++latest")
91 else if(std_string ==
":c++11" || std_string ==
"=c++11")
98 warning() <<
"unknown language standard " << std_string <<
eom;
103 compiler.echo_file_name=
true;
112 compiler.output_directory_object = Fo_value;
115 warning() <<
"not a directory: " << Fo_value <<
eom;
118 compiler.output_file_object = Fo_value;
124 compiler.output_directory_object.empty())
126 error() <<
"output directory required for /c with multiple input files" 141 warning() <<
"not a directory: " 142 << compiler.output_file_executable <<
eom;
144 compiler.output_file_executable+=
153 compiler.output_file_executable=
162 std::list<std::string>::iterator it;
164 std::cout <<
"Defines:\n";
169 std::cout <<
" " << (*it) <<
'\n';
172 std::cout <<
"Undefines:\n";
177 std::cout <<
" " << (*it) <<
'\n';
180 std::cout <<
"Preprocessor Options:\n";
185 std::cout <<
" " << (*it) <<
'\n';
188 std::cout <<
"Include Paths:\n";
193 std::cout <<
" " << (*it) <<
'\n';
196 std::cout <<
"Library Paths:\n";
197 for(it=compiler.library_paths.begin();
198 it!=compiler.library_paths.end();
201 std::cout <<
" " << (*it) <<
'\n';
204 std::cout <<
"Output file (object): " 205 << compiler.output_file_object <<
'\n';
206 std::cout <<
"Output file (executable): " 207 << compiler.output_file_executable <<
'\n';
211 return compiler.doit() ? EX_USAGE : EX_OK;
217 std::cout <<
"goto-cl understands the options of CL plus the following.\n\n";
struct configt::ansi_ct ansi_c
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
virtual int doit()
does it.
console_message_handlert message_handler
bool is_directory(const std::string &path)
std::list< std::string > preprocessor_options
static bool has_directory_suffix(const std::string &path)
const std::string base_name
std::list< std::string > include_paths