summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Source/cmCableWrapTclCommand.cxx24
1 files changed, 14 insertions, 10 deletions
diff --git a/Source/cmCableWrapTclCommand.cxx b/Source/cmCableWrapTclCommand.cxx
index 5e112d299b..d7527da5bf 100644
--- a/Source/cmCableWrapTclCommand.cxx
+++ b/Source/cmCableWrapTclCommand.cxx
@@ -111,7 +111,9 @@ void cmCableWrapTclCommand::GenerateCableFiles() const
cmSystemTools::MakeDirectory((outDir+"/Tcl").c_str());
std::string packageConfigName = outDir+"/Tcl/"+m_TargetName+"_config.xml";
- std::string packageTclName = outDir+"/Tcl/"+m_TargetName+"_tcl";
+ std::string packageTclFileName = m_TargetName+"_tcl";
+ std::string packageTclPath = outDir+"/Tcl";
+ std::string packageTclFullName = packageTclPath+"/"+packageTclFileName;
// Generate the main package configuration file for CABLE.
cmGeneratedFileStream packageConfig(packageConfigName.c_str());
@@ -141,12 +143,12 @@ void cmCableWrapTclCommand::GenerateCableFiles() const
std::vector<std::string> depends;
depends.push_back(command);
command = cmSystemTools::EscapeSpaces(command.c_str());
- command += " "+packageConfigName+" -tcl "+packageTclName+".cxx";
+ command += " "+packageConfigName+" -tcl "+packageTclFullName+".cxx";
depends.push_back(packageConfigName);
std::vector<std::string> outputs;
- outputs.push_back(packageTclName+".cxx");
+ outputs.push_back(packageTclFullName+".cxx");
m_Makefile->AddCustomCommand(packageConfigName.c_str(),
command.c_str(),
@@ -156,7 +158,7 @@ void cmCableWrapTclCommand::GenerateCableFiles() const
// Add the generated source to the package's source list.
cmSourceFile file;
- file.SetName(packageTclName.c_str(), outDir.c_str(), "cxx", false);
+ file.SetName(packageTclFileName.c_str(), packageTclPath.c_str(), "cxx", false);
// Set dependency hints.
file.GetDepends().push_back("wrapCalls.h");
m_Makefile->AddSource(file, m_TargetName.c_str());
@@ -184,9 +186,11 @@ void cmCableWrapTclCommand::GenerateCableClassFiles(const char* name,
std::string className = name;
std::string groupName = m_TargetName+"_"+indexStr;
std::string classConfigName = outDir+"/Tcl/"+groupName+"_config_tcl.xml";
- std::string classCxxName = outDir+"/Tcl/"+groupName+"_cxx.cxx";
+ std::string classCxxName = outDir+"/Tcl/"+groupName+"_cxx.cc";
std::string classXmlName = outDir+"/Tcl/"+groupName+"_cxx.xml";
- std::string classTclName = outDir+"/Tcl/"+groupName+"_tcl";
+ std::string classTclFileName = groupName+"_tcl";
+ std::string classTclPath = outDir+"/Tcl";
+ std::string classTclFullName = classTclPath+"/"+classTclFileName;
cmGeneratedFileStream classConfig(classConfigName.c_str());
if(classConfig)
@@ -270,7 +274,7 @@ void cmCableWrapTclCommand::GenerateCableClassFiles(const char* name,
includeFlags += cmSystemTools::EscapeSpaces(i->c_str());
}
- command += " "+defineFlags+" "+includeFlags+" -fsyntax-only -fxml="+classXmlName+" "+classCxxName;
+ command += " "+defineFlags+" "+includeFlags+" -fsyntax-only \"-fxml="+classXmlName+"\" "+classCxxName;
std::vector<std::string> outputs;
outputs.push_back(classXmlName);
@@ -288,13 +292,13 @@ void cmCableWrapTclCommand::GenerateCableClassFiles(const char* name,
std::vector<std::string> depends;
depends.push_back(command);
command = cmSystemTools::EscapeSpaces(command.c_str());
- command += " "+classConfigName+" -tcl "+classTclName+".cxx";
+ command += " "+classConfigName+" -tcl "+classTclFullName+".cxx";
depends.push_back(classConfigName);
depends.push_back(classXmlName);
std::vector<std::string> outputs;
- outputs.push_back(classTclName+".cxx");
+ outputs.push_back(classTclFullName+".cxx");
m_Makefile->AddCustomCommand(classConfigName.c_str(),
command.c_str(),
@@ -304,7 +308,7 @@ void cmCableWrapTclCommand::GenerateCableClassFiles(const char* name,
// Add the generated source to the package's source list.
cmSourceFile file;
- file.SetName(classTclName.c_str(), outDir.c_str(), "cxx", false);
+ file.SetName(classTclFileName.c_str(), classTclPath.c_str(), "cxx", false);
// Set dependency hints.
for(cmCableClass::Sources::const_iterator source = c.SourcesBegin();
source != c.SourcesEnd(); ++source)