1#ifndef COMPILER_STRATEGY_H
2#define COMPILER_STRATEGY_H
85 virtual void compile_run(
const std::string& sourceFile,
const std::string& outputBinary) = 0;
96 virtual void compile(
const std::string& sourceFile,
const std::string& outputBinary) = 0;
bool executeCommand(const std::string &command)
Executes a shell command and captures its output.
Abstract base class for compilation and run strategies.
virtual ~CompilerStrategy()=default
Virtual destructor.
virtual bool check_if_compile(const std::string &outputBinary)
Checks whether a compiled binary already exists and is non-empty.
virtual void compile(const std::string &sourceFile, const std::string &outputBinary)=0
Compiles the given source file into an output binary.
std::string model
Model name.
std::string wilson
Wilson basis / label name.
CompilerStrategy(std::string model, std::string wilson)
Constructs a CompilerStrategy with a given model and Wilson label.
virtual void compile_run(const std::string &sourceFile, const std::string &outputBinary)=0
Compiles (if needed) and then runs the resulting binary.