[geos-commits] r3806 - trunk
svn_geos at osgeo.org
svn_geos at osgeo.org
Wed Jun 5 15:18:13 PDT 2013
Author: mloskot
Date: 2013-06-05 15:18:13 -0700 (Wed, 05 Jun 2013)
New Revision: 3806
Modified:
trunk/
trunk/CMakeLists.txt
Log:
Implement generating geos_svn_revision.h using shell script.
Property changes on: trunk
___________________________________________________________________
Modified: svn:ignore
- aclocal.m4
autom4te.cache
config.guess
config.log
config.status
config.sub
configure
depcomp
install-sh
libtool
ltmain.sh
missing
mkinstalldirs
Makefile
Makefile.in
py-compile
tags
ID
*.swp
.gdb*
CMakeFiles
*.cmake
cmake_install.*
CMakeCache.txt
+ aclocal.m4
autom4te.cache
config.guess
config.log
config.status
config.sub
configure
depcomp
install-sh
libtool
ltmain.sh
missing
mkinstalldirs
Makefile
Makefile.in
py-compile
tags
ID
*.swp
.gdb*
CMakeFiles
*.cmake
cmake_install.*
CMakeCache.txt
_build
Modified: trunk/CMakeLists.txt
===================================================================
--- trunk/CMakeLists.txt 2013-06-05 08:52:47 UTC (rev 3805)
+++ trunk/CMakeLists.txt 2013-06-05 22:18:13 UTC (rev 3806)
@@ -237,8 +237,21 @@
# Setup checks and generate config headers
#################################################################################
-# TODO: output to CMAKE_CURRENT_BINARY_DIR instead of CMAKE_SOURCE_DIR
+# Determine SVN/Git revision
+message(STATUS "Generating revision header ${CMAKE_SOURCE_DIR}/geos_svn_revision.h")
+find_program(SH sh)
+if(SH)
+ execute_process(COMMAND ${SH} -c
+ "cd ${CMAKE_SOURCE_DIR} && ${CMAKE_SOURCE_DIR}/tools/svn_repo_revision.sh")
+ file(RENAME "${CMAKE_SOURCE_DIR}/geos_svn_revision.h"
+ "${CMAKE_BINARY_DIR}/geos_svn_revision.h")
+else()
+ message("*** sh-compatible command not found, cannot create geos_svn_revision.h")
+ message("*** Check SVN revision and create revision header manually:")
+ message("*** echo '#define GEOS_SVN_REVISION XYZ' > ${CMAKE_SOURCE_DIR}/geos_svn_revision.h")
+endif()
+
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/include/geos/platform.h)
message(STATUS "Disabling existing ${CMAKE_CURRENT_SOURCE_DIR}/include/geos/platform.h")
More information about the geos-commits
mailing list