diff options
author | Brad King <brad.king@kitware.com> | 2007-03-08 20:10:20 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2007-03-08 20:10:20 (GMT) |
commit | 1a734f238a61f419e7c22c9cf3ce678325c1320a (patch) | |
tree | bf9229e1892193b5c37219040d7e78a914e42272 | |
parent | 33ee83714d3cea644f9d1cd6654c2e7b1f3cdc5d (diff) | |
download | CMake-1a734f238a61f419e7c22c9cf3ce678325c1320a.zip CMake-1a734f238a61f419e7c22c9cf3ce678325c1320a.tar.gz CMake-1a734f238a61f419e7c22c9cf3ce678325c1320a.tar.bz2 |
COMP: Fixed enumeration-not-used warning in switch.
-rw-r--r-- | Source/cmTarget.cxx | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 8298751..3cffff6 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -1936,18 +1936,17 @@ const char* cmTarget::GetOutputDir() 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 @@ const char* cmTarget::GetOutputDir() 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(); |