You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure how this would work, or if it's technically feasible, but I'm going to describe my issue through a hypothetical project.
Let's assume we have projects A and B. Project A depends on project B and pulls it in with CPM.
Both projects use Format.cmake; project A does not allow Cmake formatting, but project B does have that enabled.
Right now, when running "check-format" from project A, it will always fail because Format.cmake thinks that the CMakeLists files need to be formated even though FORMAT_SKIP_CMAKE is set to YES in project A.
Is there any way to work around this?
The text was updated successfully, but these errors were encountered:
Currently I don't think per-project formatting rules are supported.
The recommended usage is to add Format.cmake not as a direct dependency of B but as a dependency of a subproject, e.g. the test suite. That way the dependency will not be included by default, but only when explicitly building the test cases. You can see an example of this in the ModernCppStarter.
And yes, I've seen that strategy already in your ModernCppStarter, but the issue would still remain if we want to disable CMake formatting in a downstream project if it's enabled upstream.
I'm not sure how this would work, or if it's technically feasible, but I'm going to describe my issue through a hypothetical project.
Let's assume we have projects A and B. Project A depends on project B and pulls it in with
CPM
.Both projects use
Format.cmake
; project A does not allow Cmake formatting, but project B does have that enabled.Right now, when running "check-format" from project A, it will always fail because
Format.cmake
thinks that the CMakeLists files need to be formated even thoughFORMAT_SKIP_CMAKE
is set toYES
in project A.Is there any way to work around this?
The text was updated successfully, but these errors were encountered: