From 58f671bb1ca501726afbffa748d0ee72375bba05 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Mon, 17 Dec 2007 14:43:11 -0500 Subject: ENH: add support for vs 9 win64 --- Source/CMakeLists.txt | 2 + Source/cmGlobalVisualStudio9Win64Generator.cxx | 53 +++++++++++++++++++++++++ Source/cmGlobalVisualStudio9Win64Generator.h | 54 ++++++++++++++++++++++++++ Source/cmake.cxx | 12 ++++++ 4 files changed, 121 insertions(+) create mode 100644 Source/cmGlobalVisualStudio9Win64Generator.cxx create mode 100644 Source/cmGlobalVisualStudio9Win64Generator.h diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index d4ec11a..e821f91 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -233,6 +233,8 @@ IF (WIN32) cmGlobalVisualStudio9Generator.h cmGlobalVisualStudio8Win64Generator.cxx cmGlobalVisualStudio8Win64Generator.h + cmGlobalVisualStudio9Win64Generator.cxx + cmGlobalVisualStudio9Win64Generator.h cmGlobalVisualStudioGenerator.cxx cmGlobalVisualStudioGenerator.h cmGlobalWatcomWMakeGenerator.cxx diff --git a/Source/cmGlobalVisualStudio9Win64Generator.cxx b/Source/cmGlobalVisualStudio9Win64Generator.cxx new file mode 100644 index 0000000..0140d5c --- /dev/null +++ b/Source/cmGlobalVisualStudio9Win64Generator.cxx @@ -0,0 +1,53 @@ +/*========================================================================= + +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 "cmGlobalVisualStudio9Win64Generator.h" +#include "cmLocalVisualStudio7Generator.h" +#include "cmMakefile.h" + + +cmGlobalVisualStudio9Win64Generator::cmGlobalVisualStudio9Win64Generator() +{ + this->PlatformName = "x64"; +} + +///! Create a local generator appropriate to this Global Generator +cmLocalGenerator *cmGlobalVisualStudio9Win64Generator::CreateLocalGenerator() +{ + cmLocalVisualStudio7Generator *lg = new cmLocalVisualStudio7Generator; + lg->SetVersion9(); + lg->SetPlatformName(this->PlatformName.c_str()); + lg->SetExtraFlagTable(this->GetExtraFlagTableVS8()); + lg->SetGlobalGenerator(this); + return lg; +} + +//---------------------------------------------------------------------------- +void cmGlobalVisualStudio9Win64Generator +::GetDocumentation(cmDocumentationEntry& entry) const +{ + entry.Name = this->GetName(); + entry.Brief = "Generates Visual Studio 9 2008 Win64 project files."; + entry.Full = ""; +} + +void cmGlobalVisualStudio9Win64Generator +::EnableLanguage(std::vectorconst & lang, + cmMakefile *mf, bool optional) +{ + mf->AddDefinition("CMAKE_FORCE_WIN64", "TRUE"); + cmGlobalVisualStudio9Generator::EnableLanguage(lang, mf, optional); +} diff --git a/Source/cmGlobalVisualStudio9Win64Generator.h b/Source/cmGlobalVisualStudio9Win64Generator.h new file mode 100644 index 0000000..6e3b4f8 --- /dev/null +++ b/Source/cmGlobalVisualStudio9Win64Generator.h @@ -0,0 +1,54 @@ +/*========================================================================= + +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 cmGlobalVisualStudio9Win64Generator_h +#define cmGlobalVisualStudio9Win64Generator_h + +#include "cmGlobalVisualStudio9Generator.h" + + +/** \class cmGlobalVisualStudio8Win64Generator + * \brief Write a Unix makefiles. + * + * cmGlobalVisualStudio8Win64Generator manages UNIX build process for a tree + */ +class cmGlobalVisualStudio9Win64Generator : + public cmGlobalVisualStudio9Generator +{ +public: + cmGlobalVisualStudio9Win64Generator(); + static cmGlobalGenerator* New() { + return new cmGlobalVisualStudio9Win64Generator; } + + ///! Get the name for the generator. + virtual const char* GetName() const { + return cmGlobalVisualStudio9Win64Generator::GetActualName();} + static const char* GetActualName() {return "Visual Studio 9 2008 Win64";} + + /** 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::vectorconst& languages, + cmMakefile *, bool optional); +}; +#endif diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 542444a..6781f25 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -64,6 +64,7 @@ # include "cmGlobalVisualStudio71Generator.h" # include "cmGlobalVisualStudio8Generator.h" # include "cmGlobalVisualStudio9Generator.h" +# include "cmGlobalVisualStudio9Win64Generator.h" # include "cmGlobalVisualStudio8Win64Generator.h" # include "cmGlobalBorlandMakefileGenerator.h" # include "cmGlobalNMakeMakefileGenerator.h" @@ -2289,6 +2290,8 @@ void cmake::AddDefaultGenerators() &cmGlobalVisualStudio8Generator::New; this->Generators[cmGlobalVisualStudio9Generator::GetActualName()] = &cmGlobalVisualStudio9Generator::New; + this->Generators[cmGlobalVisualStudio9Win64Generator::GetActualName()] = + &cmGlobalVisualStudio9Win64Generator::New; this->Generators[cmGlobalVisualStudio8Win64Generator::GetActualName()] = &cmGlobalVisualStudio8Win64Generator::New; this->Generators[cmGlobalBorlandMakefileGenerator::GetActualName()] = @@ -3214,6 +3217,15 @@ void cmake::DefineProperties(cmake *cm) "List of packages which were not found during the CMake run. Whether a " "package has been found is determined using the _FOUND variables."); + cm->DefineProperty + ("PACKAGES_NOT_FOUND", cmProperty::GLOBAL, + "List of packages which were not found during the CMake run.", + "List of packages which were not found during the CMake run. Whether a " + "package has been found is determined using the _FOUND variables."); + cm->DefineProperty( + "__CMAKE_DELETE_CACHE_CHANGE_VARS_", cmProperty::GLOBAL, + "Internal property", + "Used to detect compiler changes, Do not set."); // ================================================================ // define variables as well -- cgit v0.12