Go to the documentation of this file.
44 #include "tce_config.h"
66 desc +=
"\n\tIgnore the case whereby the source file containing the\n";
67 desc +=
"\toperation behavior model code are not found. By default, the\n";
68 desc +=
"\tOSAL Builder aborts if it cannot build the dynamic module.\n";
69 desc +=
"\tThis option may be used in combination with install option\n";
70 desc +=
"\tto install XML data even if operation behavior definitions\n";
71 desc +=
"\tdo not exist.";
76 desc =
"\n\tEnter explicit directory where the behavior definition\n";
77 desc +=
"\tsource file to be used is found.\n";
94 cout <<
"buildopset - Operation behavior module builder "
124 int main(
int argc,
char* argv[]) {
138 if (arguments == 0 || arguments > 1) {
156 string behaviorPath =
options->sourceDir();
157 if (behaviorPath ==
"") {
162 if (!builder.
verifyXML(module +
".opp")) {
169 string behFile = builder.
behaviorFile(moduleName, behaviorPath);
170 if (behFile ==
"" && !
options->ignore()) {
171 string errorMessage =
"Behavior source file '";
173 + moduleName +
".cc" +
"' not found";
174 cerr << errorMessage << endl;
179 vector<string> output;
180 builder.
buildObject(moduleName, behFile, path, output);
181 if (output.size() > 0) {
182 cerr <<
"Error building shared objects:" << endl;
183 for (
size_t i = 0; i < output.size(); i++) {
184 cerr << output[i] << endl;
196 cerr <<
"Exception thrown: " << e.
fileName() <<
": "
virtual void printHelp() const
std::string procedureName() const
virtual int numberOfArguments() const
static void setCmdLineOptions(CmdLineOptions *options_)
virtual bool isFlagOn() const
static std::string fileOfPath(const std::string pathName)
static std::string toString(const T &source)
std::string fileName() const
const string SCHEMA_FILE_NAME
int main(int argc, char *argv[])
std::string behaviorFile(const std::string &baseName, std::string &path)
void addOption(CmdLineOptionParser *opt)
virtual void printVersion() const
static std::string directoryOfPath(const std::string fileName)
virtual ~BuildOpsetOptions()
std::string errorMessage() const
void parse(char *argv[], int argc)
std::string sourceDir() const
static const std::string DIRECTORY_SEPARATOR
static MachInfoCmdLineOptions options
virtual std::string String(int index=0) const
bool buildObject(const std::string &baseName, const std::string &behaviorFile, const std::string &path, std::vector< std::string > &output)
bool verifyXML(const std::string file)
static std::string currentWorkingDir()
CmdLineOptionParser * findOption(std::string name) const
static bool isAbsolutePath(const std::string &pathName)
virtual std::string argument(int index) const
static std::string TCEVersionString()
static OperationBuilder & instance()