diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2007-09-17 19:21:47 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2007-09-17 19:21:47 (GMT) |
commit | 9cbb9987371627841a8c508c0880f901a78e844a (patch) | |
tree | c95234acf6875f463574ac782048602a49accf52 /Source | |
parent | 1d81cf994a85ddc0cc6c0626928c33cb8d94ea6d (diff) | |
download | CMake-9cbb9987371627841a8c508c0880f901a78e844a.zip CMake-9cbb9987371627841a8c508c0880f901a78e844a.tar.gz CMake-9cbb9987371627841a8c508c0880f901a78e844a.tar.bz2 |
ENH: add support for vs 2008 beta 2
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Source/MFCDialog/StdAfx.h | 3 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio9Generator.cxx | 61 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio9Generator.h | 55 | ||||
-rw-r--r-- | Source/cmLocalVisualStudio7Generator.cxx | 13 | ||||
-rw-r--r-- | Source/cmLocalVisualStudio7Generator.h | 1 | ||||
-rw-r--r-- | Source/cmake.cxx | 3 |
7 files changed, 127 insertions, 11 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 31bb4fb..23bbd8f 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -213,6 +213,8 @@ IF (WIN32) cmGlobalVisualStudio7Generator.h cmGlobalVisualStudio8Generator.cxx cmGlobalVisualStudio8Generator.h + cmGlobalVisualStudio9Generator.cxx + cmGlobalVisualStudio9Generator.h cmGlobalVisualStudio8Win64Generator.cxx cmGlobalVisualStudio8Win64Generator.h cmGlobalVisualStudioGenerator.cxx diff --git a/Source/MFCDialog/StdAfx.h b/Source/MFCDialog/StdAfx.h index 6169ea9..b939926 100644 --- a/Source/MFCDialog/StdAfx.h +++ b/Source/MFCDialog/StdAfx.h @@ -21,7 +21,8 @@ #if !defined(AFX_STDAFX_H__AC17A6F8_4634_11D4_8F21_00A0CC33FCD3__INCLUDED_) #define AFX_STDAFX_H__AC17A6F8_4634_11D4_8F21_00A0CC33FCD3__INCLUDED_ -#define WINVER 0x0400 +#define _WIN32_WINNT 0x0400 +#define _WIN32_IE 0x0400 #if _MSC_VER > 1000 #pragma once diff --git a/Source/cmGlobalVisualStudio9Generator.cxx b/Source/cmGlobalVisualStudio9Generator.cxx new file mode 100644 index 0000000..1a1981a --- /dev/null +++ b/Source/cmGlobalVisualStudio9Generator.cxx @@ -0,0 +1,61 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile$ + Language: C++ + Date: $Date$ + Version: $Revision$ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "windows.h" // this must be first to define GetCurrentDirectory +#include "cmGlobalVisualStudio9Generator.h" +#include "cmLocalVisualStudio7Generator.h" +#include "cmMakefile.h" +#include "cmake.h" + + + +cmGlobalVisualStudio9Generator::cmGlobalVisualStudio9Generator() +{ + this->FindMakeProgramFile = "CMakeVS9FindMake.cmake"; +} + + +void cmGlobalVisualStudio9Generator::WriteSLNHeader(std::ostream& fout) +{ + fout << "Microsoft Visual Studio Solution File, Format Version 10.00\n"; + fout << "# Visual Studio 2008\n"; +} + +///! Create a local generator appropriate to this Global Generator +cmLocalGenerator *cmGlobalVisualStudio9Generator::CreateLocalGenerator() +{ + cmLocalVisualStudio7Generator *lg = new cmLocalVisualStudio7Generator; + lg->SetVersion9(); + lg->SetExtraFlagTable(this->GetExtraFlagTableVS8()); + lg->SetGlobalGenerator(this); + return lg; +} + +//---------------------------------------------------------------------------- +void cmGlobalVisualStudio9Generator +::GetDocumentation(cmDocumentationEntry& entry) const +{ + entry.name = this->GetName(); + entry.brief = "Generates Visual Studio 9 2008 project files."; + entry.full = ""; +} + +void cmGlobalVisualStudio9Generator +::EnableLanguage(std::vector<std::string>const & lang, + cmMakefile *mf, bool optional) +{ + cmGlobalVisualStudio8Generator::EnableLanguage(lang, mf, optional); +} diff --git a/Source/cmGlobalVisualStudio9Generator.h b/Source/cmGlobalVisualStudio9Generator.h new file mode 100644 index 0000000..565d762 --- /dev/null +++ b/Source/cmGlobalVisualStudio9Generator.h @@ -0,0 +1,55 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile$ + Language: C++ + Date: $Date$ + Version: $Revision$ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmGlobalVisualStudio9Generator_h +#define cmGlobalVisualStudio9Generator_h + +#include "cmGlobalVisualStudio8Generator.h" + + +/** \class cmGlobalVisualStudio9Generator + * \brief Write a Unix makefiles. + * + * cmGlobalVisualStudio9Generator manages UNIX build process for a tree + */ +class cmGlobalVisualStudio9Generator : + public cmGlobalVisualStudio8Generator +{ +public: + cmGlobalVisualStudio9Generator(); + static cmGlobalGenerator* New() { + return new cmGlobalVisualStudio9Generator; } + + ///! Get the name for the generator. + virtual const char* GetName() const { + return cmGlobalVisualStudio9Generator::GetActualName();} + static const char* GetActualName() {return "Visual Studio 9 2008";} + + /** Get the documentation entry for this generator. */ + virtual void GetDocumentation(cmDocumentationEntry& entry) const; + + ///! create the correct local generator + virtual cmLocalGenerator *CreateLocalGenerator(); + + /** + * Try to determine system infomation such as shared library + * extension, pthreads, byte order etc. + */ + virtual void EnableLanguage(std::vector<std::string>const& languages, + cmMakefile *, bool optional); + virtual void WriteSLNHeader(std::ostream& fout); +}; +#endif diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 5f9ab7a..4893012 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -609,7 +609,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout, // manifest tool to use a workaround for FAT32 file systems, which can cause // an empty manifest to be embedded into the resulting executable. // See CMake bug #2617. - if ( this->Version == 8 ) + if ( this->Version > 8 ) { fout << "\t\t\t<Tool\n\t\t\t\tName=\"VCManifestTool\"\n" << "\t\t\t\tUseFAT32Workaround=\"true\"\n" @@ -1434,14 +1434,7 @@ cmLocalVisualStudio7Generator::WriteProjectStart(std::ostream& fout, } else { - if (this->Version == 8) - { - fout << "\tVersion=\"8.00\"\n"; - } - else - { - fout << "\tVersion=\"7.00\"\n"; - } + fout << "\tVersion=\"" << this->Version << ".00\"\n"; } const char* projLabel = target.GetProperty("PROJECT_LABEL"); if(!projLabel) @@ -1456,7 +1449,7 @@ cmLocalVisualStudio7Generator::WriteProjectStart(std::ostream& fout, cmGlobalVisualStudio7Generator* gg = static_cast<cmGlobalVisualStudio7Generator *>(this->GlobalGenerator); fout << "\tName=\"" << projLabel << "\"\n"; - if(this->Version == 8) + if(this->Version > 8) { fout << "\tProjectGUID=\"{" << gg->GetGUID(libName) << "}\"\n"; } diff --git a/Source/cmLocalVisualStudio7Generator.h b/Source/cmLocalVisualStudio7Generator.h index 508c368..0ed9d28 100644 --- a/Source/cmLocalVisualStudio7Generator.h +++ b/Source/cmLocalVisualStudio7Generator.h @@ -57,6 +57,7 @@ public: void SetVersion71() {this->Version = 71;} void SetVersion8() {this->Version = 8;} + void SetVersion9() {this->Version = 9;} void SetPlatformName(const char* n) { this->PlatformName = n;} virtual void ConfigureFinalPass(); void GetTargetObjectFileDirectories(cmTarget* target, diff --git a/Source/cmake.cxx b/Source/cmake.cxx index bc1d381..d6dd6a6 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -62,6 +62,7 @@ # include "cmGlobalVisualStudio7Generator.h" # include "cmGlobalVisualStudio71Generator.h" # include "cmGlobalVisualStudio8Generator.h" +# include "cmGlobalVisualStudio9Generator.h" # include "cmGlobalVisualStudio8Win64Generator.h" # include "cmGlobalBorlandMakefileGenerator.h" # include "cmGlobalNMakeMakefileGenerator.h" @@ -2153,6 +2154,8 @@ void cmake::AddDefaultGenerators() &cmGlobalVisualStudio71Generator::New; this->Generators[cmGlobalVisualStudio8Generator::GetActualName()] = &cmGlobalVisualStudio8Generator::New; + this->Generators[cmGlobalVisualStudio9Generator::GetActualName()] = + &cmGlobalVisualStudio9Generator::New; this->Generators[cmGlobalVisualStudio8Win64Generator::GetActualName()] = &cmGlobalVisualStudio8Win64Generator::New; this->Generators[cmGlobalBorlandMakefileGenerator::GetActualName()] = |