Skip to content

Commit 997e778

Browse files
committed
Formatted CMake files with auto-formatter
CI/CD pipeline pointed out the presence of improperly formatted files.
1 parent 457fb02 commit 997e778

File tree

5 files changed

+16
-20
lines changed

5 files changed

+16
-20
lines changed

code-coverage.cmake

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,8 @@ function(target_code_coverage TARGET_NAME)
367367
endif()
368368

369369
add_custom_command(
370-
TARGET ccov-${TARGET_NAME} POST_BUILD
370+
TARGET ccov-${TARGET_NAME}
371+
POST_BUILD
371372
COMMAND ;
372373
COMMENT
373374
"Open ${CMAKE_COVERAGE_OUTPUT_DIRECTORY}/${TARGET_NAME}/index.html in your browser to view the coverage report."
@@ -524,7 +525,8 @@ function(add_code_coverage_all_targets)
524525
endif()
525526

526527
add_custom_command(
527-
TARGET ccov-all POST_BUILD
528+
TARGET ccov-all
529+
POST_BUILD
528530
COMMAND ;
529531
COMMENT
530532
"Open ${CMAKE_COVERAGE_OUTPUT_DIRECTORY}/all-merged/index.html in your browser to view the coverage report."

dependency-graph.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ function(gen_dep_graph OUTPUT_TYPE)
8787
${OUT_DIR}/${TARGET_NAME}.${OUTPUT_TYPE})
8888

8989
add_custom_command(
90-
TARGET ${TARGET_NAME} POST_BUILD
90+
TARGET ${TARGET_NAME}
91+
POST_BUILD
9192
COMMAND ;
9293
COMMENT
9394
"Dependency graph for ${TARGET_NAME} generated and located at ${OUT_DIR}/${TARGET_NAME}.${OUTPUT_TYPE}"

example/all/CMakeLists.txt

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@ include(dependency-graph)
1515
cxx_11()
1616

1717
# Tools
18-
file(GLOB_RECURSE
19-
FFILES
20-
*.[hc]
21-
*.[hc]pp)
18+
file(GLOB_RECURSE FFILES *.[hc] *.[hc]pp)
2219
clang_format(format ${FFILES})
2320

2421
cmake_format(cmake-format ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
@@ -29,10 +26,7 @@ include_what_you_use(-Xiwyu)
2926
cppcheck(
3027
--enable=warning,performance,portability,missingInclude
3128
--template="[{severity}][{id}] {message} {callstack} \(On {file}:{line}\)"
32-
--suppress=missingIncludeSystem
33-
--quiet
34-
--verbose
35-
--force)
29+
--suppress=missingIncludeSystem --quiet --verbose --force)
3630

3731
enable_testing()
3832

example/code-coverage-all/CMakeLists.txt

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,27 @@ include(code-coverage)
1010
include(c++-standards)
1111
cxx_11()
1212

13-
# This introduces the 'ccov-all' targets
14-
# Also excludes the main file via a regex
15-
add_code_coverage_all_targets(EXCLUDE coverage.main.cpp)
13+
# This introduces the 'ccov-all' targets Also excludes the main file via a regex
14+
add_code_coverage_all_targets(EXCLUDE coverage.main.cpp)
1615

1716
# The library
1817
add_library(lib ../src/coverage.cpp)
1918

2019
# Instruments the library
21-
target_code_coverage(lib AUTO ALL)
20+
target_code_coverage(lib AUTO ALL)
2221

2322
# The executable
2423
add_executable(main ../src/coverage.main.cpp)
2524
target_link_libraries(main PUBLIC lib)
2625

27-
# Adds the executable to the 'ccov' and 'ccov-all' targets
28-
# and excludes the file itself via regex
26+
# Adds the executable to the 'ccov' and 'ccov-all' targets and excludes the file
27+
# itself via regex
2928
target_code_coverage(main AUTO ALL EXTERNAL)
3029

3130
# The second executable
3231
add_executable(main2 ../src/coverage.main.cpp)
3332
target_link_libraries(main2 PUBLIC lib)
3433

35-
# Adds the executable to the 'ccov' and 'ccov-all' targets
36-
# and excludes the file itself via regex
34+
# Adds the executable to the 'ccov' and 'ccov-all' targets and excludes the file
35+
# itself via regex
3736
target_code_coverage(main2 AUTO ALL EXTERNAL)

example/code-coverage-target/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ add_executable(main ../src/coverage.main.cpp)
2121
target_link_libraries(main PUBLIC lib)
2222

2323
# Adds the executable to the 'ccov' target
24-
target_code_coverage(main AUTO EXTERNAL)
24+
target_code_coverage(main AUTO EXTERNAL)

0 commit comments

Comments
 (0)