[cmake-commits] king committed cmTarget.cxx 1.125 1.126
cmake-commits at cmake.org
cmake-commits at cmake.org
Thu Mar 8 15:10:23 EST 2007
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv30241
Modified Files:
cmTarget.cxx
Log Message:
COMP: Fixed enumeration-not-used warning in switch.
Index: cmTarget.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTarget.cxx,v
retrieving revision 1.125
retrieving revision 1.126
diff -u -d -r1.125 -r1.126
--- cmTarget.cxx 8 Mar 2007 19:57:28 -0000 1.125
+++ cmTarget.cxx 8 Mar 2007 20:10:20 -0000 1.126
@@ -1936,18 +1936,17 @@
if(this->OutputDir.empty())
{
// Lookup the output path for this target type.
- switch(this->GetType())
+ if(this->GetType() == cmTarget::EXECUTABLE)
{
- case cmTarget::STATIC_LIBRARY:
- case cmTarget::MODULE_LIBRARY:
- case cmTarget::SHARED_LIBRARY:
- this->OutputDir =
- this->Makefile->GetSafeDefinition("LIBRARY_OUTPUT_PATH");
- break;
- case cmTarget::EXECUTABLE:
- this->OutputDir =
- this->Makefile->GetSafeDefinition("EXECUTABLE_OUTPUT_PATH");
- break;
+ this->OutputDir =
+ this->Makefile->GetSafeDefinition("EXECUTABLE_OUTPUT_PATH");
+ }
+ else if(this->GetType() == cmTarget::STATIC_LIBRARY ||
+ this->GetType() == cmTarget::SHARED_LIBRARY ||
+ this->GetType() == cmTarget::MODULE_LIBRARY)
+ {
+ this->OutputDir =
+ this->Makefile->GetSafeDefinition("LIBRARY_OUTPUT_PATH");
}
if(this->OutputDir.empty())
{
@@ -1968,10 +1967,16 @@
this->OutputDir.c_str());
}
- // TODO: This came from cmLocalUnixMakefileGenerator3::FormatOutputPath.
- // Where should it go. Is it still needed?
+ // This came from cmLocalUnixMakefileGenerator3::FormatOutputPath.
+ // Where should it go? Is it still needed? I do not think so
+ // because target full paths are split into -Ldir -llib
+ // automatically.
+ //
// Add this as a link directory automatically.
// this->Makefile->AddLinkDirectory(path.c_str());
+ //
+ // Should it be this?
+ // this->AddLinkDirectory(this->OutputDir.c_str());
}
return this->OutputDir.c_str();
More information about the Cmake-commits
mailing list