diff options
author | Brad King <brad.king@kitware.com> | 2021-05-06 14:11:25 +0000 |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-05-06 10:11:33 -0400 |
commit | 1f795ee40e8e673b8d358cb7ae2b96d69335d158 (patch) | |
tree | 3f43f3a1564f180d813b064086d513dd61784406 /Source | |
parent | cc4d6d208599f682f313b7c6888419f610176334 (diff) | |
parent | 4b73f113ba546dcfcfd3aa8e95e03ac479c9c2cb (diff) | |
download | cmake-1f795ee40e8e673b8d358cb7ae2b96d69335d158.tar.gz |
Merge topic 'update-kwsys'
4b73f113ba Merge branch 'upstream-KWSys' into update-kwsys
04c6e736f6 KWSys 2021-05-05 (e9ca4104)
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6088
Diffstat (limited to 'Source')
-rw-r--r-- | Source/kwsys/CMakeLists.txt | 10 | ||||
-rw-r--r-- | Source/kwsys/Terminal.c | 11 |
2 files changed, 19 insertions, 2 deletions
diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt index bf8543ec72..ef615b3fee 100644 --- a/Source/kwsys/CMakeLists.txt +++ b/Source/kwsys/CMakeLists.txt @@ -98,6 +98,16 @@ foreach(p endif() endforeach() +# Some configure checks depend upon the deployment target. Clear checks when +# the deployment target changes. +if (APPLE) + if (NOT CMAKE_OSX_DEPLOYMENT_TARGET STREQUAL KWSYS_LAST_OSX_DEPLOYMENT_TARGET) + unset(KWSYS_CXX_HAS_UTIMENSAT CACHE) + endif () + set(KWSYS_LAST_OSX_DEPLOYMENT_TARGET "${CMAKE_OSX_DEPLOYMENT_TARGET}" + CACHE INTERNAL "remember the last deployment target to trigger configure rechecks") +endif () + #----------------------------------------------------------------------------- # If a namespace is not specified, use "kwsys" and enable testing. # This should be the case only when kwsys is not included inside diff --git a/Source/kwsys/Terminal.c b/Source/kwsys/Terminal.c index 9409d1b764..57a68bfdbf 100644 --- a/Source/kwsys/Terminal.c +++ b/Source/kwsys/Terminal.c @@ -167,12 +167,19 @@ static int kwsysTerminalStreamIsVT100(FILE* stream, int default_vt100, /* Force color according to http://bixense.com/clicolors/ convention. */ { const char* clicolor_force = getenv("CLICOLOR_FORCE"); - if (clicolor_force && *clicolor_force && - strcmp(clicolor_force, "0") != 0) { + if (clicolor_force && strcmp(clicolor_force, "0") != 0) { return 1; } } + /* Disable color according to http://bixense.com/clicolors/ convention. */ + { + const char* clicolor = getenv("CLICOLOR"); + if (clicolor && strcmp(clicolor, "0") == 0) { + return 0; + } + } + /* GNU make 4.1+ may tell us that its output is destined for a TTY. */ { const char* termout = getenv("MAKE_TERMOUT"); |