Skip to content

cmake: use modern alternatives for get_filename_component()#18688

Closed
vszakats wants to merge 1 commit into
curl:masterfrom
vszakats:cm-path
Closed

cmake: use modern alternatives for get_filename_component()#18688
vszakats wants to merge 1 commit into
curl:masterfrom
vszakats:cm-path

Conversation

@vszakats

@vszakats vszakats commented Sep 22, 2025

Copy link
Copy Markdown
Member

w/o sp https://github.com/curl/curl/pull/18688/files?w=1

- use `cmake_path()` to query filenames, with CMake 3.20 and later.
  https://cmake.org/cmake/help/v4.1/command/cmake_path.html#query

- use `cmake_host_system_information()` to query the registry,
  with CMake 3.24 and later.
  https://cmake.org/cmake/help/v4.1/command/cmake_host_system_information.html#query-windows-registry
  Replacing the undocumented method.

- also quote the value passed to `get_filename_component()` where
  missing. (Could not cause an actual issue as used in the code.)
@vszakats vszakats added the cmake label Sep 22, 2025
@github-actions github-actions Bot added the build label Sep 22, 2025
@vszakats vszakats closed this in f833d5d Sep 22, 2025
@vszakats vszakats deleted the cm-path branch September 22, 2025 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant