summaryrefslogtreecommitdiffstats
path: root/Source/cmFLTKWrapUICommand.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2002-06-27 19:57:09 (GMT)
committerKen Martin <ken.martin@kitware.com>2002-06-27 19:57:09 (GMT)
commit44a7cd55ff126412d8ba8b82739a1bee132c62a1 (patch)
tree533de5563331136062407c254c05024bb5b91632 /Source/cmFLTKWrapUICommand.cxx
parenta1a05a5fbcd0d34aa5ab0dde7da2ba4c5082916a (diff)
downloadCMake-44a7cd55ff126412d8ba8b82739a1bee132c62a1.zip
CMake-44a7cd55ff126412d8ba8b82739a1bee132c62a1.tar.gz
CMake-44a7cd55ff126412d8ba8b82739a1bee132c62a1.tar.bz2
removed all source lists from the system and made them vectors. Also appended _CMAKE_PATH to the end of the automatic cache entries for executables and libraries. Odds of all these changes working are slim but cmake builds and passes all its tests. VTK40 starts building
Diffstat (limited to 'Source/cmFLTKWrapUICommand.cxx')
-rw-r--r--Source/cmFLTKWrapUICommand.cxx29
1 files changed, 11 insertions, 18 deletions
diff --git a/Source/cmFLTKWrapUICommand.cxx b/Source/cmFLTKWrapUICommand.cxx
index 3ac91ec..ec6f7cf 100644
--- a/Source/cmFLTKWrapUICommand.cxx
+++ b/Source/cmFLTKWrapUICommand.cxx
@@ -48,39 +48,33 @@ bool cmFLTKWrapUICommand::InitialPass(std::vector<std::string> const& args)
m_Target = args[0]; // Target that will use the generated files
m_GUISourceList = args[1]; // Source List of the GUI source files
- cmMakefile::SourceMap &GUISources = m_Makefile->GetSources();
-
+ std::vector<std::string> newArgs;
+ m_Makefile->ExpandSourceListArguments(args,newArgs, 1);
+
// get the list of GUI files from which .cxx and .h will be generated
- cmMakefile::SourceMap::iterator l = GUISources.find( m_GUISourceList );
- if (l == GUISources.end())
- {
- this->SetError("bad source list passed to FLTKWrapUICommand");
- return false;
- }
-
std::string outputDirectory = m_Makefile->GetCurrentOutputDirectory();
// Some of the generated files are *.h so the directory "GUI"
// where they are created have to be added to the include path
m_Makefile->AddIncludeDirectory( outputDirectory.c_str() );
- for(std::vector<cmSourceFile*>::iterator i = l->second.begin();
- i != l->second.end(); i++)
+ for(std::vector<std::string>::iterator i = (newArgs.begin() + 1);
+ i != newArgs.end(); i++)
{
- cmSourceFile &curr = *(*i);
+ cmSourceFile *curr = m_Makefile->GetSource(i->c_str());
// if we should use the source GUI
// to generate .cxx and .h files
- if (!curr.GetWrapExclude())
+ if (!curr || !curr->GetWrapExclude())
{
cmSourceFile header_file;
cmSourceFile source_file;
+ std::string srcName = cmSystemTools::GetFilenameWithoutExtension(*i);
const bool headerFileOnly = true;
- header_file.SetName(curr.GetSourceName().c_str(),
+ header_file.SetName(srcName.c_str(),
outputDirectory.c_str(), "h",headerFileOnly);
- source_file.SetName(curr.GetSourceName().c_str(),
+ source_file.SetName(srcName.c_str(),
outputDirectory.c_str(), "cxx",!headerFileOnly);
- std::string origname = cdir + "/" + curr.GetSourceName() + "." +
- curr.GetSourceExtension();
+ std::string origname = cdir + "/" + *i;
std::string hname = header_file.GetFullPath();
std::string cxxname = source_file.GetFullPath();
m_WrapUserInterface.push_back(origname);
@@ -90,7 +84,6 @@ bool cmFLTKWrapUICommand::InitialPass(std::vector<std::string> const& args)
header_file.GetDepends().push_back(origname);
m_GeneratedHeadersClasses.push_back(header_file);
m_GeneratedSourcesClasses.push_back(source_file);
-
}
}