]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
cmake: defer building `unitprotos.h` till a test target needs it
authorViktor Szakats <commit@vsz.me>
Tue, 29 Jul 2025 19:15:02 +0000 (21:15 +0200)
committerViktor Szakats <commit@vsz.me>
Wed, 30 Jul 2025 00:38:14 +0000 (02:38 +0200)
Follow-up to c9bb9cd165c1b25c2fe005befdcfe479fc9b68e1 #17750
Ref: https://github.com/curl/curl/pull/17750#issuecomment-3133749477
Closes #18086

lib/CMakeLists.txt

index 1272347d3a8ad418d20406056cdd5988c4e038ee..5d49cfa53c8061d561cf55dd3220611c00271ae6 100644 (file)
@@ -55,7 +55,7 @@ if(CURL_BUILD_TESTING)
       ${CSOURCES} > "${CMAKE_CURRENT_BINARY_DIR}/unitprotos.h"
     DEPENDS "${PROJECT_SOURCE_DIR}/scripts/extract-unit-protos" ${CSOURCES}
     VERBATIM)
-  add_custom_target(curlu-unitprotos ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/unitprotos.h")
+  add_custom_target(curlu-unitprotos DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/unitprotos.h")
 endif()
 
 ## Library definition