Skip to content

Commit eb6301e

Browse files
committedJul 12, 2017
[GRASS] remove GRASS 6 support
1 parent 7cbf9df commit eb6301e

File tree

154 files changed

+576
-1063
lines changed

Some content is hidden

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

154 files changed

+576
-1063
lines changed
 

‎CMakeLists.txt

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,16 @@ SET (WITH_CORE TRUE CACHE BOOL "Determines whether QGIS core should be built.")
3838
MARK_AS_ADVANCED(WITH_CORE)
3939

4040
IF(WITH_CORE)
41-
# try to configure and build GRASS plugin by default
42-
FOREACH (GRASS_SEARCH_VERSION 6 7)
43-
# For GRASS 6 are used cached variables without version suffix so that existing caches don't have to be reconfigured.
44-
# Cached variables: WITH_GRASS, WITH_GRASS7, GRASS_PREFIX, GRASS_PREFIX7, GRASS_INCLUDE_DIR, GRASS_INCLUDE_DIR7
41+
# Only GRASS 7 is currently supported but we keep dual version support in cmake for possible future switch to GRASS 8.
42+
# Try to configure and build GRASS plugin by default
43+
FOREACH (GRASS_SEARCH_VERSION 7)
44+
# Legacy note:
45+
# For GRASS 6 there were used cached variables without version suffix so that existing caches didn't have to be reconfigured.
46+
# Cached variables were: WITH_GRASS, WITH_GRASS7, GRASS_PREFIX, GRASS_PREFIX7, GRASS_INCLUDE_DIR, GRASS_INCLUDE_DIR7
4547
# Everywhere else each variable has version major appended.
46-
# Normal variables: GRASS_FOUND6, GRASS_FOUND7, GRASS_MAJOR_VERSION6, GRASS_MAJOR_VERSION7, etc.
48+
# Normal variables were: GRASS_FOUND6, GRASS_FOUND7, GRASS_MAJOR_VERSION6, GRASS_MAJOR_VERSION7, etc.
4749
# In addition there is also GRASS_FOUND, which is TRUE if at least one version of GRASS was found
48-
IF (GRASS_SEARCH_VERSION EQUAL 6)
49-
SET (GRASS_CACHE_VERSION "")
50-
ELSE (GRASS_SEARCH_VERSION EQUAL 6)
51-
SET (GRASS_CACHE_VERSION ${GRASS_SEARCH_VERSION})
52-
ENDIF (GRASS_SEARCH_VERSION EQUAL 6)
53-
50+
SET (GRASS_CACHE_VERSION ${GRASS_SEARCH_VERSION})
5451
SET (WITH_GRASS${GRASS_CACHE_VERSION} TRUE CACHE BOOL "Determines whether GRASS ${GRASS_SEARCH_VERSION} plugin should be built")
5552
IF (WITH_GRASS${GRASS_CACHE_VERSION})
5653
FIND_PACKAGE(GRASS ${GRASS_SEARCH_VERSION})

‎cmake/FindGRASS.cmake

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,6 @@ MACRO (CHECK_GRASS G_PREFIX)
137137
SET(GRASS_FOUND TRUE) # GRASS_FOUND is true if at least one version was found
138138
SET(GRASS_PREFIX${GRASS_CACHE_VERSION} ${G_PREFIX})
139139
CHECK_GRASS_EXTRA_INCLUDE_DIRS(${GRASS_FIND_VERSION})
140-
IF(GRASS_FIND_VERSION EQUAL 6)
141-
# Set also normal variable with number
142-
SET(GRASS_INCLUDE_DIR${GRASS_FIND_VERSION} ${GRASS_INCLUDE_DIR${GRASS_CACHE_VERSION}})
143-
SET(GRASS_PREFIX${GRASS_FIND_VERSION} ${G_PREFIX})
144-
CHECK_GRASS_EXTRA_INCLUDE_DIRS(${GRASS_FIND_VERSION})
145-
ENDIF(GRASS_FIND_VERSION EQUAL 6)
146140
ENDIF(GRASS_LIBRARIES_FOUND${GRASS_FIND_VERSION})
147141
ENDIF(GRASS_MAJOR_VERSION${GRASS_FIND_VERSION} EQUAL GRASS_FIND_VERSION)
148142
ENDIF(GRASS_INCLUDE_DIR${GRASS_CACHE_VERSION} AND EXISTS ${GRASS_INCLUDE_DIR${GRASS_CACHE_VERSION}}/grass/version.h)
@@ -164,20 +158,13 @@ IF (WIN32)
164158
ENDIF (WIN32)
165159

166160
IF (UNIX)
167-
IF (GRASS_FIND_VERSION EQUAL 6)
168-
LIST(APPEND GRASS_PATHS /usr/lib64/grass64 /usr/lib/grass64)
169-
ELSEIF (GRASS_FIND_VERSION EQUAL 7)
161+
IF (GRASS_FIND_VERSION EQUAL 7)
170162
LIST(APPEND GRASS_PATHS /usr/lib64/grass70 /usr/lib/grass70 /usr/lib64/grass71 /usr/lib/grass71 /usr/lib64/grass72 /usr/lib/grass72)
171163
ENDIF ()
172164
ENDIF (UNIX)
173165

174166
IF (APPLE)
175-
IF (GRASS_FIND_VERSION EQUAL 6)
176-
LIST(APPEND GRASS_PATHS
177-
/Applications/GRASS-6.3.app/Contents/MacOS
178-
/Applications/GRASS-6.4.app/Contents/MacOS
179-
)
180-
ELSEIF (GRASS_FIND_VERSION EQUAL 7)
167+
IF (GRASS_FIND_VERSION EQUAL 7)
181168
LIST(APPEND GRASS_PATHS
182169
/Applications/GRASS-7.0.app/Contents/MacOS
183170
/Applications/GRASS-7.1.app/Contents/MacOS

0 commit comments

Comments
 (0)
Please sign in to comment.