cmake: move OUTPUT argument in the add_custom_command() line

For greppability.

Closes #17658
This commit is contained in:
Viktor Szakats 2025-06-17 21:08:02 +02:00
parent a282d89a8a
commit eb01ac3fc8
No known key found for this signature in database
GPG Key ID: B5ABD165E2AEF201
6 changed files with 8 additions and 16 deletions

View File

@ -30,8 +30,7 @@ set(_curl_definitions "")
if(ENABLE_CURL_MANUAL AND HAVE_MANUAL_TOOLS)
list(APPEND _curl_definitions "USE_MANUAL")
add_custom_command(
OUTPUT "tool_hugehelp.c"
add_custom_command(OUTPUT "tool_hugehelp.c"
COMMAND ${CMAKE_COMMAND} -E echo "#include \"tool_setup.h\"" > "tool_hugehelp.c"
COMMAND ${CMAKE_COMMAND} -E echo "/* !checksrc! disable COPYRIGHT all */" >> "tool_hugehelp.c"
COMMAND ${CMAKE_COMMAND} -E echo "/* !checksrc! disable INCLUDEDUP all */" >> "tool_hugehelp.c"
@ -54,8 +53,7 @@ endif()
if(CURL_CA_EMBED_SET)
if(PERL_FOUND)
list(APPEND _curl_definitions "CURL_CA_EMBED")
add_custom_command(
OUTPUT "tool_ca_embed.c"
add_custom_command(OUTPUT "tool_ca_embed.c"
COMMAND "${PERL_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/mk-file-embed.pl" --var curl_ca_embed
< "${CURL_CA_EMBED}" > "tool_ca_embed.c"
DEPENDS

View File

@ -31,8 +31,7 @@ if(LIB_SELECTED STREQUAL LIB_SHARED)
list(APPEND _bundle_extra ${CURLX_SRCS}) # Not exported from the libcurl shared build. Build a copy.
endif()
add_custom_command(
OUTPUT "${BUNDLE_SRC}"
add_custom_command(OUTPUT "${BUNDLE_SRC}"
COMMAND ${PERL_EXECUTABLE} "${PROJECT_SOURCE_DIR}/scripts/mk-unity.pl"
--include ${_bundle_extra} --test ${TESTFILES}
${CURL_MK_UNITY_OPTION} --srcdir "${CMAKE_CURRENT_SOURCE_DIR}" > "${BUNDLE_SRC}"

View File

@ -31,16 +31,14 @@ if(LIB_SELECTED STREQUAL LIB_SHARED)
list(APPEND _bundle_extra ${CURLX_SRCS}) # Not exported from the libcurl shared build. Build a copy.
endif()
add_custom_command(
OUTPUT "lib1521.c"
add_custom_command(OUTPUT "lib1521.c"
COMMAND ${PERL_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/mk-lib1521.pl" < "${PROJECT_SOURCE_DIR}/include/curl/curl.h" "lib1521.c"
DEPENDS
"${CMAKE_CURRENT_SOURCE_DIR}/mk-lib1521.pl"
"${PROJECT_SOURCE_DIR}/include/curl/curl.h"
VERBATIM)
add_custom_command(
OUTPUT "${BUNDLE_SRC}"
add_custom_command(OUTPUT "${BUNDLE_SRC}"
COMMAND ${PERL_EXECUTABLE} "${PROJECT_SOURCE_DIR}/scripts/mk-unity.pl"
--include ${UTILS} ${_bundle_extra} --test ${TESTFILES} "lib1521.c"
${CURL_MK_UNITY_OPTION} --srcdir "${CMAKE_CURRENT_SOURCE_DIR}" > "${BUNDLE_SRC}"

View File

@ -26,8 +26,7 @@
curl_transform_makefile_inc("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")
include("${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")
add_custom_command(
OUTPUT "${BUNDLE_SRC}"
add_custom_command(OUTPUT "${BUNDLE_SRC}"
COMMAND ${PERL_EXECUTABLE} "${PROJECT_SOURCE_DIR}/scripts/mk-unity.pl"
--include ${UTILS} ${CURLX_SRCS} --test ${TESTFILES}
${CURL_MK_UNITY_OPTION} --srcdir "${CMAKE_CURRENT_SOURCE_DIR}" > "${BUNDLE_SRC}"

View File

@ -26,8 +26,7 @@
curl_transform_makefile_inc("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")
include("${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")
add_custom_command(
OUTPUT "${BUNDLE_SRC}"
add_custom_command(OUTPUT "${BUNDLE_SRC}"
COMMAND ${PERL_EXECUTABLE} "${PROJECT_SOURCE_DIR}/scripts/mk-unity.pl" --test ${TESTFILES}
${CURL_MK_UNITY_OPTION} --srcdir "${CMAKE_CURRENT_SOURCE_DIR}" > "${BUNDLE_SRC}"
DEPENDS

View File

@ -26,8 +26,7 @@
curl_transform_makefile_inc("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")
include("${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")
add_custom_command(
OUTPUT "${BUNDLE_SRC}"
add_custom_command(OUTPUT "${BUNDLE_SRC}"
COMMAND ${PERL_EXECUTABLE} "${PROJECT_SOURCE_DIR}/scripts/mk-unity.pl" --test ${TESTFILES}
${CURL_MK_UNITY_OPTION} --srcdir "${CMAKE_CURRENT_SOURCE_DIR}" > "${BUNDLE_SRC}"
DEPENDS