summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalUnixMakefileGenerator3.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-07-21 15:58:43 (GMT)
committerBrad King <brad.king@kitware.com>2009-07-21 15:58:43 (GMT)
commit04b834f1b462e32d27c18ef1d5c6c1cc6ec1363f (patch)
treef24faa956535aa523c7e1c64a72b58d83e6089d3 /Source/cmLocalUnixMakefileGenerator3.cxx
parent924dd34451d95be600cbc215db4b8b3cdd42eef9 (diff)
downloadCMake-04b834f1b462e32d27c18ef1d5c6c1cc6ec1363f.zip
CMake-04b834f1b462e32d27c18ef1d5c6c1cc6ec1363f.tar.gz
CMake-04b834f1b462e32d27c18ef1d5c6c1cc6ec1363f.tar.bz2
BUG: Disable color makefile inside try-compile
Generated makefiles for try-compile projects should never use color output. On MSYS the color escapes end up in the try-compile output text because there is no way to identify whether the output is going to a color-capable terminal. Instead we should just always skip color for try-compile projects.
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator3.cxx')
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 923e43f..2c365ed 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -120,7 +120,10 @@ void cmLocalUnixMakefileGenerator3::Generate()
// Record whether some options are enabled to avoid checking many
// times later.
- this->ColorMakefile = this->Makefile->IsOn("CMAKE_COLOR_MAKEFILE");
+ if(!this->GetGlobalGenerator()->GetCMakeInstance()->GetIsInTryCompile())
+ {
+ this->ColorMakefile = this->Makefile->IsOn("CMAKE_COLOR_MAKEFILE");
+ }
this->SkipPreprocessedSourceRules =
this->Makefile->IsOn("CMAKE_SKIP_PREPROCESSED_SOURCE_RULES");
this->SkipAssemblySourceRules =