[Cmake-commits] CMake branch, next, updated. v2.8.9-368-gdc4345a
Peter Kuemmel
syntheticpp at gmx.net
Wed Sep 5 08:56:17 EDT 2012
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via dc4345a1a236ecd4ad95980507ca825c9abc9327 (commit)
via 7b2bf28e183b5eacc22fe3030f0439853746f0bd (commit)
from adcef9697b33c0e574b32e7a1a4f7579c7ec9524 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dc4345a1a236ecd4ad95980507ca825c9abc9327
commit dc4345a1a236ecd4ad95980507ca825c9abc9327
Merge: adcef96 7b2bf28
Author: Peter Kuemmel <syntheticpp at gmx.net>
AuthorDate: Wed Sep 5 08:56:16 2012 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Sep 5 08:56:16 2012 -0400
Merge topic 'IsSourceFileTryCompile' into next
7b2bf28 Ninja: suppress cmcldeps only for source file signature try_compiles
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7b2bf28e183b5eacc22fe3030f0439853746f0bd
commit 7b2bf28e183b5eacc22fe3030f0439853746f0bd
Author: Peter Kümmel <syntheticpp at gmx.net>
AuthorDate: Wed Sep 5 01:44:11 2012 +0200
Commit: Peter Kümmel <syntheticpp at gmx.net>
CommitDate: Wed Sep 5 14:38:49 2012 +0200
Ninja: suppress cmcldeps only for source file signature try_compiles
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 7b6c450..9a9c1c8 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() )
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 8a0088b..74c8039 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -128,6 +128,8 @@ public:
const std::vector<std::string> *cmakeArgs,
std::string *output);
+ bool GetIsSourceFileTryCompile() const;
+
/**
* Specify the makefile generator. This is platform/compiler
* dependent, although the interface is through a generic
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 918f582..4cc23ca 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -355,8 +355,7 @@ cmNinjaTargetGenerator
if (lang == "C" || lang == "CXX" || lang == "RC")
{
clDepsBinary = mf->GetSafeDefinition("CMAKE_CMCLDEPS_EXECUTABLE");
- if (!clDepsBinary.empty() &&
- !this->GetGlobalGenerator()->GetCMakeInstance()->GetIsInTryCompile())
+ if (!clDepsBinary.empty() && !mf->GetIsSourceFileTryCompile())
{
clShowPrefix = mf->GetSafeDefinition("CMAKE_CL_SHOWINCLUDE_PREFIX");
clBinary = mf->GetDefinition("CMAKE_C_COMPILER") ?
-----------------------------------------------------------------------
Summary of changes:
Source/cmMakefile.cxx | 12 ++++++++++++
Source/cmMakefile.h | 2 ++
Source/cmNinjaTargetGenerator.cxx | 3 +--
3 files changed, 15 insertions(+), 2 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list