Bug 282803 - Mk/Uses/cmake.mk: Add CLICOLOR=0 when CMAKE_NOCOLOR is set
Summary: Mk/Uses/cmake.mk: Add CLICOLOR=0 when CMAKE_NOCOLOR is set
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Port Management Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-16 23:12 UTC by Thibault Payet
Modified: 2024-11-17 00:13 UTC (History)
3 users (show)

See Also:


Attachments
git format-patch (741 bytes, patch)
2024-11-16 23:12 UTC, Thibault Payet
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thibault Payet 2024-11-16 23:12:33 UTC
Created attachment 255225 [details]
git format-patch

Currently, when CMAKE_NOCOLOR is set, cmake will still complain about color being output if for instance there is no CMakeList.txt present in the working directory.

cmake will not output color if the CLICOLOR environment variable is set to 0.
Comment 1 Alexander Ziaee freebsd_triage 2024-11-16 23:20:45 UTC
Does this option render the line above it redundant?
Comment 2 Alexander Ziaee freebsd_triage 2024-11-16 23:27:20 UTC
I tested it without the above (I think redundant) line, and this added line does fix my issue where cmake outputs a yellow warning if it can't find the CMakeList, which is incompatible with light terminals.
Comment 3 Thibault Payet 2024-11-16 23:53:03 UTC
(In reply to Alexander Ziaee from comment #1)
With a quick glance at cmake code, it seems that CLICOLOR=0 does not impact how cmake will generate the Makefile (and thus add colors to it). So setting CMAKE_COLOR_MAKEFILE is still required.
Comment 4 Alexander Ziaee freebsd_triage 2024-11-17 00:13:04 UTC
Thanks!