Skip to content

Conversation

@nilason
Copy link
Contributor

@nilason nilason commented Jan 6, 2026

Add CMake support for g.extension.

Testing will only work from an installed version of GRASS, because the export target files are only created in the install process. (You may of course install to a non-standard location).

This depends preliminary on #6877 (which is included here), so setting this as draft for the time being.

OSGeo/grass-addons#1592 provides an example of the implementation in grass-addons.

@nilason nilason added this to the 8.5.0 milestone Jan 6, 2026
@github-actions github-actions bot added raster Related to raster data processing Python Related code is in Python database Related to database management libraries module general CMake labels Jan 6, 2026
@nilason
Copy link
Contributor Author

nilason commented Jan 6, 2026

Now, after OSGeo/grass-addons@22f101f, the following Addons can be tested:

  • i.hyper
  • i.landsat
  • i.landsat8.swlst
  • i.points.auto
  • r.flowaccumulation
  • r.hypso
  • r.in.vect
  • r.skyline
  • wx.metadata

@nilason
Copy link
Contributor Author

nilason commented Jan 7, 2026

Some hints for testers with limited experience with CMake:

cd <grass-source-dir>
cmake -B build -DCMAKE_PREFIX_PATH=<std-lib-prefix> -DCMAKE_INSTALL_PREFIX=<non-std-prefix> <GRASS-compilation-args>...
cmake --build build
cmake --install build
  • std-lib-prefix, depending on your system/setup, often /usr. You may possibly need to add any non-standard path to CMake config file directories.
  • non-std-prefix, by default probably /usr/local, but can be (almost) anywhere (eg. /tmp)
  • GRASS-compilation-args, see Compile_and_Install_With_CMake

Run GRASS with <non-std-prefix>/bin/grass and g.extension

@github-actions github-actions bot added the vector Related to vector data processing label Jan 13, 2026
@nilason nilason marked this pull request as ready for review January 15, 2026 10:04
@nilason
Copy link
Contributor Author

nilason commented Jan 15, 2026

Opened for review!

@nilason
Copy link
Contributor Author

nilason commented Jan 16, 2026

This updates mainly cmake code. The small changes to g.extension.py was made in a careful way as to not cause regression with existing code. Merging this now to simplify testing.

@nilason nilason merged commit 1ee8b6b into OSGeo:main Jan 16, 2026
31 of 33 checks passed
@nilason nilason deleted the g_extension_cmake branch January 16, 2026 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CMake database Related to database management general libraries module Python Related code is in Python raster Related to raster data processing vector Related to vector data processing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants