Question: Colored output on Windows powershell with CTest
- Dominant language
- C++
- Stars
- 39.5k
- Forks
- 10.9k
- Avg merge
- 6d 13h
- Merged PRs (30d)
- 1
Description
I'm using CMake and CTest to build and run my tests.
On Linux I can produce color googletest output with CTest, like this:
`GTEST_COLOR=1 ctest -V`
On Windows I tried something similar in powershell:
`$Env:GTEST_COLOR=1; ctest -V`
**However the output is still not colored.** How can I achieve the desired colored output?
I'm using Googletest 1.10.0 and CMake 3.17.3
Contributor guide
Research direction
Start by reproducing the issue with Googletest 1.10.0 and CMake 3.17.3 on Windows PowerShell using `$Env:GTEST_COLOR=1; ctest -V`. Trace how the environment setting and terminal color handling interact, then verify that the desired output is colored or document the confirmed workaround or limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp, powershell
- Domain
- build-system, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 45/100