To format a CMakeLists.txt file using Clang-Format, follow these steps:
clang-format -style=file -i CMakeLists.txt
This command applies the formatting style defined in the .clang-format file to the CMakeLists.txt file.
(Optional) Modify the formatting style in the .clang-format file to match your preferred coding style.
Run the above command again to apply the updated style to the CMakeLists.txt file.
Asked: 2021-10-13 11:00:00 +0000
Seen: 9 times
Last updated: Jan 11 '23