Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake: Consider source path with underscores #5386

Merged
merged 8 commits into from
Mar 22, 2025

Conversation

HuidaeCho
Copy link
Member

This PR fixes locale CMake build when the GRASS source path contains underscores. For example, conda-build creates a temporary build directory using timestamp with an underscore (e.g., .../envs/grass-conda/conda-bld/grass_1741956650154/work/build).

Needs testing on Windows...

@github-actions github-actions bot added translation Message translation related CMake labels Mar 14, 2025
@HuidaeCho HuidaeCho requested a review from nilason March 14, 2025 13:14
@nilason
Copy link
Contributor

nilason commented Mar 14, 2025

Perhaps we can extract the file name here with get_filename_component?

@nilason
Copy link
Contributor

nilason commented Mar 14, 2025

Perhaps we can extract the file name here with get_filename_component?

Here I'm referring to L17, where we only extract the locale.

@HuidaeCho
Copy link
Member Author

Perhaps we can extract the file name here with get_filename_component?

Here I'm referring to L17, where we only extract the locale.

Yes, just extracting filename components early would be ideal.

@nilason
Copy link
Contributor

nilason commented Mar 14, 2025

Something like this might work, replacing L16:

set(_locales)
foreach(_locale ${po_files})
  get_filename_component(_loc ${_locale} NAME)
  list(APPEND _locales ${_loc})
endforeach()

@nilason
Copy link
Contributor

nilason commented Mar 22, 2025

Looks good to me!

(#5426 is a blocker for merging any PR currently.)

@HuidaeCho HuidaeCho enabled auto-merge (squash) March 22, 2025 18:40
@HuidaeCho HuidaeCho merged commit f173096 into OSGeo:main Mar 22, 2025
24 checks passed
@github-actions github-actions bot added this to the 8.5.0 milestone Mar 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CMake translation Message translation related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants