A program wrapper MS Visual Studio.
More...
#include <msvc_wrapper.hpp>
A program wrapper MS Visual Studio.
◆ can_handle_command()
| bool bcache::msvc_wrapper_t::can_handle_command |
( |
| ) |
|
|
overridevirtual |
Check if this class implements a wrapper for the given command.
- Returns
- true if this wrapper can handle the command.
Implements bcache::program_wrapper_t.
◆ get_build_files()
| std::map< std::string, expected_file_t > bcache::msvc_wrapper_t::get_build_files |
( |
| ) |
|
|
overrideprivatevirtual |
Get the paths to the files that are to be generated by the command.
- Returns
- the files that are expected to be generated by this command.
- Exceptions
-
| runtime_error | if the request could not be completed. |
Reimplemented from bcache::program_wrapper_t.
◆ get_capabilities()
Generate a list of supported capabilites.
The list of capabilites can contain zero or more of the following (case sensitive) strings:
| String | Meaning |
| create_target_dirs | Request creation of missing output dirs |
| direct_mode | Supports direct mode |
| hard_links | Can use hard links for cached files |
In order to support direct mode, get_input_files() and get_implicit_input_files() need to be implemented.
- Returns
- a list of supported capabilites.
- Exceptions
-
| runtime_error | if the request could not be completed. |
- Note
- Capabilites are "opt-in". If this method is not implemented or returns an empty list, all capabilites will be treated as "not supported".
Reimplemented from bcache::program_wrapper_t.
◆ get_implicit_input_files()
| string_list_t bcache::msvc_wrapper_t::get_implicit_input_files |
( |
| ) |
|
|
overrideprivatevirtual |
Get a list of paths to implicit input files.
This method is only used in direct mode, and the main use case is for collecting a list of all include files for C/C++ builds.
- Returns
- the list of implicit input files.
- Exceptions
-
| runtime_error | if the request could not be completed. |
- Note
- The
preprocess_source method has been called before calling this method (so the list can be collected during the preprocessing step and later be returned by this method).
-
Only used in direct mode.
Reimplemented from bcache::program_wrapper_t.
◆ get_input_files()
Get the paths to the input files for the command.
- Returns
- the files that are used as primary input.
- Exceptions
-
| runtime_error | if the request could not be completed. |
- Note
- Only used in direct mode.
Reimplemented from bcache::program_wrapper_t.
◆ get_program_id()
| std::string bcache::msvc_wrapper_t::get_program_id |
( |
| ) |
|
|
overrideprivatevirtual |
Get a string that uniquely identifies the program.
- Returns
- a program ID string.
- Exceptions
-
| runtime_error | if the request could not be completed. |
Reimplemented from bcache::program_wrapper_t.
◆ get_relevant_arguments()
Get relevant command line arguments for hashing.
- Returns
- filtered command line arguments.
- Exceptions
-
| runtime_error | if the request could not be completed. |
- Note
- The purpose of this function is to create a list of arguments that is suitable for hashing (i.e. uniquely identifying) the program options. As such, things like absolute file paths and compilation defines should be excluded (since they are resolved in the preprocess step).
Reimplemented from bcache::program_wrapper_t.
◆ get_relevant_env_vars()
| std::map< std::string, std::string > bcache::msvc_wrapper_t::get_relevant_env_vars |
( |
| ) |
|
|
overrideprivatevirtual |
Get relevant environment variables for hashing.
- Returns
- relevant environment variables and their values.
- Exceptions
-
| runtime_error | if the request could not be completed. |
- Note
- The purpose of this function is to create a list of environment variables that may affect program output.
Reimplemented from bcache::program_wrapper_t.
◆ preprocess_source()
| std::string bcache::msvc_wrapper_t::preprocess_source |
( |
| ) |
|
|
overrideprivatevirtual |
Generate the preprocessed source text.
- Returns
- the preprocessed source code file as a string, or an empty string if the operation failed.
- Exceptions
-
| runtime_error | if the request could not be completed. |
Reimplemented from bcache::program_wrapper_t.
◆ resolve_args()
| void bcache::msvc_wrapper_t::resolve_args |
( |
| ) |
|
|
overrideprivatevirtual |
Resolve arguments on the command line.
This method is called after can_handle_command, but before calling other methods that rely on the command line arguments. This gives a wrapper the opportunity to resolve special arguments so that they can be properly interpretade by later steps.
The primary use case of this method is to implement support for so called response files, which contain further command line arguments (this is common on Windows to work around the relativlely small command line length limit).
- Exceptions
-
| runtime_error | if the request could not be completed. |
Reimplemented from bcache::program_wrapper_t.
◆ run_for_miss()
Run the actual command (when there is a cache miss).
- Returns
- the run result for the child process.
Reimplemented from bcache::program_wrapper_t.
The documentation for this class was generated from the following files: