Teach VS generators to set the MACHINE type correctly.
This commit is contained in:
parent
bbbdf54a35
commit
268448b891
|
@ -25,6 +25,8 @@ cmGlobalVisualStudio10Generator::cmGlobalVisualStudio10Generator()
|
||||||
void cmGlobalVisualStudio10Generator::AddPlatformDefinitions(cmMakefile* mf)
|
void cmGlobalVisualStudio10Generator::AddPlatformDefinitions(cmMakefile* mf)
|
||||||
{
|
{
|
||||||
mf->AddDefinition("MSVC10", "1");
|
mf->AddDefinition("MSVC10", "1");
|
||||||
|
mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", "X86");
|
||||||
|
mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", "X86");
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
|
|
@ -29,9 +29,11 @@ void cmGlobalVisualStudio10Win64Generator
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void cmGlobalVisualStudio10Win64Generator::EnableLanguage(
|
void cmGlobalVisualStudio10Win64Generator
|
||||||
std::vector<std::string> const& lang, cmMakefile *mf, bool optional)
|
::AddPlatformDefinitions(cmMakefile* mf)
|
||||||
{
|
{
|
||||||
|
this->cmGlobalVisualStudio10Generator::AddPlatformDefinitions(mf);
|
||||||
mf->AddDefinition("CMAKE_FORCE_WIN64", "TRUE");
|
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");
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ public:
|
||||||
/** Get the documentation entry for this generator. */
|
/** Get the documentation entry for this generator. */
|
||||||
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
|
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
|
||||||
|
|
||||||
virtual void EnableLanguage(std::vector<std::string>const& languages,
|
virtual void AddPlatformDefinitions(cmMakefile* mf);
|
||||||
cmMakefile *, bool optional);
|
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -44,6 +44,8 @@ void cmGlobalVisualStudio6Generator
|
||||||
mf->AddDefinition("CMAKE_GENERATOR_RC", "rc");
|
mf->AddDefinition("CMAKE_GENERATOR_RC", "rc");
|
||||||
mf->AddDefinition("CMAKE_GENERATOR_NO_COMPILER_ENV", "1");
|
mf->AddDefinition("CMAKE_GENERATOR_NO_COMPILER_ENV", "1");
|
||||||
mf->AddDefinition("CMAKE_GENERATOR_Fortran", "ifort");
|
mf->AddDefinition("CMAKE_GENERATOR_Fortran", "ifort");
|
||||||
|
mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", "X86");
|
||||||
|
mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", "X86");
|
||||||
mf->AddDefinition("MSVC60", "1");
|
mf->AddDefinition("MSVC60", "1");
|
||||||
this->GenerateConfigurations(mf);
|
this->GenerateConfigurations(mf);
|
||||||
this->cmGlobalGenerator::EnableLanguage(lang, mf, optional);
|
this->cmGlobalGenerator::EnableLanguage(lang, mf, optional);
|
||||||
|
|
|
@ -36,6 +36,7 @@ cmLocalGenerator *cmGlobalVisualStudio71Generator::CreateLocalGenerator()
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void cmGlobalVisualStudio71Generator::AddPlatformDefinitions(cmMakefile* mf)
|
void cmGlobalVisualStudio71Generator::AddPlatformDefinitions(cmMakefile* mf)
|
||||||
{
|
{
|
||||||
|
this->cmGlobalVisualStudio7Generator::AddPlatformDefinitions(mf);
|
||||||
mf->AddDefinition("MSVC71", "1");
|
mf->AddDefinition("MSVC71", "1");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,6 @@ void cmGlobalVisualStudio7Generator
|
||||||
mf->AddDefinition("CMAKE_GENERATOR_RC", "rc");
|
mf->AddDefinition("CMAKE_GENERATOR_RC", "rc");
|
||||||
mf->AddDefinition("CMAKE_GENERATOR_NO_COMPILER_ENV", "1");
|
mf->AddDefinition("CMAKE_GENERATOR_NO_COMPILER_ENV", "1");
|
||||||
mf->AddDefinition("CMAKE_GENERATOR_FC", "ifort");
|
mf->AddDefinition("CMAKE_GENERATOR_FC", "ifort");
|
||||||
|
|
||||||
this->AddPlatformDefinitions(mf);
|
this->AddPlatformDefinitions(mf);
|
||||||
|
|
||||||
// Create list of configurations requested by user's cache, if any.
|
// Create list of configurations requested by user's cache, if any.
|
||||||
|
@ -59,6 +58,8 @@ void cmGlobalVisualStudio7Generator
|
||||||
void cmGlobalVisualStudio7Generator::AddPlatformDefinitions(cmMakefile* mf)
|
void cmGlobalVisualStudio7Generator::AddPlatformDefinitions(cmMakefile* mf)
|
||||||
{
|
{
|
||||||
mf->AddDefinition("MSVC70", "1");
|
mf->AddDefinition("MSVC70", "1");
|
||||||
|
mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", "X86");
|
||||||
|
mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", "X86");
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string cmGlobalVisualStudio7Generator
|
std::string cmGlobalVisualStudio7Generator
|
||||||
|
|
|
@ -55,6 +55,8 @@ void cmGlobalVisualStudio8Generator
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void cmGlobalVisualStudio8Generator::AddPlatformDefinitions(cmMakefile* mf)
|
void cmGlobalVisualStudio8Generator::AddPlatformDefinitions(cmMakefile* mf)
|
||||||
{
|
{
|
||||||
|
mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", "X86");
|
||||||
|
mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", "X86");
|
||||||
mf->AddDefinition("MSVC80", "1");
|
mf->AddDefinition("MSVC80", "1");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,10 +42,12 @@ void cmGlobalVisualStudio8Win64Generator
|
||||||
entry.Full = "";
|
entry.Full = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
void cmGlobalVisualStudio8Win64Generator
|
void cmGlobalVisualStudio8Win64Generator
|
||||||
::EnableLanguage(std::vector<std::string>const & lang,
|
::AddPlatformDefinitions(cmMakefile* mf)
|
||||||
cmMakefile *mf, bool optional)
|
|
||||||
{
|
{
|
||||||
|
this->cmGlobalVisualStudio8Generator::AddPlatformDefinitions(mf);
|
||||||
mf->AddDefinition("CMAKE_FORCE_WIN64", "TRUE");
|
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");
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,6 @@ public:
|
||||||
* Try to determine system infomation such as shared library
|
* Try to determine system infomation such as shared library
|
||||||
* extension, pthreads, byte order etc.
|
* extension, pthreads, byte order etc.
|
||||||
*/
|
*/
|
||||||
virtual void EnableLanguage(std::vector<std::string>const& languages,
|
virtual void AddPlatformDefinitions(cmMakefile *);
|
||||||
cmMakefile *, bool optional);
|
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -25,6 +25,8 @@ cmGlobalVisualStudio9Generator::cmGlobalVisualStudio9Generator()
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void cmGlobalVisualStudio9Generator::AddPlatformDefinitions(cmMakefile* mf)
|
void cmGlobalVisualStudio9Generator::AddPlatformDefinitions(cmMakefile* mf)
|
||||||
{
|
{
|
||||||
|
mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", "X86");
|
||||||
|
mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", "X86");
|
||||||
mf->AddDefinition("MSVC90", "1");
|
mf->AddDefinition("MSVC90", "1");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,10 +39,12 @@ void cmGlobalVisualStudio9Win64Generator
|
||||||
entry.Full = "";
|
entry.Full = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
void cmGlobalVisualStudio9Win64Generator
|
void cmGlobalVisualStudio9Win64Generator
|
||||||
::EnableLanguage(std::vector<std::string>const & lang,
|
::AddPlatformDefinitions(cmMakefile* mf)
|
||||||
cmMakefile *mf, bool optional)
|
|
||||||
{
|
{
|
||||||
|
cmGlobalVisualStudio9Generator::AddPlatformDefinitions(mf);
|
||||||
mf->AddDefinition("CMAKE_FORCE_WIN64", "TRUE");
|
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");
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,6 @@ public:
|
||||||
* Try to determine system infomation such as shared library
|
* Try to determine system infomation such as shared library
|
||||||
* extension, pthreads, byte order etc.
|
* extension, pthreads, byte order etc.
|
||||||
*/
|
*/
|
||||||
virtual void EnableLanguage(std::vector<std::string>const& languages,
|
virtual void AddPlatformDefinitions(cmMakefile *);
|
||||||
cmMakefile *, bool optional);
|
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue