inexorgame / vulkan-renderer

A new 3D game engine for Linux and Windows using C++20 and Vulkan API 1.3, in very early but ongoing development
https://inexor.org
MIT License
777 stars 34 forks source link

[cmake] Enable GCC/clang ANSI-colored terminal output for Ninja build tool #477

Closed maxrdz closed 2 years ago

maxrdz commented 2 years ago

This little CMake workaround forces ANSI-colored output from GCC/clang C++ compilers, even if you're using the Ninja build tool. By default there is no colored output using Ninja, because Ninja intercepts the terminal output from the compiler. Both compilers detect this and disable ANSI colors from their output. This workaround fixes that issue and helps make errors/warnings more readable.

maxrdz commented 2 years ago

hold on looking into why it didn't build. kinda yolo'd it when I sent in the PR, fixing it rn

maxrdz commented 2 years ago

just tested it, built on my end using -DCMAKE_BUILD_TYPE=Release.

maxrdz commented 2 years ago
CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find fmt: Found unsuitable version "None", but required is at
  least "5.3.0" (found None)

So this CMake error is not happening on my local machine. Might be a setup issue on the github workflows? The CMake error that's failing the builds on the worflows end doesn't seem to be related to my changes, afaik.

IceflowRE commented 2 years ago

Something wrong with spdlog build. We should update dependencies anyway.

Try to restart the build. Might be an temporary issue.

maxrdz commented 2 years ago

Opened #479 to hopefully resolve the CI workflow issues!

maxrdz commented 2 years ago

CI builds passed! thanks @IceflowRE ans @yeetari