Closed htfy96 closed 4 hours ago
GHA already provides Clang on the Ubuntu image: https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md
I'm not sure what I need to change here. You have to know your tools at the end of the day and I believe the common usecase is already satisfied by the generated projects. If you have needs beyond what is provided, you only have to understand the corresponding tools without cmake-init getting in your way, as that is one of my goals with this project generator, after which you can adjust things accordingly.
Writing any kind of module for this would also be pointless. You should strive to write LESS code when it comes to CMake, especially when such a requirement can be trivially satisfied in a static environment such as CI. You just parameterize the build in CI to meet your requirements.
When
CMAKE_CXX_CLANG_TIDY
is set, cmake passes all configured compilation flags toclang-tidy
. However, if the project is configured withCMAKE_CXX_COMPILER=gcc
, the compilation flags might not work for clang-tidy, leading to weird clang-tidy error.It would be best if
ci.yml
could installl clang and set CMAKE_CXX_COMPILER=clang++ when runningci
preset. A module that prints out a warning message whenCMAKE_CXX_CLANG_TIDY
is set but compiler is not clang(++) will also be helpful