diff options
author | Brad King <brad.king@kitware.com> | 2011-11-10 22:17:41 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2011-11-14 14:47:31 (GMT) |
commit | 1be4b6f4638334970a3d3f19891b5997ddcf5717 (patch) | |
tree | 7ce46559af786886bb622648efbff68ac4f17d2c /Source/cmLocalVisualStudioGenerator.h | |
parent | 131d0ae4fc4d51fa8175bc3dfd323efccb1cc951 (diff) | |
download | CMake-1be4b6f4638334970a3d3f19891b5997ddcf5717.zip CMake-1be4b6f4638334970a3d3f19891b5997ddcf5717.tar.gz CMake-1be4b6f4638334970a3d3f19891b5997ddcf5717.tar.bz2 |
Order VS local generator Version ivar values consistently
Move the Version member to the top cmLocalVisualStudioGenerator class
and set it consistently for instances created by all the global
generator versions. Use an enumeration type with values scaled by a
factor of 10 so we can handle VS 7.1 without out-of-order numbers.
VS 7.1 support for SuppressStartupBanner was broken by commit 25116a3c
(Fix CMAKE_VERBOSE_MAKEFILE for VS10 vcxproj files, 2011-10-11) because
it assumed comparison of VS version numbers works. Now it does.
Diffstat (limited to 'Source/cmLocalVisualStudioGenerator.h')
-rw-r--r-- | Source/cmLocalVisualStudioGenerator.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/Source/cmLocalVisualStudioGenerator.h b/Source/cmLocalVisualStudioGenerator.h index a38bc30..9794d59 100644 --- a/Source/cmLocalVisualStudioGenerator.h +++ b/Source/cmLocalVisualStudioGenerator.h @@ -29,7 +29,18 @@ class cmCustomCommand; class cmLocalVisualStudioGenerator : public cmLocalGenerator { public: - cmLocalVisualStudioGenerator(); + /** Known versions of Visual Studio. */ + enum VSVersion + { + VS6 = 60, + VS7 = 70, + VS71 = 71, + VS8 = 80, + VS9 = 90, + VS10 = 100 + }; + + cmLocalVisualStudioGenerator(VSVersion v); virtual ~cmLocalVisualStudioGenerator(); /** Construct a script from the given list of command lines. */ @@ -41,6 +52,9 @@ public: sequence of custom commands. */ const char* GetReportErrorLabel() const; + /** Version of Visual Studio. */ + VSVersion GetVersion() const { return this->Version; } + protected: virtual const char* ReportErrorLabel() const; virtual bool CustomCommandUseLocal() const { return false; } @@ -58,6 +72,8 @@ protected: std::map<cmStdString, int>& count); std::set<const cmSourceFile*> NeedObjectName; friend class cmVisualStudio10TargetGenerator; + + VSVersion Version; }; #endif |