cellml / libcellml

Repository for libCellML development.
https://libcellml.org
Apache License 2.0
16 stars 21 forks source link

CMake: make sure that ClangFormat is of the expected version #946

Closed agarny closed 3 years ago

agarny commented 3 years ago

On Windows, I have (through MSVC) ClangFormat 6 installed and upon configuring libCellML, I am allowed to format the code (i.e. do something like ninja format_code) and this results in ClangFormat complaining about the options in our .clang-format file. This is understandable since we expect ClangFormat 11+.

So, we should only create the format_code target if ClangFormat 11+ is available.

nickerso commented 3 years ago

duplicate of #356

nickerso commented 3 years ago

also worth noting the discussion on #411 whereby Visual Studio does magic based on the presence of a .clang-format file regardless of the target. Is that still applicable?

agarny commented 3 years ago

duplicate of #356

Hmm, indeed.

also worth noting the discussion on #411 whereby Visual Studio does magic based on the presence of a .clang-format file regardless of the target. Is that still applicable?

No idea, I don't use VS...