[cmake-commits] king committed cmLocalVisualStudio7Generator.cxx
1.176 1.177 cmMakefileExecutableTargetGenerator.cxx 1.28 1.29
cmMakefileLibraryTargetGenerator.cxx 1.33 1.34
cmMakefileTargetGenerator.cxx 1.57 1.58 cmTarget.cxx 1.126
1.127 cmTarget.h 1.74 1.75
cmake-commits at cmake.org
cmake-commits at cmake.org
Thu Mar 8 15:33:21 EST 2007
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv6388
Modified Files:
cmLocalVisualStudio7Generator.cxx
cmMakefileExecutableTargetGenerator.cxx
cmMakefileLibraryTargetGenerator.cxx
cmMakefileTargetGenerator.cxx cmTarget.cxx cmTarget.h
Log Message:
ENH: Combined cmTarget::GetDirectory and cmTarget::GetOutputDir since they are nearly the same. This is another step for bug#2240.
Index: cmLocalVisualStudio7Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalVisualStudio7Generator.cxx,v
retrieving revision 1.176
retrieving revision 1.177
diff -u -d -r1.176 -r1.177
--- cmLocalVisualStudio7Generator.cxx 8 Mar 2007 19:57:28 -0000 1.176
+++ cmLocalVisualStudio7Generator.cxx 8 Mar 2007 20:33:18 -0000 1.177
@@ -605,7 +605,7 @@
target.GetType() == cmTarget::MODULE_LIBRARY))
{
fout << "\t\t\t\tProgramDataBaseFileName=\""
- << target.GetOutputDir() << "/$(OutDir)/"
+ << target.GetDirectory() << "/$(OutDir)/"
<< target.GetPDBName(configName) << "\"\n";
}
fout << "/>\n"; // end of <Tool Name=VCCLCompilerTool
@@ -728,7 +728,7 @@
case cmTarget::STATIC_LIBRARY:
{
std::string targetNameFull = target.GetFullName(configName);
- std::string libpath = target.GetOutputDir();
+ std::string libpath = target.GetDirectory();
libpath += "/$(OutDir)/";
libpath += targetNameFull;
fout << "\t\t\t<Tool\n"
@@ -795,7 +795,7 @@
<< " ";
this->OutputLibraries(fout, linkLibs);
fout << "\"\n";
- temp = target.GetOutputDir();
+ temp = target.GetDirectory();
temp += "/";
temp += configName;
temp += "/";
@@ -808,7 +808,7 @@
this->OutputLibraryDirectories(fout, linkDirs);
fout << "\"\n";
this->OutputModuleDefinitionFile(fout, target);
- temp = target.GetOutputDir();
+ temp = target.GetDirectory();
temp += "/$(OutDir)/";
temp += targetNamePDB;
fout << "\t\t\t\tProgramDataBaseFile=\"" <<
@@ -826,7 +826,7 @@
{
fout << "\t\t\t\tStackReserveSize=\"" << stackVal << "\"\n";
}
- temp = target.GetOutputDir();
+ temp = target.GetDirectory();
temp += "/";
temp += configName;
temp += "/";
@@ -875,7 +875,7 @@
<< " ";
this->OutputLibraries(fout, linkLibs);
fout << "\"\n";
- temp = target.GetOutputDir();
+ temp = target.GetDirectory();
temp += "/";
temp += configName;
temp += "/";
@@ -888,7 +888,7 @@
this->OutputLibraryDirectories(fout, linkDirs);
fout << "\"\n";
fout << "\t\t\t\tProgramDataBaseFile=\""
- << target.GetOutputDir() << "\\$(OutDir)\\" << targetNamePDB
+ << target.GetDirectory() << "\\$(OutDir)\\" << targetNamePDB
<< "\"\n";
if(strcmp(configName, "Debug") == 0
|| strcmp(configName, "RelWithDebInfo") == 0)
Index: cmMakefileLibraryTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileLibraryTargetGenerator.cxx,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- cmMakefileLibraryTargetGenerator.cxx 8 Mar 2007 19:57:28 -0000 1.33
+++ cmMakefileLibraryTargetGenerator.cxx 8 Mar 2007 20:33:19 -0000 1.34
@@ -256,7 +256,7 @@
}
else
{
- outpath = this->Target->GetOutputDir();
+ outpath = this->Target->GetDirectory();
outpath += "/";
}
std::string targetFullPath = outpath + targetName;
Index: cmTarget.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTarget.h,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -d -r1.74 -r1.75
--- cmTarget.h 8 Mar 2007 19:57:28 -0000 1.74
+++ cmTarget.h 8 Mar 2007 20:33:19 -0000 1.75
@@ -213,9 +213,6 @@
makefile and the configuration type. */
std::string GetFullPath(const char* config=0, bool implib = false);
- /** Get the full path to the target output directory. */
- const char* GetOutputDir();
-
/** Get the names of the library needed to generate a build rule
that takes into account shared library version numbers. This
should be called only on a library target. */
@@ -342,6 +339,9 @@
// If the variable is not defined use the given default instead.
void SetPropertyDefault(const char* property, const char* default_value);
+ // Get the full path to the target output directory.
+ const char* GetOutputDir();
+
private:
std::string Name;
std::vector<cmCustomCommand> PreBuildCommands;
Index: cmMakefileExecutableTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileExecutableTargetGenerator.cxx,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- cmMakefileExecutableTargetGenerator.cxx 8 Mar 2007 19:57:28 -0000 1.28
+++ cmMakefileExecutableTargetGenerator.cxx 8 Mar 2007 20:33:19 -0000 1.29
@@ -116,7 +116,7 @@
this->LocalGenerator->ConfigurationName.c_str());
// Construct the full path version of the names.
- std::string outpath = this->Target->GetOutputDir();
+ std::string outpath = this->Target->GetDirectory();
outpath += "/";
#ifdef __APPLE__
if(this->Target->GetPropertyAsBool("MACOSX_BUNDLE"))
Index: cmMakefileTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileTargetGenerator.cxx,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -d -r1.57 -r1.58
--- cmMakefileTargetGenerator.cxx 8 Mar 2007 19:57:28 -0000 1.57
+++ cmMakefileTargetGenerator.cxx 8 Mar 2007 20:33:19 -0000 1.58
@@ -471,7 +471,7 @@
this->Target->GetType() == cmTarget::SHARED_LIBRARY ||
this->Target->GetType() == cmTarget::MODULE_LIBRARY)
{
- targetFullPathPDB = this->Target->GetOutputDir();
+ targetFullPathPDB = this->Target->GetDirectory();
targetFullPathPDB += "/";
targetFullPathPDB += this->Target->GetPDBName(configName);
}
Index: cmTarget.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTarget.cxx,v
retrieving revision 1.126
retrieving revision 1.127
diff -u -d -r1.126 -r1.127
--- cmTarget.cxx 8 Mar 2007 20:10:20 -0000 1.126
+++ cmTarget.cxx 8 Mar 2007 20:33:19 -0000 1.127
@@ -1093,14 +1093,18 @@
const char* cmTarget::GetDirectory(const char* config)
{
- this->Directory = this->GetOutputDir();
if(config)
{
+ this->Directory = this->GetOutputDir();
// Add the configuration's subdirectory.
this->Makefile->GetLocalGenerator()->GetGlobalGenerator()->
AppendDirectoryForConfig("/", config, "", this->Directory);
+ return this->Directory.c_str();
+ }
+ else
+ {
+ return this->GetOutputDir();
}
- return this->Directory.c_str();
}
const char* cmTarget::GetLocation(const char* config)
More information about the Cmake-commits
mailing list