summaryrefslogtreecommitdiff
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorAnas Nashif <anas.nashif@intel.com>2013-02-14 02:21:12 (GMT)
committerAnas Nashif <anas.nashif@intel.com>2013-02-14 02:21:12 (GMT)
commitef8aa19c33e83ff019595fd7f8fdc29c35c336a3 (patch)
tree6501b44707b5c6a88fa5f817adee1a3ffcb0012d /Source/cmMakefile.cxx
parent035c7fabc3b82cbc9a346c11abe2e9462b4c0379 (diff)
downloadcmake-ef8aa19c33e83ff019595fd7f8fdc29c35c336a3.zip
cmake-ef8aa19c33e83ff019595fd7f8fdc29c35c336a3.tar.gz
cmake-ef8aa19c33e83ff019595fd7f8fdc29c35c336a3.tar.bz2
Imported Upstream version 2.8.10.2upstream/2.8.10.2
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx18
1 files changed, 18 insertions, 0 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 7b6c450..f067da4 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -46,6 +46,7 @@ public:
std::stack<cmDefinitions, std::list<cmDefinitions> > VarStack;
std::stack<std::set<cmStdString> > VarInitStack;
std::stack<std::set<cmStdString> > VarUsageStack;
+ bool IsSourceFileTryCompile;
};
// default is not to be building executables
@@ -56,6 +57,7 @@ cmMakefile::cmMakefile(): Internal(new Internals)
this->Internal->VarStack.push(defs);
this->Internal->VarInitStack.push(globalKeys);
this->Internal->VarUsageStack.push(globalKeys);
+ this->Internal->IsSourceFileTryCompile = false;
// Initialize these first since AddDefaultDefinitions calls AddDefinition
this->WarnUnused = false;
@@ -2912,6 +2914,7 @@ int cmMakefile::TryCompile(const char *srcdir, const char *bindir,
const std::vector<std::string> *cmakeArgs,
std::string *output)
{
+ this->Internal->IsSourceFileTryCompile = fast;
// does the binary directory exist ? If not create it...
if (!cmSystemTools::FileIsDirectory(bindir))
{
@@ -2937,6 +2940,7 @@ int cmMakefile::TryCompile(const char *srcdir, const char *bindir,
"Internal CMake error, TryCompile bad GlobalGenerator");
// return to the original directory
cmSystemTools::ChangeDirectory(cwd.c_str());
+ this->Internal->IsSourceFileTryCompile = false;
return 1;
}
cm.SetGlobalGenerator(gg);
@@ -3009,6 +3013,7 @@ int cmMakefile::TryCompile(const char *srcdir, const char *bindir,
"Internal CMake error, TryCompile configure of cmake failed");
// return to the original directory
cmSystemTools::ChangeDirectory(cwd.c_str());
+ this->Internal->IsSourceFileTryCompile = false;
return 1;
}
@@ -3018,6 +3023,7 @@ int cmMakefile::TryCompile(const char *srcdir, const char *bindir,
"Internal CMake error, TryCompile generation of cmake failed");
// return to the original directory
cmSystemTools::ChangeDirectory(cwd.c_str());
+ this->Internal->IsSourceFileTryCompile = false;
return 1;
}
@@ -3031,9 +3037,15 @@ int cmMakefile::TryCompile(const char *srcdir, const char *bindir,
this);
cmSystemTools::ChangeDirectory(cwd.c_str());
+ this->Internal->IsSourceFileTryCompile = false;
return ret;
}
+bool cmMakefile::GetIsSourceFileTryCompile() const
+{
+ return this->Internal->IsSourceFileTryCompile;
+}
+
cmake *cmMakefile::GetCMakeInstance() const
{
if ( this->LocalGenerator && this->LocalGenerator->GetGlobalGenerator() )
@@ -3972,6 +3984,12 @@ cmTarget* cmMakefile::FindTargetToUse(const char* name)
return this->LocalGenerator->GetGlobalGenerator()->FindTarget(0, name);
}
+cmGeneratorTarget* cmMakefile::FindGeneratorTargetToUse(const char* name)
+{
+ cmTarget *t = this->FindTargetToUse(name);
+ return this->LocalGenerator->GetGlobalGenerator()->GetGeneratorTarget(t);
+}
+
//----------------------------------------------------------------------------
bool cmMakefile::EnforceUniqueName(std::string const& name, std::string& msg,
bool isCustom)