20 #ifndef BUILDCACHE_PROGRAM_WRAPPER_HPP_
21 #define BUILDCACHE_PROGRAM_WRAPPER_HPP_
23 #include <base/file_utils.hpp>
24 #include <base/string_list.hpp>
25 #include <cache/cache.hpp>
26 #include <cache/expected_file.hpp>
27 #include <sys/sys_utils.hpp>
58 bool create_target_dirs()
const {
59 return m_create_target_dirs;
62 bool direct_mode()
const {
66 bool hard_links()
const {
71 bool m_create_target_dirs =
false;
72 bool m_direct_mode =
false;
73 bool m_hard_links =
false;
177 std::string get_program_id_cached();
183 #endif // BUILDCACHE_PROGRAM_WRAPPER_HPP_
Path to an executable file.
Definition: file_utils.hpp:127
virtual string_list_t get_relevant_arguments()
Get relevant command line arguments for hashing.
Definition: program_wrapper.cpp:272
Run results from an external command.
Definition: sys_utils.hpp:30
bool handle_command(int &return_code)
Try to wrap a program command.
Definition: program_wrapper.cpp:67
virtual string_list_t get_implicit_input_files()
Get a list of paths to implicit input files.
Definition: program_wrapper.cpp:294
The top level namespace.
Definition: compressor.cpp:34
A convenient vector of strings container with support functions for program argument handling.
Definition: string_list.hpp:30
virtual string_list_t get_input_files()
Get the paths to the input files for the command.
Definition: program_wrapper.cpp:283
virtual string_list_t get_capabilities()
Generate a list of supported capabilites.
Definition: program_wrapper.cpp:253
virtual std::string preprocess_source()
Generate the preprocessed source text.
Definition: program_wrapper.cpp:289
The base class for all program wrappers.
Definition: program_wrapper.hpp:38
An interface to the different caches.
Definition: cache.hpp:34
virtual std::map< std::string, expected_file_t > get_build_files()
Get the paths to the files that are to be generated by the command.
Definition: program_wrapper.cpp:259
virtual bool can_handle_command()=0
Check if this class implements a wrapper for the given command.
virtual std::string get_program_id()
Get a string that uniquely identifies the program.
Definition: program_wrapper.cpp:265
virtual std::map< std::string, std::string > get_relevant_env_vars()
Get relevant environment variables for hashing.
Definition: program_wrapper.cpp:277
virtual void resolve_args()
Resolve arguments on the command line.
Definition: program_wrapper.cpp:249
A helper class for managing wrapper capabilities.
Definition: program_wrapper.hpp:53
virtual sys::run_result_t run_for_miss()
Run the actual command (when there is a cache miss).
Definition: program_wrapper.cpp:300
capabilities_t m_active_capabilities
Active capabilities.
Definition: program_wrapper.hpp:174