1 /*============================================================================
2 CMake - Cross Platform Makefile Generator
3 Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
5 Distributed under the OSI-approved BSD License (the "License");
6 see accompanying file Copyright.txt for details.
8 This software is distributed WITHOUT ANY WARRANTY; without even the
9 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 See the License for more information.
11 ============================================================================*/
12 #ifndef cmGlobalVisualStudio10Generator_h
13 #define cmGlobalVisualStudio10Generator_h
15 #include "cmGlobalVisualStudio8Generator.h"
18 /** \class cmGlobalVisualStudio10Generator
19 * \brief Write a Unix makefiles.
21 * cmGlobalVisualStudio10Generator manages UNIX build process for a tree
23 class cmGlobalVisualStudio10Generator :
24 public cmGlobalVisualStudio8Generator
27 cmGlobalVisualStudio10Generator();
28 static cmGlobalGenerator* New() {
29 return new cmGlobalVisualStudio10Generator; }
32 GenerateBuildCommand(const char* makeProgram,
33 const char *projectName,
34 const char* additionalOptions, const char *targetName,
35 const char* config, bool ignoreErrors, bool);
37 ///! Get the name for the generator.
38 virtual const char* GetName() const {
39 return cmGlobalVisualStudio10Generator::GetActualName();}
40 static const char* GetActualName() {return "Visual Studio 10";}
41 virtual void AddPlatformDefinitions(cmMakefile* mf);
43 /** Get the documentation entry for this generator. */
44 virtual void GetDocumentation(cmDocumentationEntry& entry) const;
46 ///! create the correct local generator
47 virtual cmLocalGenerator *CreateLocalGenerator();
49 virtual void Generate();
52 * Try to determine system infomation such as shared library
53 * extension, pthreads, byte order etc.
55 virtual void EnableLanguage(std::vector<std::string>const& languages,
56 cmMakefile *, bool optional);
57 virtual void WriteSLNHeader(std::ostream& fout);
59 /** Is the installed VS an Express edition? */
60 bool IsExpressEdition() const { return this->ExpressEdition; }
62 /** The toolset name for the target platform. */
63 const char* GetPlatformToolset();
66 * Where does this version of Visual Studio look for macros for the
67 * current user? Returns the empty string if this version of Visual
68 * Studio does not implement support for VB macros.
70 virtual std::string GetUserMacrosDirectory();
73 * What is the reg key path to "vsmacros" for this version of Visual
76 virtual std::string GetUserMacrosRegKeyBase();
77 virtual const char* GetCMakeCFGIntDir() const
78 { return "$(Configuration)";}
79 bool Find64BitTools(cmMakefile* mf);
81 /** Generate an <output>.rule file path for a given command output. */
82 virtual std::string GenerateRuleFile(std::string const& output) const;
84 void PathTooLong(cmTarget* target, cmSourceFile* sf,
85 std::string const& sfRel);
87 virtual const char* GetIDEVersion() { return "10.0"; }
89 std::string PlatformToolset;
92 bool UseFolderProperty();
95 struct LongestSourcePath
97 LongestSourcePath(): Length(0), Target(0), SourceFile(0) {}
100 cmSourceFile* SourceFile;
101 std::string SourceRel;
103 LongestSourcePath LongestSource;