diff options
Diffstat (limited to 'Source/cmGlobalVisualStudio10Generator.h')
-rw-r--r-- | Source/cmGlobalVisualStudio10Generator.h | 58 |
1 files changed, 41 insertions, 17 deletions
diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h index 976d41f..6245b28 100644 --- a/Source/cmGlobalVisualStudio10Generator.h +++ b/Source/cmGlobalVisualStudio10Generator.h @@ -24,32 +24,29 @@ class cmGlobalVisualStudio10Generator : public cmGlobalVisualStudio8Generator { public: - cmGlobalVisualStudio10Generator(const char* name, - const char* platformName, const char* additionalPlatformDefinition); + cmGlobalVisualStudio10Generator(const std::string& name, + const std::string& platformName); static cmGlobalGeneratorFactory* NewFactory(); - virtual bool MatchesGeneratorName(const char* name) const; + virtual bool MatchesGeneratorName(const std::string& name) const; - virtual bool SetGeneratorToolset(std::string const& ts); + virtual bool SetGeneratorToolset(std::string const& ts, cmMakefile* mf); + virtual bool SetSystemName(std::string const& s, cmMakefile* mf); virtual void GenerateBuildCommand( std::vector<std::string>& makeCommand, - const char* makeProgram, - const char* projectName, - const char* projectDir, - const char* targetName, - const char* config, + const std::string& makeProgram, + const std::string& projectName, + const std::string& projectDir, + const std::string& targetName, + const std::string& config, bool fast, std::vector<std::string> const& makeOptions = std::vector<std::string>() ); - virtual void AddPlatformDefinitions(cmMakefile* mf); - ///! create the correct local generator virtual cmLocalGenerator *CreateLocalGenerator(); - virtual void Generate(); - /** * Try to determine system infomation such as shared library * extension, pthreads, byte order etc. @@ -65,7 +62,21 @@ public: bool IsMasmEnabled() const { return this->MasmEnabled; } /** The toolset name for the target platform. */ - const char* GetPlatformToolset(); + const char* GetPlatformToolset() const; + + /** Return the CMAKE_SYSTEM_NAME. */ + std::string const& GetSystemName() const { return this->SystemName; } + + /** Return the CMAKE_SYSTEM_VERSION. */ + std::string const& GetSystemVersion() const { return this->SystemVersion; } + + /** Return true if building for WindowsPhone */ + bool TargetsWindowsPhone() const + { return this->SystemIsWindowsPhone; } + + /** Return true if building for WindowsStore */ + bool TargetsWindowsStore() const + { return this->SystemIsWindowsStore; } /** * Where does this version of Visual Studio look for macros for the @@ -86,7 +97,7 @@ public: /** Generate an <output>.rule file path for a given command output. */ virtual std::string GenerateRuleFile(std::string const& output) const; - void PathTooLong(cmTarget* target, cmSourceFile* sf, + void PathTooLong(cmTarget* target, cmSourceFile const* sf, std::string const& sfRel); virtual const char* GetToolsVersion() { return "4.0"; } @@ -94,11 +105,23 @@ public: virtual void FindMakeProgram(cmMakefile*); protected: + virtual void Generate(); + virtual bool InitializeSystem(cmMakefile* mf); + virtual bool InitializeWindowsPhone(cmMakefile* mf); + virtual bool InitializeWindowsStore(cmMakefile* mf); + virtual std::string SelectWindowsPhoneToolset() const { return ""; } + virtual std::string SelectWindowsStoreToolset() const { return ""; } + virtual const char* GetIDEVersion() { return "10.0"; } std::string const& GetMSBuildCommand(); - std::string PlatformToolset; + std::string GeneratorToolset; + std::string DefaultPlatformToolset; + std::string SystemName; + std::string SystemVersion; + bool SystemIsWindowsPhone; + bool SystemIsWindowsStore; bool ExpressEdition; bool MasmEnabled; @@ -111,7 +134,7 @@ private: LongestSourcePath(): Length(0), Target(0), SourceFile(0) {} size_t Length; cmTarget* Target; - cmSourceFile* SourceFile; + cmSourceFile const* SourceFile; std::string SourceRel; }; LongestSourcePath LongestSource; @@ -121,5 +144,6 @@ private: virtual std::string FindMSBuildCommand(); virtual std::string FindDevEnvCommand(); virtual std::string GetVSMakeProgram() { return this->GetMSBuildCommand(); } + void AddVSPlatformToolsetDefinition(cmMakefile* mf) const; }; #endif |