Skip to content

Commit 3b7d42e

Browse files
jktjktmichalvasko
authored andcommitted
build: format-check: invoke make in a portable way
I've added `uncrustify` to my build environment, and as a result the build started failing for me because it tried to invoke `make format-check`. I use the ninja generator for CMake, which means that there's no `Makefile` generated in my build directory. Fix this by invoking the relevant target via CMake.
1 parent b3af368 commit 3b7d42e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ add_test(NAME headers
44

55
# format
66
if (${SOURCE_FORMAT_ENABLED})
7-
add_test(NAME format WORKING_DIRECTORY ${CMAKE_BINARY_DIR} COMMAND make format-check)
7+
add_test(NAME format WORKING_DIRECTORY ${CMAKE_BINARY_DIR} COMMAND cmake --build ${CMAKE_BINARY_DIR} --target format-check)
88
endif()
99

1010
# list of all the tests in each directory

0 commit comments

Comments
 (0)