Coding - Add clang-format configuration #246

New clang-format configuration added to determinate code style.
The default version is 16.
Extend CMake to copy config file to build root.
Method/function separator deprecation:
  In case if function/method has declaration in header,
    definition must not have related comment.
    Only //==== [100 chars] ==== is allowed as a not connected
    separator.
  In case if function/method has  NOT declaration in header,
    definition must have related comment in doxygen style:
    // Descriptions
    // @param
    // @return
    Or just function/method separator:
    //==== [100 chars] ====
  All old separators with no description must be replaced to
    //==== [100 chars] ====
This commit is contained in:
dpasukhi
2025-01-06 12:35:56 +00:00
parent e9855c9335
commit fe1382f3c2
49 changed files with 5690 additions and 5029 deletions

View File

@@ -723,6 +723,9 @@ endif()
# the name of the project
project (OCCT)
# copying clang-format file to the root of the project
file(COPY ${CMAKE_SOURCE_DIR}/.clang-format DESTINATION ${CMAKE_SOURCE_DIR})
# Get all used variables: OS_WITH_BIT, COMPILER
OCCT_MAKE_OS_WITH_BITNESS()
OCCT_MAKE_COMPILER_SHORT_NAME()