cmake: make the ExternalProject test work - #18208
Closed
vszakats wants to merge 13 commits into
Closed
Conversation
``` C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/test-consumer-static-fetch.dir/test.c.obj:test.c:(.text+0x11f): undefined reference to `__imp_curl_version' collect2.exe: error: ld returned 1 exit status ``` https://github.com/curl/curl/actions/runs/16784516811/job/47531518325?pr=18208#step:5:175
``` CMake Warning (dev) at .../share/cmake/Modules/ExternalProject/shared_internal_commands.cmake:1276 (message): The DOWNLOAD_EXTRACT_TIMESTAMP option was not given and policy CMP0135 is not set. The policy's OLD behavior will be used. When using a URL download, the timestamps of extracted files should preferably be that of the time of extraction, otherwise code that depends on the extracted contents might not be rebuilt if the URL changes. The OLD behavior preserves the timestamps from the archive instead, but this is usually not what you want. Update your project to the NEW behavior or specify the DOWNLOAD_EXTRACT_TIMESTAMP option with a value of true to avoid this robustness issue. Call Stack (most recent call first): .../share/cmake/Modules/ExternalProject.cmake:3076 (_ep_add_download_command) CMakeLists.txt:83 (ExternalProject_Add) This warning is for project developers. Use -Wno-dev to suppress it. ```
To not waste time on not-so-useful tests: windows: 52s macos: 2m33s For linux this is 18s. ExternalProject tests basically test the test itself. There is no core cmake logic that's involved, besides the curl build itself, which is already tested extensively. with new cmake test times are: 23s (linux) + 6s (macos) + 18s (windows) Leaving a total of 65s on testing this. Well, also drop the new cmake test for linux, saving 23s. Final total is 42s.
vszakats
added a commit
to vszakats/curl
that referenced
this pull request
Aug 7, 2025
Follow-up to b8296d3 curl#18208
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
By micromanaging the project dependency and its inclusion into the test
project. It feels like an awkward construct, but perhaps better than
nothing.
It's also fragile because it's a static build with no assistance from
the external project (curl in this case). Mitigated in test by disabling
all dependencies and some features.
Since there is no special core cmake logic to be tested here, in CI
the test is tested really. To keep CI jobs at minimum, only add 3 of
them, taking 42s in total. (All 6 would take 270s.)
Follow-up to e2a23d5 #17203
w/o sp https://github.com/curl/curl/pull/18208/files?w=1