[geos-commits] r4115 - in branches/3.5: . include/geos
svn_geos at osgeo.org
svn_geos at osgeo.org
Wed Nov 4 12:37:34 PST 2015
Author: mloskot
Date: 2015-11-04 12:37:34 -0800 (Wed, 04 Nov 2015)
New Revision: 4115
Modified:
branches/3.5/
branches/3.5/CMakeLists.txt
branches/3.5/include/geos/platform.h.cmake
Log:
Merged revision(s) 4112,4114 from trunk:
Add #define NOMINMAX for Visual C++
........
CMake should not try to generate geos_svn_revision.h if GEOS is built from packaged sources.
Fixes #753
Property changes on: branches/3.5
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/3.4:4056
/trunk:4099-4100,4104
+ /branches/3.4:4056
/trunk:4099-4100,4104,4112,4114
Modified: branches/3.5/CMakeLists.txt
===================================================================
--- branches/3.5/CMakeLists.txt 2015-11-04 20:30:49 UTC (rev 4114)
+++ branches/3.5/CMakeLists.txt 2015-11-04 20:37:34 UTC (rev 4115)
@@ -254,29 +254,35 @@
ENDMACRO(GET_SVN_REVISION)
# Determine SVN/Git revision
-if(EXISTS "${CMAKE_SOURCE_DIR}/.svn")
+set(GEOS_BUILD_PACKAGED TRUE)
+if(EXISTS "${PROJECT_SOURCE_DIR}/.svn")
+ set(GEOS_BUILD_PACKAGED FALSE)
GET_SVN_REVISION()
+elseif(EXISTS "${PROJECT_SOURCE_DIR}/.git")
+ set(GEOS_BUILD_PACKAGED FALSE)
endif()
-if ( NOT ${Project_WC_REVISION} EQUAL 0 )
- set( GEOS_SVN_REVISION ${Project_WC_REVISION} )
- configure_file (
- "${PROJECT_SOURCE_DIR}/tools/geos_svn_revision_cmake.h.in"
- "${PROJECT_SOURCE_DIR}/geos_svn_revision.h" )
- # "${geos_BINARY_DIR}/include/geos_svn_revision.h" )
-else()
- 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 (NOT GEOS_BUILD_PACKAGED)
+ message(STATUS "Generating GEOS revision header in ${PROJECT_BINARY_DIR}/geos_svn_revision.h")
+ if ( NOT ${Project_WC_REVISION} EQUAL 0 )
+ set( GEOS_SVN_REVISION ${Project_WC_REVISION} )
+ configure_file (
+ "${PROJECT_SOURCE_DIR}/tools/geos_svn_revision_cmake.h.in"
+ "${PROJECT_BINARY_DIR}/include/geos_svn_revision.h" )
+ else()
+ find_program(SH sh)
+ if(SH)
+ execute_process(COMMAND ${SH} -c
+ "cd ${PROJECT_SOURCE_DIR} && ${PROJECT_SOURCE_DIR}/tools/svn_repo_revision.sh")
+
+ file(RENAME "${PROJECT_SOURCE_DIR}/geos_svn_revision.h"
+ "${PROJECT_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' > ${PROJECT_SOURCE_DIR}/geos_svn_revision.h")
+ endif()
+ endif()
endif()
# End: Determine SVN/Git revision
Modified: branches/3.5/include/geos/platform.h.cmake
===================================================================
--- branches/3.5/include/geos/platform.h.cmake 2015-11-04 20:30:49 UTC (rev 4114)
+++ branches/3.5/include/geos/platform.h.cmake 2015-11-04 20:37:34 UTC (rev 4115)
@@ -19,6 +19,12 @@
#ifndef GEOS_PLATFORM_H_INCLUDED
#define GEOS_PLATFORM_H_INCLUDED
+#ifdef _MSC_VER
+#ifndef NOMINMAX
+#define NOMINMAX 1
+#endif
+#endif
+
/* Disable inclusion of platform.h not generated by CMake */
#define GEOS_PLATFORM_H 1
More information about the geos-commits
mailing list