summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorPatrick Gansterer <paroga@paroga.com>2012-11-19 16:21:47 (GMT)
committerBrad King <brad.king@kitware.com>2012-11-19 17:54:57 (GMT)
commit6f439b30cb0b1a76c8e7ee8f169a0415a8a47c70 (patch)
tree90741f846b81f40885aa14523d5df33304eb9287 /Source
parent5170a8800ff4613dd41f6995e8efd43df36a40bd (diff)
downloadCMake-6f439b30cb0b1a76c8e7ee8f169a0415a8a47c70.zip
CMake-6f439b30cb0b1a76c8e7ee8f169a0415a8a47c70.tar.gz
CMake-6f439b30cb0b1a76c8e7ee8f169a0415a8a47c70.tar.bz2
VS: Remove AddPlatformDefinitions from platform-specific generators
Move the logic for handling platform specific defines from the subclasses into the cmGlobalVisualStudioGenerator base class.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalVisualStudio10IA64Generator.cxx9
-rw-r--r--Source/cmGlobalVisualStudio10IA64Generator.h2
-rw-r--r--Source/cmGlobalVisualStudio10Win64Generator.cxx9
-rw-r--r--Source/cmGlobalVisualStudio10Win64Generator.h2
-rw-r--r--Source/cmGlobalVisualStudio11Win64Generator.cxx9
-rw-r--r--Source/cmGlobalVisualStudio11Win64Generator.h2
-rw-r--r--Source/cmGlobalVisualStudio8Win64Generator.cxx9
-rw-r--r--Source/cmGlobalVisualStudio8Win64Generator.h6
-rw-r--r--Source/cmGlobalVisualStudio9IA64Generator.cxx9
-rw-r--r--Source/cmGlobalVisualStudio9IA64Generator.h6
-rw-r--r--Source/cmGlobalVisualStudio9Win64Generator.cxx9
-rw-r--r--Source/cmGlobalVisualStudio9Win64Generator.h6
-rw-r--r--Source/cmGlobalVisualStudioGenerator.cxx6
-rw-r--r--Source/cmGlobalVisualStudioGenerator.h1
14 files changed, 13 insertions, 72 deletions
diff --git a/Source/cmGlobalVisualStudio10IA64Generator.cxx b/Source/cmGlobalVisualStudio10IA64Generator.cxx
index 40bc307..fabe717 100644
--- a/Source/cmGlobalVisualStudio10IA64Generator.cxx
+++ b/Source/cmGlobalVisualStudio10IA64Generator.cxx
@@ -17,6 +17,7 @@
cmGlobalVisualStudio10IA64Generator::cmGlobalVisualStudio10IA64Generator()
{
this->ArchitectureId = "x64";
+ this->AdditionalPlatformDefinition = "CMAKE_FORCE_IA64";
}
//----------------------------------------------------------------------------
@@ -30,14 +31,6 @@ void cmGlobalVisualStudio10IA64Generator
//----------------------------------------------------------------------------
void cmGlobalVisualStudio10IA64Generator
-::AddPlatformDefinitions(cmMakefile* mf)
-{
- this->cmGlobalVisualStudio10Generator::AddPlatformDefinitions(mf);
- mf->AddDefinition("CMAKE_FORCE_IA64", "TRUE");
-}
-
-//----------------------------------------------------------------------------
-void cmGlobalVisualStudio10IA64Generator
::EnableLanguage(std::vector<std::string> const& languages,
cmMakefile* mf, bool optional)
{
diff --git a/Source/cmGlobalVisualStudio10IA64Generator.h b/Source/cmGlobalVisualStudio10IA64Generator.h
index 2543677..ae12cc3 100644
--- a/Source/cmGlobalVisualStudio10IA64Generator.h
+++ b/Source/cmGlobalVisualStudio10IA64Generator.h
@@ -33,8 +33,6 @@ public:
/** Get the documentation entry for this generator. */
static void GetDocumentation(cmDocumentationEntry& entry);
- virtual void AddPlatformDefinitions(cmMakefile* mf);
-
virtual void EnableLanguage(std::vector<std::string>const& languages,
cmMakefile *, bool optional);
};
diff --git a/Source/cmGlobalVisualStudio10Win64Generator.cxx b/Source/cmGlobalVisualStudio10Win64Generator.cxx
index d9db731..0352a46 100644
--- a/Source/cmGlobalVisualStudio10Win64Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Win64Generator.cxx
@@ -17,6 +17,7 @@
cmGlobalVisualStudio10Win64Generator::cmGlobalVisualStudio10Win64Generator()
{
this->ArchitectureId = "x64";
+ this->AdditionalPlatformDefinition = "CMAKE_FORCE_WIN64";
}
//----------------------------------------------------------------------------
@@ -30,14 +31,6 @@ void cmGlobalVisualStudio10Win64Generator
//----------------------------------------------------------------------------
void cmGlobalVisualStudio10Win64Generator
-::AddPlatformDefinitions(cmMakefile* mf)
-{
- this->cmGlobalVisualStudio10Generator::AddPlatformDefinitions(mf);
- mf->AddDefinition("CMAKE_FORCE_WIN64", "TRUE");
-}
-
-//----------------------------------------------------------------------------
-void cmGlobalVisualStudio10Win64Generator
::EnableLanguage(std::vector<std::string> const& languages,
cmMakefile* mf, bool optional)
{
diff --git a/Source/cmGlobalVisualStudio10Win64Generator.h b/Source/cmGlobalVisualStudio10Win64Generator.h
index d95f770..66d77a9 100644
--- a/Source/cmGlobalVisualStudio10Win64Generator.h
+++ b/Source/cmGlobalVisualStudio10Win64Generator.h
@@ -33,8 +33,6 @@ public:
/** Get the documentation entry for this generator. */
static void GetDocumentation(cmDocumentationEntry& entry);
- virtual void AddPlatformDefinitions(cmMakefile* mf);
-
virtual void EnableLanguage(std::vector<std::string>const& languages,
cmMakefile *, bool optional);
};
diff --git a/Source/cmGlobalVisualStudio11Win64Generator.cxx b/Source/cmGlobalVisualStudio11Win64Generator.cxx
index 5810b03..aca0a4e 100644
--- a/Source/cmGlobalVisualStudio11Win64Generator.cxx
+++ b/Source/cmGlobalVisualStudio11Win64Generator.cxx
@@ -17,6 +17,7 @@
cmGlobalVisualStudio11Win64Generator::cmGlobalVisualStudio11Win64Generator()
{
this->ArchitectureId = "x64";
+ this->AdditionalPlatformDefinition = "CMAKE_FORCE_WIN64";
}
//----------------------------------------------------------------------------
@@ -27,11 +28,3 @@ void cmGlobalVisualStudio11Win64Generator
entry.Brief = "Generates Visual Studio 11 Win64 project files.";
entry.Full = "";
}
-
-//----------------------------------------------------------------------------
-void cmGlobalVisualStudio11Win64Generator
-::AddPlatformDefinitions(cmMakefile* mf)
-{
- this->cmGlobalVisualStudio11Generator::AddPlatformDefinitions(mf);
- mf->AddDefinition("CMAKE_FORCE_WIN64", "TRUE");
-}
diff --git a/Source/cmGlobalVisualStudio11Win64Generator.h b/Source/cmGlobalVisualStudio11Win64Generator.h
index ff42281..bb33877 100644
--- a/Source/cmGlobalVisualStudio11Win64Generator.h
+++ b/Source/cmGlobalVisualStudio11Win64Generator.h
@@ -32,7 +32,5 @@ public:
/** Get the documentation entry for this generator. */
static void GetDocumentation(cmDocumentationEntry& entry);
-
- virtual void AddPlatformDefinitions(cmMakefile* mf);
};
#endif
diff --git a/Source/cmGlobalVisualStudio8Win64Generator.cxx b/Source/cmGlobalVisualStudio8Win64Generator.cxx
index 4482303..a84e44c 100644
--- a/Source/cmGlobalVisualStudio8Win64Generator.cxx
+++ b/Source/cmGlobalVisualStudio8Win64Generator.cxx
@@ -20,6 +20,7 @@
cmGlobalVisualStudio8Win64Generator::cmGlobalVisualStudio8Win64Generator()
{
this->ArchitectureId = "x64";
+ this->AdditionalPlatformDefinition = "CMAKE_FORCE_WIN64";
}
//----------------------------------------------------------------------------
@@ -30,11 +31,3 @@ void cmGlobalVisualStudio8Win64Generator
entry.Brief = "Generates Visual Studio 8 2005 Win64 project files.";
entry.Full = "";
}
-
-//----------------------------------------------------------------------------
-void cmGlobalVisualStudio8Win64Generator
-::AddPlatformDefinitions(cmMakefile* mf)
-{
- this->cmGlobalVisualStudio8Generator::AddPlatformDefinitions(mf);
- mf->AddDefinition("CMAKE_FORCE_WIN64", "TRUE");
-}
diff --git a/Source/cmGlobalVisualStudio8Win64Generator.h b/Source/cmGlobalVisualStudio8Win64Generator.h
index 883b74a..4283c28 100644
--- a/Source/cmGlobalVisualStudio8Win64Generator.h
+++ b/Source/cmGlobalVisualStudio8Win64Generator.h
@@ -38,11 +38,5 @@ public:
/** Get the documentation entry for this generator. */
static void GetDocumentation(cmDocumentationEntry& entry);
-
- /**
- * Try to determine system infomation such as shared library
- * extension, pthreads, byte order etc.
- */
- virtual void AddPlatformDefinitions(cmMakefile *);
};
#endif
diff --git a/Source/cmGlobalVisualStudio9IA64Generator.cxx b/Source/cmGlobalVisualStudio9IA64Generator.cxx
index c56413b..6b0ed60 100644
--- a/Source/cmGlobalVisualStudio9IA64Generator.cxx
+++ b/Source/cmGlobalVisualStudio9IA64Generator.cxx
@@ -17,6 +17,7 @@
cmGlobalVisualStudio9IA64Generator::cmGlobalVisualStudio9IA64Generator()
{
this->ArchitectureId = "Itanium";
+ this->AdditionalPlatformDefinition = "CMAKE_FORCE_IA64";
}
//----------------------------------------------------------------------------
@@ -27,11 +28,3 @@ void cmGlobalVisualStudio9IA64Generator
entry.Brief = "Generates Visual Studio 9 2008 Itanium project files.";
entry.Full = "";
}
-
-//----------------------------------------------------------------------------
-void cmGlobalVisualStudio9IA64Generator
-::AddPlatformDefinitions(cmMakefile* mf)
-{
- cmGlobalVisualStudio9Generator::AddPlatformDefinitions(mf);
- mf->AddDefinition("CMAKE_FORCE_IA64", "TRUE");
-}
diff --git a/Source/cmGlobalVisualStudio9IA64Generator.h b/Source/cmGlobalVisualStudio9IA64Generator.h
index ac96241..0e5861a 100644
--- a/Source/cmGlobalVisualStudio9IA64Generator.h
+++ b/Source/cmGlobalVisualStudio9IA64Generator.h
@@ -38,11 +38,5 @@ public:
/** Get the documentation entry for this generator. */
static void GetDocumentation(cmDocumentationEntry& entry);
-
- /**
- * Try to determine system infomation such as shared library
- * extension, pthreads, byte order etc.
- */
- virtual void AddPlatformDefinitions(cmMakefile *);
};
#endif
diff --git a/Source/cmGlobalVisualStudio9Win64Generator.cxx b/Source/cmGlobalVisualStudio9Win64Generator.cxx
index f58cde5..37288b6 100644
--- a/Source/cmGlobalVisualStudio9Win64Generator.cxx
+++ b/Source/cmGlobalVisualStudio9Win64Generator.cxx
@@ -17,6 +17,7 @@
cmGlobalVisualStudio9Win64Generator::cmGlobalVisualStudio9Win64Generator()
{
this->ArchitectureId = "x64";
+ this->AdditionalPlatformDefinition = "CMAKE_FORCE_WIN64";
}
//----------------------------------------------------------------------------
@@ -27,11 +28,3 @@ void cmGlobalVisualStudio9Win64Generator
entry.Brief = "Generates Visual Studio 9 2008 Win64 project files.";
entry.Full = "";
}
-
-//----------------------------------------------------------------------------
-void cmGlobalVisualStudio9Win64Generator
-::AddPlatformDefinitions(cmMakefile* mf)
-{
- cmGlobalVisualStudio9Generator::AddPlatformDefinitions(mf);
- mf->AddDefinition("CMAKE_FORCE_WIN64", "TRUE");
-}
diff --git a/Source/cmGlobalVisualStudio9Win64Generator.h b/Source/cmGlobalVisualStudio9Win64Generator.h
index de7a182..713c402 100644
--- a/Source/cmGlobalVisualStudio9Win64Generator.h
+++ b/Source/cmGlobalVisualStudio9Win64Generator.h
@@ -38,11 +38,5 @@ public:
/** Get the documentation entry for this generator. */
static void GetDocumentation(cmDocumentationEntry& entry);
-
- /**
- * Try to determine system infomation such as shared library
- * extension, pthreads, byte order etc.
- */
- virtual void AddPlatformDefinitions(cmMakefile *);
};
#endif
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index ea6757d..a517351 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -22,6 +22,7 @@
cmGlobalVisualStudioGenerator::cmGlobalVisualStudioGenerator()
{
this->ArchitectureId = "X86";
+ this->AdditionalPlatformDefinition = NULL;
}
//----------------------------------------------------------------------------
@@ -493,6 +494,11 @@ void cmGlobalVisualStudioGenerator::AddPlatformDefinitions(cmMakefile* mf)
{
mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", this->ArchitectureId);
mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", this->ArchitectureId);
+
+ if(this->AdditionalPlatformDefinition)
+ {
+ mf->AddDefinition(this->AdditionalPlatformDefinition, "TRUE");
+ }
}
//----------------------------------------------------------------------------
diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h
index cebf7d7..7258e31 100644
--- a/Source/cmGlobalVisualStudioGenerator.h
+++ b/Source/cmGlobalVisualStudioGenerator.h
@@ -99,6 +99,7 @@ protected:
typedef std::map<cmTarget*, cmStdString> UtilityDependsMap;
UtilityDependsMap UtilityDepends;
const char* ArchitectureId;
+ const char* AdditionalPlatformDefinition;
private:
void ComputeTargetObjects(cmGeneratorTarget* gt) const;