Go to the documentation of this file.
39 #include "tce_config.h"
94 for (
unsigned int i = 0; i < searchPaths.size(); i++) {
98 filePath = searchPaths[i];
116 const std::string& baseName,
119 string behFile = baseName +
".cc";
142 const std::string& baseName,
143 const std::string& behaviorFile,
144 const std::string& path,
145 std::vector<std::string>& output) {
150 +
" " + CONFIGURE_CPPFLAGS +
" ";
152 +
" " + CONFIGURE_LDFLAGS +
" ";
165 string srcOpsetDir = TCE_SRC_ROOT +
DS +
"opset" +
DS +
"base";
166 if (cwd == srcOpsetDir) {
184 string COMPILE_FLAGS = \
186 CONFIGURE_CPPFLAGS +
" " + CONFIGURE_LDFLAGS +
" " +
187 CXXFLAGS +
" " + CPPFLAGS +
" ";
192 string command = (CXXCOMPILER ==
"") ? (
string(CXX)) : (CXXCOMPILER);
193 command +=
" " + COMPILE_FLAGS +
" " +
behaviorFile +
" " +
194 string(SHARED_CXX_FLAGS) +
" " + LDFLAGS +
" -o " + module +
" 2>&1";
225 const std::string& sourcePath,
226 const std::string& xmlFile,
227 const std::string& destinationPath) {
229 const string source =
271 cerr <<
"Invalid XML file: " << s.
errorMessage() << endl;
285 string includes =
"";
286 for (
size_t i = 0; i < paths.size(); i++) {
287 includes +=
"-I" + paths.at(i) +
" ";
static bool removeFileOrDirectory(const std::string &path)
static bool createDirectory(const std::string &path)
static int runShellCommandAndGetOutput(const std::string &command, std::vector< std::string > &outputLines, std::size_t maxOutputLines=DEFAULT_MAX_OUTPUT_LINES, bool includeStdErr=false)
static const int VERBOSE_LEVEL_DEFAULT
Default verbose level - do not print anything unnecessary.
std::string xmlFilePath(const std::string &xmlFile)
static int verboseLevel()
static std::ostream & logStream()
virtual ~OperationBuilder()
#define assert(condition)
std::string behaviorFile(const std::string &baseName, std::string &path)
static std::vector< std::string > opsetIncludeDir()
static std::vector< std::string > includeDirPaths()
virtual ObjectState * readState()
static void copy(const std::string &source, const std::string &target)
std::string makeIncludeString(const std::vector< std::string > &paths)
void setSourceFile(const std::string &filename)
static std::vector< std::string > osalPaths()
std::string errorMessage() const
static const std::string DIRECTORY_SEPARATOR
static bool isInstalled()
bool buildObject(const std::string &baseName, const std::string &behaviorFile, const std::string &path, std::vector< std::string > &output)
const string SCHEMA_FILE_NAME
bool verifyXML(const std::string file)
static bool fileExists(const std::string fileName)
static std::string installationDir()
static std::string currentWorkingDir()
static bool developerMode()
static std::string environmentVariable(const std::string &variable)
static bool fileIsReadable(const std::string fileName)
bool installDataFile(const std::string &path, const std::string &xmlFile, const std::string &destination)
static OperationBuilder * instance_
Static unique instance.
static OperationBuilder & instance()