]> git.ipfire.org Git - thirdparty/curl.git/commit
cmake: initialize variables where missing
authorViktor Szakats <commit@vsz.me>
Thu, 6 Feb 2025 00:22:22 +0000 (01:22 +0100)
committerViktor Szakats <commit@vsz.me>
Thu, 6 Feb 2025 22:32:37 +0000 (23:32 +0100)
commitaa3e4c1db52bc30cecb31482626518004e9d427f
tree28d6085f3a5ed4fa4e676e2616127951cbd0a6b9
parent3c128966edc86c89de85f72671f9f627c984af53
cmake: initialize variables where missing

As detected using `cmake --warn-uninitialized`.

It also lists:
- variables inherited from `Makefile.inc`, which this PR does not fix.

- a documented CMake global variable, which is unexpected:
  `CMAKE_MODULE_PATH`.
  I'd expect CMake to initialize its namespace.

- envs: `CI`, `CURL_CI` and `CURL_BUILDINFO`. Unexpected, as the manual
  mentions variables only. As of August 2024, there is no solution to
  silence them:
  https://discourse.cmake.org/t/how-to-test-for-set-env-variables-without-getting-warnings/11401

https://cmake.org/cmake/help/latest/manual/cmake.1.html#cmdoption-cmake-warn-uninitialized

Closes #16198
CMake/Macros.cmake
CMakeLists.txt
lib/CMakeLists.txt