17 #define EX_SOFTWARE 70 38 return path.empty() ? false :
39 path.back()==
'/' || path.back()==
'\\';
64 ms_cl_version.
get(
"cl.exe");
66 debug() <<
"Visual Studio mode " << ms_cl_version <<
eom;
79 compiler.object_file_extension=
"obj";
95 std_string ==
":c++14" || std_string ==
"=c++14" ||
96 std_string ==
":c++17" || std_string ==
"=c++17" ||
97 std_string ==
":c++latest" || std_string ==
"=c++latest")
102 else if(std_string ==
":c++11" || std_string ==
"=c++11")
109 warning() <<
"unknown language standard " << std_string <<
eom;
114 compiler.echo_file_name=
true;
123 compiler.output_directory_object = Fo_value;
126 warning() <<
"not a directory: " << Fo_value <<
eom;
129 compiler.output_file_object = Fo_value;
135 compiler.output_directory_object.empty())
137 error() <<
"output directory required for /c with multiple input files" 152 warning() <<
"not a directory: " 153 << compiler.output_file_executable <<
eom;
155 compiler.output_file_executable+=
164 compiler.output_file_executable=
173 std::list<std::string>::iterator it;
175 std::cout <<
"Defines:\n";
180 std::cout <<
" " << (*it) <<
'\n';
183 std::cout <<
"Undefines:\n";
188 std::cout <<
" " << (*it) <<
'\n';
191 std::cout <<
"Preprocessor Options:\n";
196 std::cout <<
" " << (*it) <<
'\n';
199 std::cout <<
"Include Paths:\n";
204 std::cout <<
" " << (*it) <<
'\n';
207 std::cout <<
"Library Paths:\n";
208 for(it=compiler.library_paths.begin();
209 it!=compiler.library_paths.end();
212 std::cout <<
" " << (*it) <<
'\n';
215 std::cout <<
"Output file (object): " 216 << compiler.output_file_object <<
'\n';
217 std::cout <<
"Output file (executable): " 218 << compiler.output_file_executable <<
'\n';
222 return compiler.doit() ? EX_USAGE : EX_OK;
228 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
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.
void get(const std::string &executable)
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