Skip to content

Commit 00ae45b

Browse files
committedApr 2, 2013
don't _re_create fake grass lib sources on reconfigure unless gisdefs.h has changed, saves a lot of reconfigure time
1 parent 2f2ca9f commit 00ae45b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
 

‎src/providers/grass/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ ENDIF (APPLE)
6060
# Fake GRASS gis library
6161
#
6262

63+
# only process functions if qgsgrassgislibfunctions.cpp/h not present
64+
# or gisdefs.h is newer
65+
66+
IF("${GRASS_INCLUDE_DIR}/grass/gisdefs.h" IS_NEWER_THAN "${CMAKE_CURRENT_BINARY_DIR}/qgsgrassgislibfunctions.cpp" OR "${GRASS_INCLUDE_DIR}/grass/gisdefs.h" IS_NEWER_THAN "${CMAKE_CURRENT_BINARY_DIR}/qgsgrassgislibfunctions.h")
67+
6368
# Generate function mapping for functions used in original version
6469
# Create list of functions to be mapped
6570
SET ( FUNCTIONS
@@ -497,6 +502,8 @@ LIST ( APPEND PROTOTYPES "}\n" )
497502
FILE(WRITE "${CMAKE_CURRENT_BINARY_DIR}/qgsgrassgislibfunctions.cpp" ${FUNCTIONS_MAP})
498503
FILE(WRITE "${CMAKE_CURRENT_BINARY_DIR}/qgsgrassgislibfunctions.h" ${PROTOTYPES})
499504

505+
ENDIF() # process functions
506+
500507
# Build fake library
501508
IF(MSVC)
502509
SET (FAKE_LIB_GRASS_GIS "libgrass_gis.${GRASS_VERSION}")

0 commit comments

Comments
 (0)
Please sign in to comment.