Opened 11 years ago

Closed 11 years ago

Last modified 6 years ago

#643 closed enhancement (fixed)

cmake autogeneration of geos_svn_revision.h

Reported by: dburken Owned by: mloskot
Priority: minor Milestone: GEOS Fund Me
Component: Build/Install (cmake) Version: 3.3.8
Severity: Annoyance Keywords: cmake geos_svn_revision.h
Cc:

Description

Added code to CMakeLists.txt to autogenerate geos_svn_revision.h from svn call and tools/geos_svn_revision.h.in

Files attached:

Attachments (2)

geos_svn_revision_cmake.h.in (47 bytes ) - added by dburken 11 years ago.
init file for geos_svn_revision.h
CMakeLists.txt (12.2 KB ) - added by dburken 11 years ago.
Cmake build script.

Download all attachments as: .zip

Change History (5)

by dburken, 11 years ago

init file for geos_svn_revision.h

by dburken, 11 years ago

Attachment: CMakeLists.txt added

Cmake build script.

comment:1 by dburken, 11 years ago

Tested on VS11 with:

D:\dev\vs11_x64\geos\build>..\geos-cmake-config.bat
D:\dev\vs11_x64\geos\build>jom -j 4
...
[100%] Built target geos_unit
D:\dev\vs11_x64\geos\build>jom install
-- Install configuration: "Release"
-- Up-to-date: D:/dev/vs11_x64/deps/include/geos/geos.h
...

Contents of geos-cmake-config.bat:
::---
:: File: geos-cmake-config.bat
::---

:: Development root dir:
set build_dir=%D:/dev/vs11_x64%
:: set geos_dir=geos-3.3.8
set geos_dir=geos-svn

cmake -G "NMake Makefiles JOM" ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_INSTALL_PREFIX=%build_dir%/deps ^
../%geos_dir%

Note: I did not know how to pull from "git" so I left old code in else() block. So if revision is not picked up it should hit old code which did not generate header file on VS11 with nmake.

comment:2 by mloskot, 11 years ago

Resolution: fixed
Status: newclosed

Looks good, works for me, added in r3861

I'll check it in more details and improve if needed later.

Thanks!

comment:3 by robe, 6 years ago

Milestone: GEOS FutureGEOS Fund Me

Milestone renamed

Note: See TracTickets for help on using tickets.