Skip to content

Commit

Permalink
refactor(cmake): run cmake-format
Browse files Browse the repository at this point in the history
  • Loading branch information
Curve authored and kris-jusiak committed Nov 10, 2024
1 parent ed0d783 commit caaefa4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@ endif()

add_custom_target(style)
add_custom_command(
TARGET style POST_BUILD COMMAND find ${CMAKE_CURRENT_LIST_DIR}/benchmark ${CMAKE_CURRENT_LIST_DIR}/example ${CMAKE_CURRENT_LIST_DIR}/include
${CMAKE_CURRENT_LIST_DIR}/test -iname "*.hpp" -or -iname "*.cpp" | xargs clang-format -i
TARGET style
POST_BUILD
COMMAND find ${CMAKE_CURRENT_LIST_DIR}/benchmark ${CMAKE_CURRENT_LIST_DIR}/example ${CMAKE_CURRENT_LIST_DIR}/include
${CMAKE_CURRENT_LIST_DIR}/test -iname "*.hpp" -or -iname "*.cpp" | xargs clang-format -i
)

if(BOOST_UT_ENABLE_COVERAGE)
Expand Down
6 changes: 5 additions & 1 deletion cmake/AddCustomCommandOrTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ function(ut_add_custom_command_or_test)
target_link_libraries(${PARSE_TARGET} PRIVATE Boost::ut)

if(BOOST_UT_ENABLE_RUN_AFTER_BUILD)
add_custom_command(TARGET ${PARSE_TARGET} POST_BUILD COMMAND ${PARSE_COMMAND})
add_custom_command(
TARGET ${PARSE_TARGET}
POST_BUILD
COMMAND ${PARSE_COMMAND}
)
else()
add_test(NAME ${PARSE_TARGET} COMMAND ${PARSE_COMMAND})
endif()
Expand Down

0 comments on commit caaefa4

Please sign in to comment.