diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2009-11-20 16:55:28 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2009-11-20 16:55:28 (GMT) |
commit | 268448b89151cf80ac9d4d0ea974a2d4f17c3cd5 (patch) | |
tree | ea1099a2ffc78c99939bbab38d2e038d040fb15d /Source | |
parent | bbbdf54a3569aa97687091b7d6a03d645f8dabcb (diff) | |
download | CMake-268448b89151cf80ac9d4d0ea974a2d4f17c3cd5.zip CMake-268448b89151cf80ac9d4d0ea974a2d4f17c3cd5.tar.gz CMake-268448b89151cf80ac9d4d0ea974a2d4f17c3cd5.tar.bz2 |
Teach VS generators to set the MACHINE type correctly.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGlobalVisualStudio10Generator.cxx | 2 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio10Win64Generator.cxx | 8 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio10Win64Generator.h | 4 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio6Generator.cxx | 2 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio71Generator.cxx | 1 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio7Generator.cxx | 3 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio8Generator.cxx | 2 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio8Win64Generator.cxx | 8 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio8Win64Generator.h | 3 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio9Generator.cxx | 2 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio9Win64Generator.cxx | 8 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio9Win64Generator.h | 3 |
12 files changed, 30 insertions, 16 deletions
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index abe66a8..691502f 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -25,6 +25,8 @@ cmGlobalVisualStudio10Generator::cmGlobalVisualStudio10Generator() void cmGlobalVisualStudio10Generator::AddPlatformDefinitions(cmMakefile* mf) { mf->AddDefinition("MSVC10", "1"); + mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", "X86"); + mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", "X86"); } //---------------------------------------------------------------------------- diff --git a/Source/cmGlobalVisualStudio10Win64Generator.cxx b/Source/cmGlobalVisualStudio10Win64Generator.cxx index 0e821c7..3737c14 100644 --- a/Source/cmGlobalVisualStudio10Win64Generator.cxx +++ b/Source/cmGlobalVisualStudio10Win64Generator.cxx @@ -29,9 +29,11 @@ void cmGlobalVisualStudio10Win64Generator } //---------------------------------------------------------------------------- -void cmGlobalVisualStudio10Win64Generator::EnableLanguage( - std::vector<std::string> const& lang, cmMakefile *mf, bool optional) +void cmGlobalVisualStudio10Win64Generator +::AddPlatformDefinitions(cmMakefile* mf) { + this->cmGlobalVisualStudio10Generator::AddPlatformDefinitions(mf); mf->AddDefinition("CMAKE_FORCE_WIN64", "TRUE"); - cmGlobalVisualStudio10Generator::EnableLanguage(lang, mf, optional); + mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", "X86"); + mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", "X86"); } diff --git a/Source/cmGlobalVisualStudio10Win64Generator.h b/Source/cmGlobalVisualStudio10Win64Generator.h index 51b68c0..98ba03c 100644 --- a/Source/cmGlobalVisualStudio10Win64Generator.h +++ b/Source/cmGlobalVisualStudio10Win64Generator.h @@ -30,7 +30,7 @@ public: /** Get the documentation entry for this generator. */ virtual void GetDocumentation(cmDocumentationEntry& entry) const; - virtual void EnableLanguage(std::vector<std::string>const& languages, - cmMakefile *, bool optional); + virtual void AddPlatformDefinitions(cmMakefile* mf); + }; #endif diff --git a/Source/cmGlobalVisualStudio6Generator.cxx b/Source/cmGlobalVisualStudio6Generator.cxx index 783db21..d053ca2 100644 --- a/Source/cmGlobalVisualStudio6Generator.cxx +++ b/Source/cmGlobalVisualStudio6Generator.cxx @@ -44,6 +44,8 @@ void cmGlobalVisualStudio6Generator mf->AddDefinition("CMAKE_GENERATOR_RC", "rc"); mf->AddDefinition("CMAKE_GENERATOR_NO_COMPILER_ENV", "1"); mf->AddDefinition("CMAKE_GENERATOR_Fortran", "ifort"); + mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", "X86"); + mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", "X86"); mf->AddDefinition("MSVC60", "1"); this->GenerateConfigurations(mf); this->cmGlobalGenerator::EnableLanguage(lang, mf, optional); diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx index c7014aa..d608aac 100644 --- a/Source/cmGlobalVisualStudio71Generator.cxx +++ b/Source/cmGlobalVisualStudio71Generator.cxx @@ -36,6 +36,7 @@ cmLocalGenerator *cmGlobalVisualStudio71Generator::CreateLocalGenerator() //---------------------------------------------------------------------------- void cmGlobalVisualStudio71Generator::AddPlatformDefinitions(cmMakefile* mf) { + this->cmGlobalVisualStudio7Generator::AddPlatformDefinitions(mf); mf->AddDefinition("MSVC71", "1"); } diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index ea9065e..9631e9a 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -31,7 +31,6 @@ void cmGlobalVisualStudio7Generator mf->AddDefinition("CMAKE_GENERATOR_RC", "rc"); mf->AddDefinition("CMAKE_GENERATOR_NO_COMPILER_ENV", "1"); mf->AddDefinition("CMAKE_GENERATOR_FC", "ifort"); - this->AddPlatformDefinitions(mf); // Create list of configurations requested by user's cache, if any. @@ -59,6 +58,8 @@ void cmGlobalVisualStudio7Generator void cmGlobalVisualStudio7Generator::AddPlatformDefinitions(cmMakefile* mf) { mf->AddDefinition("MSVC70", "1"); + mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", "X86"); + mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", "X86"); } std::string cmGlobalVisualStudio7Generator diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx index 8aec865..e423174 100644 --- a/Source/cmGlobalVisualStudio8Generator.cxx +++ b/Source/cmGlobalVisualStudio8Generator.cxx @@ -55,6 +55,8 @@ void cmGlobalVisualStudio8Generator //---------------------------------------------------------------------------- void cmGlobalVisualStudio8Generator::AddPlatformDefinitions(cmMakefile* mf) { + mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", "X86"); + mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", "X86"); mf->AddDefinition("MSVC80", "1"); } diff --git a/Source/cmGlobalVisualStudio8Win64Generator.cxx b/Source/cmGlobalVisualStudio8Win64Generator.cxx index aa756d8..d5558bb 100644 --- a/Source/cmGlobalVisualStudio8Win64Generator.cxx +++ b/Source/cmGlobalVisualStudio8Win64Generator.cxx @@ -42,10 +42,12 @@ void cmGlobalVisualStudio8Win64Generator entry.Full = ""; } +//---------------------------------------------------------------------------- void cmGlobalVisualStudio8Win64Generator -::EnableLanguage(std::vector<std::string>const & lang, - cmMakefile *mf, bool optional) +::AddPlatformDefinitions(cmMakefile* mf) { + this->cmGlobalVisualStudio8Generator::AddPlatformDefinitions(mf); mf->AddDefinition("CMAKE_FORCE_WIN64", "TRUE"); - cmGlobalVisualStudio8Generator::EnableLanguage(lang, mf, optional); + mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", "x64"); + mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", "x64"); } diff --git a/Source/cmGlobalVisualStudio8Win64Generator.h b/Source/cmGlobalVisualStudio8Win64Generator.h index 2d41a36..44c237c 100644 --- a/Source/cmGlobalVisualStudio8Win64Generator.h +++ b/Source/cmGlobalVisualStudio8Win64Generator.h @@ -43,7 +43,6 @@ public: * 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 AddPlatformDefinitions(cmMakefile *); }; #endif diff --git a/Source/cmGlobalVisualStudio9Generator.cxx b/Source/cmGlobalVisualStudio9Generator.cxx index 75fe900..f6ae705 100644 --- a/Source/cmGlobalVisualStudio9Generator.cxx +++ b/Source/cmGlobalVisualStudio9Generator.cxx @@ -25,6 +25,8 @@ cmGlobalVisualStudio9Generator::cmGlobalVisualStudio9Generator() //---------------------------------------------------------------------------- void cmGlobalVisualStudio9Generator::AddPlatformDefinitions(cmMakefile* mf) { + mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", "X86"); + mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", "X86"); mf->AddDefinition("MSVC90", "1"); } diff --git a/Source/cmGlobalVisualStudio9Win64Generator.cxx b/Source/cmGlobalVisualStudio9Win64Generator.cxx index 288480f..c5b9bab 100644 --- a/Source/cmGlobalVisualStudio9Win64Generator.cxx +++ b/Source/cmGlobalVisualStudio9Win64Generator.cxx @@ -39,10 +39,12 @@ void cmGlobalVisualStudio9Win64Generator entry.Full = ""; } +//---------------------------------------------------------------------------- void cmGlobalVisualStudio9Win64Generator -::EnableLanguage(std::vector<std::string>const & lang, - cmMakefile *mf, bool optional) +::AddPlatformDefinitions(cmMakefile* mf) { + cmGlobalVisualStudio9Generator::AddPlatformDefinitions(mf); mf->AddDefinition("CMAKE_FORCE_WIN64", "TRUE"); - cmGlobalVisualStudio9Generator::EnableLanguage(lang, mf, optional); + mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", "x64"); + mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", "x64"); } diff --git a/Source/cmGlobalVisualStudio9Win64Generator.h b/Source/cmGlobalVisualStudio9Win64Generator.h index 698d20e..55abcfc 100644 --- a/Source/cmGlobalVisualStudio9Win64Generator.h +++ b/Source/cmGlobalVisualStudio9Win64Generator.h @@ -43,7 +43,6 @@ public: * 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 AddPlatformDefinitions(cmMakefile *); }; #endif |