Skip to content

cmake: add initial support for CMake build#1592

Merged
nilason merged 1 commit intoOSGeo:grass8from
nilason:add_cmake_support
Jan 6, 2026
Merged

cmake: add initial support for CMake build#1592
nilason merged 1 commit intoOSGeo:grass8from
nilason:add_cmake_support

Conversation

@nilason
Copy link
Copy Markdown
Contributor

@nilason nilason commented Jan 6, 2026

Added support for:

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

Can be tested in combination with OSGeo/grass#6878.

Added for:

- i.hyper
- i.landsat
- i.landsat8.swlst
- i.points.auto
- r.flowaccumulation
- r.hypso
- r.in.vect
- r.skyline
- wx.metadata
@nilason
Copy link
Copy Markdown
Contributor Author

nilason commented Jan 6, 2026

I'll merge this as soon as possible to simplify testing of OSGeo/grass#6878. (This does not affect current autotools build anyway, so nothing will be broken).

@nilason nilason merged commit 22f101f into OSGeo:grass8 Jan 6, 2026
7 checks passed
@nilason nilason deleted the add_cmake_support branch January 13, 2026 07:18
@petrasovaa
Copy link
Copy Markdown
Contributor

@nilason, these fail for me:

GRASS nc_spm_08_grass7/anna2:grass > g.extension r.flowaccumulation
Fetching <r.flowaccumulation> from <https://github.com/OSGeo/grass-addons/>
(be patient)...
...
Compiling...
-- Found PROJ: /usr/lib/x86_64-linux-gnu/cmake/proj (found version "9.4.0")
/usr/bin/ld: CMakeFiles/r.flowaccumulation.dir/main.c.o: undefined reference to symbol 'pow@@GLIBC_2.29'
/usr/bin/ld: /lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
gmake[2]: *** [CMakeFiles/r.flowaccumulation.dir/build.make:627: output/bin/r.flowaccumulation] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:85: CMakeFiles/r.flowaccumulation.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2
ERROR: Compilation failed, sorry. Please check above error messages.
GRASS nc_spm_08_grass7/anna2:grass > g.extension r.skyline
Fetching <r.skyline> from <https://github.com/OSGeo/grass-addons/> (be
patient)...
...
Compiling...
-- Found PROJ: /usr/lib/x86_64-linux-gnu/cmake/proj (found version "9.4.0")
/usr/bin/ld: CMakeFiles/r.skyline.dir/find_edges.c.o: undefined reference to symbol 'floor@@GLIBC_2.2.5'
/usr/bin/ld: /lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
gmake[2]: *** [CMakeFiles/r.skyline.dir/build.make:227: output/bin/r.skyline] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:85: CMakeFiles/r.skyline.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2
ERROR: Compilation failed, sorry. Please check above error messages.

@nilason
Copy link
Copy Markdown
Contributor Author

nilason commented Feb 13, 2026

@nilason, these fail for me:

GRASS nc_spm_08_grass7/anna2:grass > g.extension r.flowaccumulation
Fetching <r.flowaccumulation> from <https://github.com/OSGeo/grass-addons/>
(be patient)...
...
Compiling...
-- Found PROJ: /usr/lib/x86_64-linux-gnu/cmake/proj (found version "9.4.0")
/usr/bin/ld: CMakeFiles/r.flowaccumulation.dir/main.c.o: undefined reference to symbol 'pow@@GLIBC_2.29'
/usr/bin/ld: /lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
gmake[2]: *** [CMakeFiles/r.flowaccumulation.dir/build.make:627: output/bin/r.flowaccumulation] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:85: CMakeFiles/r.flowaccumulation.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2
ERROR: Compilation failed, sorry. Please check above error messages.
GRASS nc_spm_08_grass7/anna2:grass > g.extension r.skyline
Fetching <r.skyline> from <https://github.com/OSGeo/grass-addons/> (be
patient)...
...
Compiling...
-- Found PROJ: /usr/lib/x86_64-linux-gnu/cmake/proj (found version "9.4.0")
/usr/bin/ld: CMakeFiles/r.skyline.dir/find_edges.c.o: undefined reference to symbol 'floor@@GLIBC_2.2.5'
/usr/bin/ld: /lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
gmake[2]: *** [CMakeFiles/r.skyline.dir/build.make:227: output/bin/r.skyline] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:85: CMakeFiles/r.skyline.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2
ERROR: Compilation failed, sorry. Please check above error messages.

Looks like missing math library.

@nilason
Copy link
Copy Markdown
Contributor Author

nilason commented Feb 13, 2026

I’ll update the Addons cmakelists.txt now after OSGeo/grass#7074.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants