Per legacy, the else() and endif() commands admit an optional argument. If used, it must be a verbatim repeat of the argument of the opening if command.
So there are two styles for endif()
if (foo)
endif ()
if (foo)
endif (foo)
Similar issues exists for endforeach(), endfunction, endmacro
Accoridng to CMake doc
Per legacy, the else() and endif() commands admit an optional argument. If used, it must be a verbatim repeat of the argument of the opening if command.
So there are two styles for
endif()
Similar issues exists for
endforeach()
,endfunction
,endmacro
Can cmake format automatically handle this?
Add option to control the style of
endif()
endif()
if()