summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-10-08 18:54:19 (GMT)
committerBrad King <brad.king@kitware.com>2009-10-08 18:54:19 (GMT)
commit24bf97440fc8730860620c65d9dfd487ca68c69d (patch)
tree59177df5ac1ccf5d64aaa83edbb158cfc1d58ab8 /Source
parentdfa3b4f145958b8c58f4bc917e985cfa5d41355c (diff)
downloadCMake-24bf97440fc8730860620c65d9dfd487ca68c69d.zip
CMake-24bf97440fc8730860620c65d9dfd487ca68c69d.tar.gz
CMake-24bf97440fc8730860620c65d9dfd487ca68c69d.tar.bz2
REALLY fix color check for dependency scanning
The commit "Really fix color check for dependency scanning" disabled color unless "make COLOR=ON" is specified. This restores the previous default behavior when CMAKE_COLOR_MAKEFILE is ON while retaining the previous commit's fix. See issue #9680.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmake.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index d299544..48a0e83 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -1493,11 +1493,12 @@ int cmake::ExecuteCMakeCommand(std::vector<std::string>& args)
startOutDir = args[6];
depInfo = args[7];
if(args.size() >= 9 &&
- args[8].length() > 8 &&
+ args[8].length() >= 8 &&
args[8].substr(0, 8) == "--color=")
{
// Enable or disable color based on the switch value.
- color = cmSystemTools::IsOn(args[8].substr(8).c_str());
+ color = (args[8].size() == 8 ||
+ cmSystemTools::IsOn(args[8].substr(8).c_str()));
}
}
else