summaryrefslogtreecommitdiffstats
path: root/Source/cmVTKWrapJavaCommand.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2002-06-30 00:04:28 (GMT)
committerKen Martin <ken.martin@kitware.com>2002-06-30 00:04:28 (GMT)
commit0b88e57e547907701e38ee21f403ce45effff881 (patch)
tree5146b2a806791b12971cc9fb69a961d6a815ef7b /Source/cmVTKWrapJavaCommand.cxx
parent3cfca938da80f3cee7b962c94e54ddbd32316c52 (diff)
downloadCMake-0b88e57e547907701e38ee21f403ce45effff881.zip
CMake-0b88e57e547907701e38ee21f403ce45effff881.tar.gz
CMake-0b88e57e547907701e38ee21f403ce45effff881.tar.bz2
fixed commands that were setting definitions in final pass to set definitions in initial pass
Diffstat (limited to 'Source/cmVTKWrapJavaCommand.cxx')
-rw-r--r--Source/cmVTKWrapJavaCommand.cxx27
1 files changed, 13 insertions, 14 deletions
diff --git a/Source/cmVTKWrapJavaCommand.cxx b/Source/cmVTKWrapJavaCommand.cxx
index 787fb3b..29e943e 100644
--- a/Source/cmVTKWrapJavaCommand.cxx
+++ b/Source/cmVTKWrapJavaCommand.cxx
@@ -40,6 +40,13 @@ bool cmVTKWrapJavaCommand::InitialPass(std::vector<std::string> const& argsIn)
// keep the library name
m_LibraryName = args[0];
m_SourceList = args[1];
+ std::string sourceListValue;
+ // was the list already populated
+ const char *def = m_Makefile->GetDefinition(m_SourceList.c_str());
+ if (def)
+ {
+ sourceListValue = def;
+ }
// get the list of classes for this library
for(std::vector<std::string>::const_iterator j = (args.begin() + 2);
@@ -65,9 +72,15 @@ bool cmVTKWrapJavaCommand::InitialPass(std::vector<std::string> const& argsIn)
file.GetDepends().push_back(hname);
m_WrapClasses.push_back(file);
m_OriginalNames.push_back(srcName);
+ if (sourceListValue.size() > 0)
+ {
+ sourceListValue += ";";
+ }
+ sourceListValue += newName + ".cxx";
}
}
+ m_Makefile->AddDefinition(m_SourceList.c_str(), sourceListValue.c_str());
return true;
}
@@ -83,17 +96,9 @@ void cmVTKWrapJavaCommand::FinalPass()
std::string pjava = "${VTK_PARSE_JAVA_EXE}";
std::string hints = "${VTK_WRAP_HINTS}";
std::string resultDirectory = "${VTK_JAVA_HOME}";
- std::string sourceListValue;
m_Makefile->ExpandVariablesInString(hints);
- // was the list already populated
- const char *def = m_Makefile->GetDefinition(m_SourceList.c_str());
- if (def)
- {
- sourceListValue = def;
- }
-
// wrap all the .h files
depends.push_back(wjava);
depends2.push_back(pjava);
@@ -105,11 +110,6 @@ void cmVTKWrapJavaCommand::FinalPass()
for(size_t classNum = 0; classNum < lastClass; classNum++)
{
m_Makefile->AddSource(m_WrapClasses[classNum]);
- if (sourceListValue.size() > 0)
- {
- sourceListValue += ";";
- }
- sourceListValue += m_WrapClasses[classNum].GetSourceName() + ".cxx";
// wrap java
std::string res = m_Makefile->GetCurrentOutputDirectory();
@@ -153,7 +153,6 @@ void cmVTKWrapJavaCommand::FinalPass()
alldepends,
empty);
- m_Makefile->AddDefinition(m_SourceList.c_str(), sourceListValue.c_str());
}