Running CMake Configure twice on Linux results in different curl_config.h #7100
I did this
It is quite common practice to run CMake configure more than once.
The first run results in this file:
The second run results in this file:
To be more concrete, the only 2 differences (at least on Ubuntu 18.04 LTS) are these:
I expected the following
The first file should always be created
Why this happens?
This happens because the CMake script starts using CURL_CA_BUNDLE_SET as a temporary variable to drive logic.
But then once it's done it sets CURL_CA_BUNDLE_SET both as a user-configurable variable to drive logic, and a way to inform the user that the CA Bundle has been set.
So when the script is ran a 2nd time, it sees CURL_CA_BUNDLE_SET is set 'manually' (the code seems to assume it's been set by the user) and thus early outs from autodetecting the paths.
I believe this is what's intended:
It fixes the problem because now the script also remembers the path that were searched during the 1st run.
This is the patch:
I can submit a PR if you want me to; but I'm not 100% if this is the intended solution.
Update: PR 7101 submitted
Bug is present as of latest d845d39
Xubuntu 18.04 LTS
Linux matias-ubuntu 5.11.0-051100-generic #202102142330 SMP Sun Feb 14 23:33:21 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered:
Closes curl#7100 Signed-off-by: Matias N. Goldberg <email@example.com>