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(const char* name,
28 const char* platformName, const char* additionalPlatformDefinition);
29 static cmGlobalGeneratorFactory* NewFactory();
31 virtual bool SetGeneratorToolset(std::string const& ts);
34 GenerateBuildCommand(const char* makeProgram,
35 const char *projectName, const char *projectDir,
36 const char* additionalOptions, const char *targetName,
37 const char* config, bool ignoreErrors, bool);
39 virtual void AddPlatformDefinitions(cmMakefile* mf);
41 ///! create the correct local generator
42 virtual cmLocalGenerator *CreateLocalGenerator();
44 virtual void Generate();
47 * Try to determine system infomation such as shared library
48 * extension, pthreads, byte order etc.
50 virtual void EnableLanguage(std::vector<std::string>const& languages,
51 cmMakefile *, bool optional);
52 virtual void WriteSLNHeader(std::ostream& fout);
54 /** Is the installed VS an Express edition? */
55 bool IsExpressEdition() const { return this->ExpressEdition; }
57 /** Is the Microsoft Assembler enabled? */
58 bool IsMasmEnabled() const { return this->MasmEnabled; }
60 /** The toolset name for the target platform. */
61 const char* GetPlatformToolset();
64 * Where does this version of Visual Studio look for macros for the
65 * current user? Returns the empty string if this version of Visual
66 * Studio does not implement support for VB macros.
68 virtual std::string GetUserMacrosDirectory();
71 * What is the reg key path to "vsmacros" for this version of Visual
74 virtual std::string GetUserMacrosRegKeyBase();
75 virtual const char* GetCMakeCFGIntDir() const
76 { return "$(Configuration)";}
77 bool Find64BitTools(cmMakefile* mf);
79 /** Generate an <output>.rule file path for a given command output. */
80 virtual std::string GenerateRuleFile(std::string const& output) const;
82 void PathTooLong(cmTarget* target, cmSourceFile* sf,
83 std::string const& sfRel);
85 virtual const char* GetToolsVersion() { return "4.0"; }
88 virtual const char* GetIDEVersion() { return "10.0"; }
90 std::string PlatformToolset;
94 bool UseFolderProperty();
98 struct LongestSourcePath
100 LongestSourcePath(): Length(0), Target(0), SourceFile(0) {}
103 cmSourceFile* SourceFile;
104 std::string SourceRel;
106 LongestSourcePath LongestSource;