various windows fixes
This commit is contained in:
parent
5acb894e58
commit
0fe42a9857
|
@ -213,8 +213,11 @@ void cmCableWrapTclCommand::GenerateCableFiles() const
|
||||||
m_Makefile->ExpandVariablesInString(command);
|
m_Makefile->ExpandVariablesInString(command);
|
||||||
std::vector<std::string> depends;
|
std::vector<std::string> depends;
|
||||||
depends.push_back(command);
|
depends.push_back(command);
|
||||||
std::string commandArgs = " "+packageConfigName+
|
std::vector<std::string> commandArgs;
|
||||||
" -tcl "+packageTclFullName+".cxx";
|
commandArgs.push_back(packageConfigName);
|
||||||
|
commandArgs.push_back("-tcl");
|
||||||
|
std::string tmp = packageTclFullName+".cxx";
|
||||||
|
commandArgs.push_back(tmp);
|
||||||
|
|
||||||
depends.push_back(packageConfigName);
|
depends.push_back(packageConfigName);
|
||||||
|
|
||||||
|
@ -223,7 +226,7 @@ void cmCableWrapTclCommand::GenerateCableFiles() const
|
||||||
|
|
||||||
m_Makefile->AddCustomCommand(packageConfigName.c_str(),
|
m_Makefile->AddCustomCommand(packageConfigName.c_str(),
|
||||||
command.c_str(),
|
command.c_str(),
|
||||||
commandArgs.c_str(),
|
commandArgs,
|
||||||
depends,
|
depends,
|
||||||
outputs, m_TargetName.c_str());
|
outputs, m_TargetName.c_str());
|
||||||
|
|
||||||
|
@ -341,30 +344,31 @@ void cmCableWrapTclCommand::GenerateCableClassFiles(const char* name,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string commandArgs = this->GetGccXmlFlagsFromCache();
|
std::vector<std::string> commandArgs;
|
||||||
commandArgs += " ";
|
commandArgs.push_back(this->GetGccXmlFlagsFromCache());
|
||||||
commandArgs += m_Makefile->GetDefineFlags();
|
commandArgs.push_back(m_Makefile->GetDefineFlags());
|
||||||
commandArgs += " -I\"";
|
commandArgs.push_back("-I");
|
||||||
commandArgs += m_Makefile->GetStartDirectory();
|
commandArgs.push_back(m_Makefile->GetStartDirectory());
|
||||||
commandArgs += "\"";
|
|
||||||
|
|
||||||
const std::vector<std::string>& includes =
|
const std::vector<std::string>& includes =
|
||||||
m_Makefile->GetIncludeDirectories();
|
m_Makefile->GetIncludeDirectories();
|
||||||
for(std::vector<std::string>::const_iterator i = includes.begin();
|
for(std::vector<std::string>::const_iterator i = includes.begin();
|
||||||
i != includes.end(); ++i)
|
i != includes.end(); ++i)
|
||||||
{
|
{
|
||||||
commandArgs += " -I";
|
commandArgs.push_back("-I");
|
||||||
commandArgs += cmSystemTools::EscapeSpaces(i->c_str());
|
commandArgs.push_back(cmSystemTools::EscapeSpaces(i->c_str()));
|
||||||
}
|
}
|
||||||
|
std::string tmp = "-fxml=";
|
||||||
commandArgs += " -fxml="+classXmlName+" "+classCxxName;
|
tmp += classXmlName;
|
||||||
|
commandArgs.push_back(tmp);
|
||||||
|
commandArgs.push_back(classCxxName);
|
||||||
|
|
||||||
std::vector<std::string> outputs;
|
std::vector<std::string> outputs;
|
||||||
outputs.push_back(classXmlName);
|
outputs.push_back(classXmlName);
|
||||||
|
|
||||||
m_Makefile->AddCustomCommand(classCxxName.c_str(),
|
m_Makefile->AddCustomCommand(classCxxName.c_str(),
|
||||||
command.c_str(),
|
command.c_str(),
|
||||||
commandArgs.c_str(),
|
commandArgs,
|
||||||
depends,
|
depends,
|
||||||
outputs, m_TargetName.c_str());
|
outputs, m_TargetName.c_str());
|
||||||
}
|
}
|
||||||
|
@ -374,7 +378,11 @@ void cmCableWrapTclCommand::GenerateCableClassFiles(const char* name,
|
||||||
std::string command = this->GetCableFromCache();
|
std::string command = this->GetCableFromCache();
|
||||||
std::vector<std::string> depends;
|
std::vector<std::string> depends;
|
||||||
depends.push_back(command);
|
depends.push_back(command);
|
||||||
std::string commandArgs = " "+classConfigName+" -tcl "+classTclFullName+".cxx";
|
std::vector<std::string > commandArgs;
|
||||||
|
commandArgs.push_back(classConfigName);
|
||||||
|
commandArgs.push_back("-tcl");
|
||||||
|
std::string tmp = classTclFullName+".cxx";
|
||||||
|
commandArgs.push_back(tmp);
|
||||||
|
|
||||||
depends.push_back(classConfigName);
|
depends.push_back(classConfigName);
|
||||||
depends.push_back(classXmlName);
|
depends.push_back(classXmlName);
|
||||||
|
@ -384,8 +392,7 @@ void cmCableWrapTclCommand::GenerateCableClassFiles(const char* name,
|
||||||
|
|
||||||
m_Makefile->AddCustomCommand(classConfigName.c_str(),
|
m_Makefile->AddCustomCommand(classConfigName.c_str(),
|
||||||
command.c_str(),
|
command.c_str(),
|
||||||
commandArgs.c_str(),
|
commandArgs, depends,
|
||||||
depends,
|
|
||||||
outputs, m_TargetName.c_str());
|
outputs, m_TargetName.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -266,6 +266,7 @@ void cmDSPWriter::WriteDSPFile(std::ostream& fout,
|
||||||
totalCommandStr += "\n\t";
|
totalCommandStr += "\n\t";
|
||||||
temp= c->second.m_Command;
|
temp= c->second.m_Command;
|
||||||
cmSystemTools::ConvertToWindowsSlashes(temp);
|
cmSystemTools::ConvertToWindowsSlashes(temp);
|
||||||
|
temp = cmSystemTools::EscapeSpaces(temp.c_str());
|
||||||
totalCommandStr += temp;
|
totalCommandStr += temp;
|
||||||
totalCommandStr += " ";
|
totalCommandStr += " ";
|
||||||
totalCommandStr += c->second.m_Arguments;
|
totalCommandStr += c->second.m_Arguments;
|
||||||
|
|
|
@ -461,7 +461,7 @@ void cmMakefile::RemoveSource(cmSourceFile& cmfile,const char *srclist)
|
||||||
|
|
||||||
void cmMakefile::AddCustomCommand(const char* source,
|
void cmMakefile::AddCustomCommand(const char* source,
|
||||||
const char* command,
|
const char* command,
|
||||||
const char* commandArgs,
|
const std::vector<std::string>& commandArgs,
|
||||||
const std::vector<std::string>& depends,
|
const std::vector<std::string>& depends,
|
||||||
const std::vector<std::string>& outputs,
|
const std::vector<std::string>& outputs,
|
||||||
const char *target)
|
const char *target)
|
||||||
|
@ -470,7 +470,17 @@ void cmMakefile::AddCustomCommand(const char* source,
|
||||||
if (m_Targets.find(target) != m_Targets.end())
|
if (m_Targets.find(target) != m_Targets.end())
|
||||||
{
|
{
|
||||||
std::string c = cmSystemTools::EscapeSpaces(command);
|
std::string c = cmSystemTools::EscapeSpaces(command);
|
||||||
cmCustomCommand cc(source,c.c_str(),commandArgs,depends,outputs);
|
|
||||||
|
std::string combinedArgs;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < commandArgs.size(); ++i)
|
||||||
|
{
|
||||||
|
combinedArgs += cmSystemTools::EscapeSpaces(commandArgs[i].c_str());
|
||||||
|
combinedArgs += " ";
|
||||||
|
}
|
||||||
|
|
||||||
|
cmCustomCommand cc(source,c.c_str(),combinedArgs.c_str(),depends,outputs);
|
||||||
m_Targets[target].GetCustomCommands().push_back(cc);
|
m_Targets[target].GetCustomCommands().push_back(cc);
|
||||||
std::string cacheCommand = command;
|
std::string cacheCommand = command;
|
||||||
this->ExpandVariablesInString(cacheCommand);
|
this->ExpandVariablesInString(cacheCommand);
|
||||||
|
@ -484,7 +494,7 @@ void cmMakefile::AddCustomCommand(const char* source,
|
||||||
|
|
||||||
void cmMakefile::AddCustomCommand(const char* source,
|
void cmMakefile::AddCustomCommand(const char* source,
|
||||||
const char* command,
|
const char* command,
|
||||||
const char* commandArgs,
|
const std::vector<std::string>& commandArgs,
|
||||||
const std::vector<std::string>& depends,
|
const std::vector<std::string>& depends,
|
||||||
const char* output,
|
const char* output,
|
||||||
const char *target)
|
const char *target)
|
||||||
|
|
|
@ -136,14 +136,14 @@ public:
|
||||||
*/
|
*/
|
||||||
void AddCustomCommand(const char* source,
|
void AddCustomCommand(const char* source,
|
||||||
const char* command,
|
const char* command,
|
||||||
const char* commandArgs,
|
const std::vector<std::string>& commandArgs,
|
||||||
const std::vector<std::string>& depends,
|
const std::vector<std::string>& depends,
|
||||||
const std::vector<std::string>& outputs,
|
const std::vector<std::string>& outputs,
|
||||||
const char *target);
|
const char *target);
|
||||||
|
|
||||||
void AddCustomCommand(const char* source,
|
void AddCustomCommand(const char* source,
|
||||||
const char* command,
|
const char* command,
|
||||||
const char* commandArgs,
|
const std::vector<std::string>& commandArgs,
|
||||||
const std::vector<std::string>& depends,
|
const std::vector<std::string>& depends,
|
||||||
const char* output,
|
const char* output,
|
||||||
const char* target);
|
const char* target);
|
||||||
|
|
|
@ -341,9 +341,16 @@ std::string cmSystemTools::EscapeSpaces(const char* str)
|
||||||
#if defined(_WIN32) && !defined(__CYGWIN__)
|
#if defined(_WIN32) && !defined(__CYGWIN__)
|
||||||
std::string result;
|
std::string result;
|
||||||
|
|
||||||
|
// if there are spaces
|
||||||
|
std::string temp = str;
|
||||||
|
if (temp.find(" ") != std::string::npos)
|
||||||
|
{
|
||||||
result = "\"";
|
result = "\"";
|
||||||
result += cmSystemTools::HandleNetworkPaths(str);
|
result += cmSystemTools::HandleNetworkPaths(str);
|
||||||
return result+"\"";
|
return result+"\"";
|
||||||
|
}
|
||||||
|
return cmSystemTools::HandleNetworkPaths(str);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
std::string result = "";
|
std::string result = "";
|
||||||
for(const char* ch = str; *ch != '\0'; ++ch)
|
for(const char* ch = str; *ch != '\0'; ++ch)
|
||||||
|
|
|
@ -112,9 +112,13 @@ void cmVTKWrapJavaCommand::FinalPass()
|
||||||
std::string hints = "${VTK_WRAP_HINTS}";
|
std::string hints = "${VTK_WRAP_HINTS}";
|
||||||
std::string resultDirectory = "${VTK_JAVA_HOME}";
|
std::string resultDirectory = "${VTK_JAVA_HOME}";
|
||||||
|
|
||||||
|
m_Makefile->ExpandVariablesInString(hints);
|
||||||
|
|
||||||
// wrap all the .h files
|
// wrap all the .h files
|
||||||
depends.push_back(wjava);
|
depends.push_back(wjava);
|
||||||
|
depends.push_back(hints);
|
||||||
depends2.push_back(pjava);
|
depends2.push_back(pjava);
|
||||||
|
depends2.push_back(hints);
|
||||||
for(int classNum = 0; classNum < lastClass; classNum++)
|
for(int classNum = 0; classNum < lastClass; classNum++)
|
||||||
{
|
{
|
||||||
m_Makefile->AddSource(m_WrapClasses[classNum],m_SourceList.c_str());
|
m_Makefile->AddSource(m_WrapClasses[classNum],m_SourceList.c_str());
|
||||||
|
@ -124,16 +128,26 @@ void cmVTKWrapJavaCommand::FinalPass()
|
||||||
std::string res2 = resultDirectory + "/" +
|
std::string res2 = resultDirectory + "/" +
|
||||||
m_OriginalNames[classNum] + ".java";
|
m_OriginalNames[classNum] + ".java";
|
||||||
|
|
||||||
std::string cmd = " " + m_WrapHeaders[classNum] + " "
|
std::vector<std::string> args;
|
||||||
+ hints + (m_WrapClasses[classNum].IsAnAbstractClass() ? " 0 " : " 1 ") + " > " + m_WrapClasses[classNum].GetSourceName() + ".cxx";
|
args.push_back(m_WrapHeaders[classNum]);
|
||||||
|
args.push_back(hints);
|
||||||
|
args.push_back((m_WrapClasses[classNum].IsAnAbstractClass() ? "0" : "1"));
|
||||||
|
args.push_back(">");
|
||||||
|
args.push_back(res);
|
||||||
|
|
||||||
m_Makefile->AddCustomCommand(m_WrapHeaders[classNum].c_str(),
|
m_Makefile->AddCustomCommand(m_WrapHeaders[classNum].c_str(),
|
||||||
wjava.c_str(), cmd.c_str(), depends,
|
wjava.c_str(), args, depends,
|
||||||
res.c_str(), m_LibraryName.c_str());
|
res.c_str(), m_LibraryName.c_str());
|
||||||
|
|
||||||
cmd = " " + m_WrapHeaders[classNum] + " "
|
std::vector<std::string> args2;
|
||||||
+ hints + (m_WrapClasses[classNum].IsAnAbstractClass() ? " 0 " : " 1 ") + " > " + res2;
|
args2.push_back(m_WrapHeaders[classNum]);
|
||||||
|
args2.push_back(hints);
|
||||||
|
args2.push_back((m_WrapClasses[classNum].IsAnAbstractClass() ? "0" : "1"));
|
||||||
|
args2.push_back(">");
|
||||||
|
args2.push_back(res2);
|
||||||
|
|
||||||
m_Makefile->AddCustomCommand(m_WrapHeaders[classNum].c_str(),
|
m_Makefile->AddCustomCommand(m_WrapHeaders[classNum].c_str(),
|
||||||
pjava.c_str(), cmd.c_str(), depends2,
|
pjava.c_str(), args2, depends2,
|
||||||
res2.c_str(), m_LibraryName.c_str());
|
res2.c_str(), m_LibraryName.c_str());
|
||||||
alldepends.push_back(res2);
|
alldepends.push_back(res2);
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,6 +107,8 @@ void cmVTKWrapPythonCommand::FinalPass()
|
||||||
std::string wpython = "${VTK_WRAP_PYTHON_EXE}";
|
std::string wpython = "${VTK_WRAP_PYTHON_EXE}";
|
||||||
std::string hints = "${VTK_WRAP_HINTS}";
|
std::string hints = "${VTK_WRAP_HINTS}";
|
||||||
|
|
||||||
|
m_Makefile->ExpandVariablesInString(hints);
|
||||||
|
|
||||||
// Create the init file
|
// Create the init file
|
||||||
std::string res = m_LibraryName;
|
std::string res = m_LibraryName;
|
||||||
res += "Init.cxx";
|
res += "Init.cxx";
|
||||||
|
@ -123,14 +125,19 @@ void cmVTKWrapPythonCommand::FinalPass()
|
||||||
|
|
||||||
// wrap all the .h files
|
// wrap all the .h files
|
||||||
depends.push_back(wpython);
|
depends.push_back(wpython);
|
||||||
|
depends.push_back(hints);
|
||||||
for(int classNum = 0; classNum < lastClass; classNum++)
|
for(int classNum = 0; classNum < lastClass; classNum++)
|
||||||
{
|
{
|
||||||
m_Makefile->AddSource(m_WrapClasses[classNum],m_SourceList.c_str());
|
m_Makefile->AddSource(m_WrapClasses[classNum],m_SourceList.c_str());
|
||||||
std::string res = m_WrapClasses[classNum].GetSourceName() + ".cxx";
|
std::string res = m_WrapClasses[classNum].GetSourceName() + ".cxx";
|
||||||
std::string cmd = m_WrapHeaders[classNum] + " "
|
std::vector<std::string> args;
|
||||||
+ hints + (m_WrapClasses[classNum].IsAnAbstractClass() ? " 0 " : " 1 ") + " > " + m_WrapClasses[classNum].GetSourceName() + ".cxx";
|
args.push_back(m_WrapHeaders[classNum]);
|
||||||
|
args.push_back(hints);
|
||||||
|
args.push_back((m_WrapClasses[classNum].IsAnAbstractClass() ? "0" : "1"));
|
||||||
|
args.push_back(">");
|
||||||
|
args.push_back(res);
|
||||||
m_Makefile->AddCustomCommand(m_WrapHeaders[classNum].c_str(),
|
m_Makefile->AddCustomCommand(m_WrapHeaders[classNum].c_str(),
|
||||||
wpython.c_str(), cmd.c_str(), depends,
|
wpython.c_str(), args, depends,
|
||||||
res.c_str(), m_LibraryName.c_str());
|
res.c_str(), m_LibraryName.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -139,6 +139,8 @@ void cmVTKWrapTclCommand::FinalPass()
|
||||||
std::string wtcl = "${VTK_WRAP_TCL_EXE}";
|
std::string wtcl = "${VTK_WRAP_TCL_EXE}";
|
||||||
std::string hints = "${VTK_WRAP_HINTS}";
|
std::string hints = "${VTK_WRAP_HINTS}";
|
||||||
|
|
||||||
|
m_Makefile->ExpandVariablesInString(hints);
|
||||||
|
|
||||||
// Create the init file
|
// Create the init file
|
||||||
std::string res = m_LibraryName;
|
std::string res = m_LibraryName;
|
||||||
res += "Init.cxx";
|
res += "Init.cxx";
|
||||||
|
@ -155,14 +157,23 @@ void cmVTKWrapTclCommand::FinalPass()
|
||||||
|
|
||||||
// wrap all the .h files
|
// wrap all the .h files
|
||||||
depends.push_back(wtcl);
|
depends.push_back(wtcl);
|
||||||
|
depends.push_back(hints);
|
||||||
for(int classNum = 0; classNum < lastClass; classNum++)
|
for(int classNum = 0; classNum < lastClass; classNum++)
|
||||||
{
|
{
|
||||||
m_Makefile->AddSource(m_WrapClasses[classNum],m_SourceList.c_str());
|
m_Makefile->AddSource(m_WrapClasses[classNum],m_SourceList.c_str());
|
||||||
std::string res = m_WrapClasses[classNum].GetSourceName() + ".cxx";
|
std::string res = m_WrapClasses[classNum].GetSourceName() + ".cxx";
|
||||||
std::string cmd = m_WrapHeaders[classNum] + " "
|
std::vector<std::string> args;
|
||||||
+ hints + (m_WrapClasses[classNum].IsAnAbstractClass() ? " 0 " : " 1 ") + " > " + m_WrapClasses[classNum].GetSourceName() + ".cxx";
|
args.push_back(m_WrapHeaders[classNum]);
|
||||||
|
args.push_back(hints);
|
||||||
|
args.push_back((m_WrapClasses[classNum].IsAnAbstractClass() ? "0" : "1"));
|
||||||
|
args.push_back(">");
|
||||||
|
std::string tmp = m_Makefile->GetCurrentOutputDirectory();
|
||||||
|
tmp += "/";
|
||||||
|
tmp += m_WrapClasses[classNum].GetSourceName() + ".cxx";
|
||||||
|
args.push_back(tmp);
|
||||||
|
|
||||||
m_Makefile->AddCustomCommand(m_WrapHeaders[classNum].c_str(),
|
m_Makefile->AddCustomCommand(m_WrapHeaders[classNum].c_str(),
|
||||||
wtcl.c_str(), cmd.c_str(), depends,
|
wtcl.c_str(), args, depends,
|
||||||
res.c_str(), m_LibraryName.c_str());
|
res.c_str(), m_LibraryName.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue