Skip to content

Commit b0bc763

Browse files
committedJan 3, 2017
Bump minimum GDAL version to 2.0, remove old version #ifdefs
1 parent f59acad commit b0bc763

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+18
-512
lines changed
 

‎cmake/FindGDAL.cmake

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,9 @@ ELSE(WIN32)
6161
ENDIF (NOT GDAL_VERSION)
6262
STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1" GDAL_VERSION_MAJOR "${GDAL_VERSION}")
6363
STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2" GDAL_VERSION_MINOR "${GDAL_VERSION}")
64-
IF (GDAL_VERSION_MAJOR LESS 1 OR (GDAL_VERSION EQUAL 1 AND GDAL_VERSION_MINOR LESS 4))
65-
MESSAGE (FATAL_ERROR "GDAL version is too old (${GDAL_VERSION}). Use 1.4.0 or higher.")
66-
ENDIF (GDAL_VERSION_MAJOR LESS 1 OR (GDAL_VERSION EQUAL 1 AND GDAL_VERSION_MINOR LESS 4))
67-
68-
IF (GDAL_VERSION_MAJOR LESS 1 OR (GDAL_VERSION_MAJOR EQUAL 1 AND GDAL_VERSION_MINOR LESS 11))
69-
MESSAGE (WARNING "GDAL version is too old (${GDAL_VERSION}) to support GeoPackage. 1.11.0 or higher is recommended.")
70-
ENDIF (GDAL_VERSION_MAJOR LESS 1 OR (GDAL_VERSION_MAJOR EQUAL 1 AND GDAL_VERSION_MINOR LESS 11))
64+
IF (GDAL_VERSION_MAJOR LESS 2)
65+
MESSAGE (FATAL_ERROR "GDAL version is too old (${GDAL_VERSION}). Use 2.0 or higher.")
66+
ENDIF (GDAL_VERSION_MAJOR LESS 2)
7167

7268
ENDIF (GDAL_LIBRARY)
7369
SET (CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK_save} CACHE STRING "" FORCE)
@@ -105,14 +101,10 @@ ELSE(WIN32)
105101

106102
# check for gdal version
107103
# version 1.2.5 is known NOT to be supported (missing CPL_STDCALL macro)
108-
# According to INSTALL, 1.4.0+ is required
109-
IF (GDAL_VERSION_MAJOR LESS 1 OR (GDAL_VERSION_MAJOR EQUAL 1 AND GDAL_VERSION_MINOR LESS 4))
110-
MESSAGE (FATAL_ERROR "GDAL version is too old (${GDAL_VERSION}). Use 1.4.0 or higher.")
111-
ENDIF (GDAL_VERSION_MAJOR LESS 1 OR (GDAL_VERSION_MAJOR EQUAL 1 AND GDAL_VERSION_MINOR LESS 4))
112-
113-
IF (GDAL_VERSION_MAJOR LESS 1 OR (GDAL_VERSION_MAJOR EQUAL 1 AND GDAL_VERSION_MINOR LESS 11))
114-
MESSAGE (WARNING "GDAL version is too old (${GDAL_VERSION}) to support GeoPackage. 1.11.0 or higher is recommended.")
115-
ENDIF (GDAL_VERSION_MAJOR LESS 1 OR (GDAL_VERSION_MAJOR EQUAL 1 AND GDAL_VERSION_MINOR LESS 11))
104+
# According to INSTALL, 2.0+ is required
105+
IF (GDAL_VERSION_MAJOR LESS 2)
106+
MESSAGE (FATAL_ERROR "GDAL version is too old (${GDAL_VERSION}). Use 2.0 or higher.")
107+
ENDIF (GDAL_VERSION_MAJOR LESS 2)
116108

117109
# set INCLUDE_DIR to prefix+include
118110
EXEC_PROGRAM(${GDAL_CONFIG}

‎src/analysis/raster/qgskde.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,7 @@
2323
#define M_PI 3.14159265358979323846
2424
#endif
2525

26-
#if defined(GDAL_VERSION_NUM) && GDAL_VERSION_NUM >= 1800
2726
#define TO8F(x) (x).toUtf8().constData()
28-
#else
29-
#define TO8F(x) QFile::encodeName( x ).constData()
30-
#endif
3127

3228
QgsKernelDensityEstimation::QgsKernelDensityEstimation( const QgsKernelDensityEstimation::Parameters& parameters, const QString& outputFile, const QString& outputFormat )
3329
: mInputLayer( parameters.vectorLayer )

0 commit comments

Comments
 (0)
Please sign in to comment.