summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalVisualStudio6Generator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-07-03 14:33:34 (GMT)
committerBrad King <brad.king@kitware.com>2009-07-03 14:33:34 (GMT)
commit44021718a6358d8b93168b04e2c457d8799182b8 (patch)
treef9676d3827526f850a0b58ce589d8753b6b3872f /Source/cmLocalVisualStudio6Generator.cxx
parent11d1063452178b00ac66304da337c1cb56dfa469 (diff)
downloadCMake-44021718a6358d8b93168b04e2c457d8799182b8.zip
CMake-44021718a6358d8b93168b04e2c457d8799182b8.tar.gz
CMake-44021718a6358d8b93168b04e2c457d8799182b8.tar.bz2
STYLE: Replace large if() with named boolean
In cmLocalVisualStudio{6,7}Generator this replaces a large if() test with a re-usable result stored in a boolean variable named accordingly.
Diffstat (limited to 'Source/cmLocalVisualStudio6Generator.cxx')
-rw-r--r--Source/cmLocalVisualStudio6Generator.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx
index 768550f..bcd908e 100644
--- a/Source/cmLocalVisualStudio6Generator.cxx
+++ b/Source/cmLocalVisualStudio6Generator.cxx
@@ -885,6 +885,8 @@ void cmLocalVisualStudio6Generator
// Lookup the output directory for the target.
std::string outPath = target.GetDirectory();
+ bool targetBuilds = (target.GetType() >= cmTarget::EXECUTABLE &&
+ target.GetType() <= cmTarget::MODULE_LIBRARY);
#ifdef CM_USE_OLD_VS6
// Lookup the library and executable output directories.
std::string libPath;
@@ -1136,8 +1138,7 @@ void cmLocalVisualStudio6Generator
}
// Get standard libraries for this language.
- if(target.GetType() >= cmTarget::EXECUTABLE &&
- target.GetType() <= cmTarget::MODULE_LIBRARY)
+ if(targetBuilds)
{
// Get the language to use for linking.
const char* linkLanguage =