summaryrefslogtreecommitdiffstats
path: root/Source/cmFLTKWrapUICommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2007-06-18 15:59:23 (GMT)
committerBrad King <brad.king@kitware.com>2007-06-18 15:59:23 (GMT)
commit35936433e11728397dcdb2beab615674bfa79ec7 (patch)
tree8222a4daea955055c852d6db058421a570a8f6b2 /Source/cmFLTKWrapUICommand.cxx
parentef81ac50e5d6e981088c00e822fde538d9da9e37 (diff)
downloadCMake-35936433e11728397dcdb2beab615674bfa79ec7.zip
CMake-35936433e11728397dcdb2beab615674bfa79ec7.tar.gz
CMake-35936433e11728397dcdb2beab615674bfa79ec7.tar.bz2
ENH: Merging changes from branch CMake-SourceFile2-b between tags
CMake-SourceFile2-bp and CMake-SourceFile2-b-mp1 to trunk. This commit is surrounded by tags CMake-SourceFile2-b-mp1-pre and CMake-SourceFile2-b-mp1-post on the trunk. The changes re-implement cmSourceFile and the use of it to allow instances to be created much earlier. The use of cmSourceFileLocation allows locating a source file referenced by a user to be much simpler and more robust. The two SetName methods are no longer needed so some duplicate code has been removed. The strange "SourceName" stuff is gone. Code that created cmSourceFile instances on the stack and then sent them to cmMakefile::AddSource has been simplified and converted to getting cmSourceFile instances from cmMakefile. The CPluginAPI has preserved the old API through a compatibility interface. Source lists are gone. Targets now get real instances of cmSourceFile right away instead of storing a list of strings until the final pass. TraceVSDependencies has been re-written to avoid the use of SourceName. It is now called TraceDependencies since it is not just for VS. It is now implemented with a helper object which makes the code simpler.
Diffstat (limited to 'Source/cmFLTKWrapUICommand.cxx')
-rw-r--r--Source/cmFLTKWrapUICommand.cxx21
1 files changed, 9 insertions, 12 deletions
diff --git a/Source/cmFLTKWrapUICommand.cxx b/Source/cmFLTKWrapUICommand.cxx
index 80abd67..43c4494 100644
--- a/Source/cmFLTKWrapUICommand.cxx
+++ b/Source/cmFLTKWrapUICommand.cxx
@@ -53,20 +53,17 @@ bool cmFLTKWrapUICommand::InitialPass(std::vector<std::string> const& args)
// to generate .cxx and .h files
if (!curr || !curr->GetPropertyAsBool("WRAP_EXCLUDE"))
{
- cmSourceFile header_file;
- header_file.SetMakefile(this->Makefile);
- std::string srcName = cmSystemTools::GetFilenameWithoutExtension(*i);
- const bool headerFileOnly = true;
- header_file.SetName(srcName.c_str(),
- outputDirectory.c_str(), "h",headerFileOnly);
+ std::string outName = outputDirectory;
+ outName += "/";
+ outName += cmSystemTools::GetFilenameWithoutExtension(*i);
+ std::string hname = outName;
+ hname += ".h";
std::string origname = cdir + "/" + *i;
- std::string hname = header_file.GetFullPath();
// add starting depends
std::vector<std::string> depends;
depends.push_back(origname);
depends.push_back(fluid_exe);
- std::string cxxres = outputDirectory.c_str();
- cxxres += "/" + srcName;
+ std::string cxxres = outName;
cxxres += ".cxx";
cmCustomCommandLine commandLine;
@@ -123,12 +120,12 @@ void cmFLTKWrapUICommand::FinalPass()
// people should add the srcs to the target themselves, but the old command
// didn't support that, so check and see if they added the files in and if
// they didn;t then print a warning and add then anyhow
- std::vector<std::string> const& srcs =
- this->Makefile->GetTargets()[this->Target].GetSourceLists();
+ std::vector<cmSourceFile*> const& srcs =
+ this->Makefile->GetTargets()[this->Target].GetSourceFiles();
bool found = false;
for (unsigned int i = 0; i < srcs.size(); ++i)
{
- if (srcs[i] ==
+ if (srcs[i]->GetFullPath() ==
this->GeneratedSourcesClasses[0]->GetFullPath())
{
found = true;