17 #define EX_SOFTWARE 70
37 return path.empty() ? false :
38 path.back()==
'/' || path.back()==
'\\';
67 ms_cl_version.
get(
"cl.exe");
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
135 if(!std::filesystem::is_directory(Fo_value))
147 log.error() <<
"output directory required for /c with multiple input files"
185 std::list<std::string>::iterator it;
187 std::cout <<
"Defines:\n";
192 std::cout <<
" " << (*it) <<
'\n';
195 std::cout <<
"Undefines:\n";
200 std::cout <<
" " << (*it) <<
'\n';
203 std::cout <<
"Preprocessor Options:\n";
208 std::cout <<
" " << (*it) <<
'\n';
211 std::cout <<
"Include Paths:\n";
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";
void print_warnings_as_errors(bool yes)
With yes set to true, prefix warnings with an error message.
std::string get_value(char option) const
virtual bool isset(char option) const
@ 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
std::list< std::string > library_paths
std::string output_file_executable
bool set(const cmdlinet &cmdline)
struct configt::ansi_ct ansi_c
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)
std::list< std::string > include_paths
std::list< std::string > undefines
std::list< std::string > preprocessor_options
std::list< std::string > defines