Skip to content

Commit 8caa7b9

Browse files
pks-tgitster
authored andcommitted
cmake: use verbatim arguments when invoking clar commands
Pass the VERBATIM option to `add_custom_command()`. Like this, all arguments to the commands will be escaped properly for the build tool so that the invoked command receives each argument unchanged. Signed-off-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 8839dcc commit 8caa7b9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

contrib/buildsystems/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,13 +1009,15 @@ add_custom_command(OUTPUT "${CMAKE_BINARY_DIR}/t/unit-tests/clar-decls.h"
10091009
"${CMAKE_BINARY_DIR}/t/unit-tests/clar-decls.h"
10101010
${clar_test_SUITES}
10111011
DEPENDS ${CMAKE_SOURCE_DIR}/t/unit-tests/generate-clar-decls.sh
1012-
${clar_test_SUITES})
1012+
${clar_test_SUITES}
1013+
VERBATIM)
10131014
add_custom_command(OUTPUT "${CMAKE_BINARY_DIR}/t/unit-tests/clar.suite"
10141015
COMMAND ${SH_EXE} "${CMAKE_SOURCE_DIR}/t/unit-tests/generate-clar-suites.sh"
10151016
"${CMAKE_BINARY_DIR}/t/unit-tests/clar-decls.h"
10161017
"${CMAKE_BINARY_DIR}/t/unit-tests/clar.suite"
10171018
DEPENDS "${CMAKE_SOURCE_DIR}/t/unit-tests/generate-clar-suites.sh"
1018-
"${CMAKE_BINARY_DIR}/t/unit-tests/clar-decls.h")
1019+
"${CMAKE_BINARY_DIR}/t/unit-tests/clar-decls.h"
1020+
VERBATIM)
10191021

10201022
add_library(unit-tests-lib ${clar_test_SUITES}
10211023
"${CMAKE_SOURCE_DIR}/t/unit-tests/clar/clar.c"

0 commit comments

Comments
 (0)