Merge topic 'vs11-arm-generator'

5af93bb VS11: Fix ARM architecture hint typo (#13077)
0fa3d09 VS11: Add ARM architecture generator (#13077)
This commit is contained in:
David Cole 2012-05-17 14:58:41 -04:00 committed by CMake Topic Stage
commit 8f635d0268
6 changed files with 79 additions and 0 deletions

View File

@ -77,6 +77,8 @@ function(GetDefaultWindowsPrefixBase var)
# #
if("${CMAKE_GENERATOR}" MATCHES "(Win64|IA64)") if("${CMAKE_GENERATOR}" MATCHES "(Win64|IA64)")
set(arch_hint "x64") set(arch_hint "x64")
elseif("${CMAKE_GENERATOR}" MATCHES "ARM")
set(arch_hint "ARM")
elseif("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8") elseif("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8")
set(arch_hint "x64") set(arch_hint "x64")
elseif("$ENV{LIB}" MATCHES "(amd64|ia64)") elseif("$ENV{LIB}" MATCHES "(amd64|ia64)")

View File

@ -97,6 +97,9 @@
# elif defined(_M_IX86) # elif defined(_M_IX86)
# define ARCHITECTURE_ID "X86" # define ARCHITECTURE_ID "X86"
# elif defined(_M_ARM)
# define ARCHITECTURE_ID "ARM"
# else /* unknown architecture */ # else /* unknown architecture */
# define ARCHITECTURE_ID "" # define ARCHITECTURE_ID ""
# endif # endif

View File

@ -337,6 +337,8 @@ IF (WIN32)
cmGlobalVisualStudio11Generator.cxx cmGlobalVisualStudio11Generator.cxx
cmGlobalVisualStudio11Win64Generator.h cmGlobalVisualStudio11Win64Generator.h
cmGlobalVisualStudio11Win64Generator.cxx cmGlobalVisualStudio11Win64Generator.cxx
cmGlobalVisualStudio11ARMGenerator.h
cmGlobalVisualStudio11ARMGenerator.cxx
cmGlobalVisualStudioGenerator.cxx cmGlobalVisualStudioGenerator.cxx
cmGlobalVisualStudioGenerator.h cmGlobalVisualStudioGenerator.h
cmGlobalWatcomWMakeGenerator.cxx cmGlobalWatcomWMakeGenerator.cxx

View File

@ -0,0 +1,32 @@
/*============================================================================
CMake - Cross Platform Makefile Generator
Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
Distributed under the OSI-approved BSD License (the "License");
see accompanying file Copyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the License for more information.
============================================================================*/
#include "cmGlobalVisualStudio11ARMGenerator.h"
#include "cmMakefile.h"
#include "cmake.h"
//----------------------------------------------------------------------------
void cmGlobalVisualStudio11ARMGenerator
::GetDocumentation(cmDocumentationEntry& entry) const
{
entry.Name = this->GetName();
entry.Brief = "Generates Visual Studio 11 ARM project files.";
entry.Full = "";
}
//----------------------------------------------------------------------------
void cmGlobalVisualStudio11ARMGenerator
::AddPlatformDefinitions(cmMakefile* mf)
{
this->cmGlobalVisualStudio11Generator::AddPlatformDefinitions(mf);
mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", "ARM");
mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", "ARM");
}

View File

@ -0,0 +1,37 @@
/*============================================================================
CMake - Cross Platform Makefile Generator
Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
Distributed under the OSI-approved BSD License (the "License");
see accompanying file Copyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the License for more information.
============================================================================*/
#ifndef cmGlobalVisualStudio11ARMGenerator_h
#define cmGlobalVisualStudio11ARMGenerator_h
#include "cmGlobalVisualStudio11Generator.h"
class cmGlobalVisualStudio11ARMGenerator :
public cmGlobalVisualStudio11Generator
{
public:
cmGlobalVisualStudio11ARMGenerator() {}
static cmGlobalGenerator* New() {
return new cmGlobalVisualStudio11ARMGenerator; }
///! Get the name for the generator.
virtual const char* GetName() const {
return cmGlobalVisualStudio11ARMGenerator::GetActualName();}
static const char* GetActualName() {return "Visual Studio 11 ARM";}
virtual const char* GetPlatformName() const {return "ARM";}
/** Get the documentation entry for this generator. */
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
virtual void AddPlatformDefinitions(cmMakefile* mf);
};
#endif

View File

@ -70,6 +70,7 @@
# include "cmGlobalVisualStudio10Win64Generator.h" # include "cmGlobalVisualStudio10Win64Generator.h"
# include "cmGlobalVisualStudio11Generator.h" # include "cmGlobalVisualStudio11Generator.h"
# include "cmGlobalVisualStudio11Win64Generator.h" # include "cmGlobalVisualStudio11Win64Generator.h"
# include "cmGlobalVisualStudio11ARMGenerator.h"
# include "cmGlobalVisualStudio8Win64Generator.h" # include "cmGlobalVisualStudio8Win64Generator.h"
# include "cmGlobalBorlandMakefileGenerator.h" # include "cmGlobalBorlandMakefileGenerator.h"
# include "cmGlobalNMakeMakefileGenerator.h" # include "cmGlobalNMakeMakefileGenerator.h"
@ -2569,6 +2570,8 @@ void cmake::AddDefaultGenerators()
&cmGlobalVisualStudio11Generator::New; &cmGlobalVisualStudio11Generator::New;
this->Generators[cmGlobalVisualStudio11Win64Generator::GetActualName()] = this->Generators[cmGlobalVisualStudio11Win64Generator::GetActualName()] =
&cmGlobalVisualStudio11Win64Generator::New; &cmGlobalVisualStudio11Win64Generator::New;
this->Generators[cmGlobalVisualStudio11ARMGenerator::GetActualName()] =
&cmGlobalVisualStudio11ARMGenerator::New;
this->Generators[cmGlobalVisualStudio71Generator::GetActualName()] = this->Generators[cmGlobalVisualStudio71Generator::GetActualName()] =
&cmGlobalVisualStudio71Generator::New; &cmGlobalVisualStudio71Generator::New;
this->Generators[cmGlobalVisualStudio8Generator::GetActualName()] = this->Generators[cmGlobalVisualStudio8Generator::GetActualName()] =