summaryrefslogtreecommitdiff
path: root/Source/cmLocalCommonGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-07-08 11:27:22 -0400
committerBrad King <brad.king@kitware.com>2015-07-09 09:50:06 -0400
commit9d41f6d87b28c46d8a6d52f2de91976819e6b4d0 (patch)
treed158bddb7291f864ef8c3d3dd5cc842f1479bc2b /Source/cmLocalCommonGenerator.cxx
parenta4a2518dd47bd37f2204a0209c2eeb632d191d1e (diff)
downloadcmake-9d41f6d87b28c46d8a6d52f2de91976819e6b4d0.tar.gz
cmLocalCommonGenerator: Adopt ConfigName member
De-duplicate the member from the local Makefile and Ninja generators.
Diffstat (limited to 'Source/cmLocalCommonGenerator.cxx')
-rw-r--r--Source/cmLocalCommonGenerator.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/Source/cmLocalCommonGenerator.cxx b/Source/cmLocalCommonGenerator.cxx
index 0b266f8ffd..45834467f3 100644
--- a/Source/cmLocalCommonGenerator.cxx
+++ b/Source/cmLocalCommonGenerator.cxx
@@ -11,6 +11,8 @@
============================================================================*/
#include "cmLocalCommonGenerator.h"
+#include "cmMakefile.h"
+
cmLocalCommonGenerator::cmLocalCommonGenerator(cmGlobalGenerator* gg,
cmLocalGenerator* parent,
cmState::Snapshot snapshot):
@@ -21,3 +23,18 @@ cmLocalCommonGenerator::cmLocalCommonGenerator(cmGlobalGenerator* gg,
cmLocalCommonGenerator::~cmLocalCommonGenerator()
{
}
+
+void cmLocalCommonGenerator::SetConfigName()
+{
+ // Store the configuration name that will be generated.
+ if(const char* config = this->Makefile->GetDefinition("CMAKE_BUILD_TYPE"))
+ {
+ // Use the build type given by the user.
+ this->ConfigName = config;
+ }
+ else
+ {
+ // No configuration type given.
+ this->ConfigName = "";
+ }
+}