Skip to content
Permalink
Browse files

Remove use of old CMP0005 CMake policy

Since it's deprecated on newer CMake versions
  • Loading branch information
nyalldawson committed Aug 29, 2017
1 parent 9171da6 commit 9b2e60ee1b6f975c4788250000bed8af3beffbfe
@@ -581,7 +581,6 @@ IF (WITH_CORE)
#hoops to escape compiler directives then
IF(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
cmake_policy(SET CMP0005 OLD)
IF(NOT "${CMAKE_VERSION}" VERSION_LESS "3.3")
cmake_policy(SET CMP0063 NEW)
ENDIF(NOT "${CMAKE_VERSION}" VERSION_LESS "3.3")
@@ -107,7 +107,7 @@ ELSE(WIN32)
# MESSAGE("DBG GSL_LINK_DIRECTORIES=${GSL_LINK_DIRECTORIES}")
# MESSAGE("DBG GSL_EXE_LINKER_FLAGS=${GSL_EXE_LINKER_FLAGS}")

# ADD_DEFINITIONS("-DHAVE_GSL")
# ADD_DEFINITIONS(-DHAVE_GSL)
# SET(GSL_DEFINITIONS "-DHAVE_GSL")
MARK_AS_ADVANCED(
GSL_CXX_FLAGS
@@ -26,7 +26,7 @@ ELSE(MSVC)
SET_SOURCE_FILES_PROPERTIES(${PYSPATIALITE_SRC} PROPERTIES COMPILE_FLAGS -w)
ENDIF(MSVC)

ADD_DEFINITIONS(-DMODULE_NAME=\\\"spatialite.dbapi2\\\")
ADD_DEFINITIONS(-DMODULE_NAME="spatialite.dbapi2")

IF (CYGWIN OR APPLE)
ADD_LIBRARY(pyspatialite MODULE ${PYSPATIALITE_SRC})
@@ -1126,13 +1126,13 @@ INCLUDE_DIRECTORIES(SYSTEM

#for PAL classes
IF (WIN32)
ADD_DEFINITIONS("-D_HAVE_WINDOWS_H_")
ADD_DEFINITIONS(-D_HAVE_WINDOWS_H_)
ELSE (WIN32)
ADD_DEFINITIONS("-D_HAVE_PTHREAD_")
ADD_DEFINITIONS(-D_HAVE_PTHREAD_)
ENDIF (WIN32)

# Test data dir for QgsRenderChecker
ADD_DEFINITIONS(-DTEST_DATA_DIR="\\"${TEST_DATA_DIR}\\"")
ADD_DEFINITIONS(-DTEST_DATA_DIR="${TEST_DATA_DIR}")

#############################################################
# qgis_core library
@@ -43,9 +43,9 @@ SET (GLOBE_PLUGIN_RCCS globe_plugin.qrc)
# Build

IF(WIN32)
ADD_DEFINITIONS("\"-DGLOBE_EXPORT=${DLLEXPORT}\"")
ADD_DEFINITIONS(-DGLOBE_EXPORT=${DLLEXPORT})
ELSE(WIN32)
ADD_DEFINITIONS("-DGLOBE_EXPORT=")
ADD_DEFINITIONS(-DGLOBE_EXPORT=)
ENDIF(WIN32)

QT5_WRAP_UI (GLOBE_PLUGIN_UIS_H ${GLOBE_PLUGIN_UIS})
@@ -1,7 +1,7 @@
ADD_SUBDIRECTORY(modules)
ADD_SUBDIRECTORY(scripts)

#ADD_DEFINITIONS(-DGRASS_BASE=\\\"${GRASS_PREFIX}\\\")
#ADD_DEFINITIONS(-DGRASS_BASE="${GRASS_PREFIX}")
if (HAVE_OPENPTY)
ADD_DEFINITIONS(-DHAVE_OPENPTY)
ENDIF (HAVE_OPENPTY)
@@ -13,7 +13,7 @@ ELSE (WIN32)
ENDIF (WIN32)

# GRASS Direct disabled in 2.0
#ADD_DEFINITIONS("-DGRASS_DIRECT")
#ADD_DEFINITIONS(-DGRASS_DIRECT)

########################################################
# Files
@@ -133,10 +133,10 @@ IF(NOT WIN32)


SET(KB_LAYOUT_DIR "${QGIS_DATA_DIR}/grass/qtermwidget/kb-layouts")
ADD_DEFINITIONS(-DKB_LAYOUT_DIR=\\\"${CMAKE_INSTALL_PREFIX}/${KB_LAYOUT_DIR}\\\")
ADD_DEFINITIONS(-DKB_LAYOUT_DIR="${CMAKE_INSTALL_PREFIX}/${KB_LAYOUT_DIR}")

SET(COLORSCHEMES_DIR "${QGIS_DATA_DIR}/grass/qtermwidget/color-schemes")
ADD_DEFINITIONS(-DCOLORSCHEMES_DIR=\\\"${CMAKE_INSTALL_PREFIX}/${COLORSCHEMES_DIR}\\\")
ADD_DEFINITIONS(-DCOLORSCHEMES_DIR="${CMAKE_INSTALL_PREFIX}/${COLORSCHEMES_DIR}")

ENDIF(NOT WIN32)

@@ -1,4 +1,4 @@
#ADD_DEFINITIONS(-DGRASS_BASE=\\\"${GRASS_PREFIX}\\\")
#ADD_DEFINITIONS(-DGRASS_BASE="${GRASS_PREFIX}")
########################################################
# Build

@@ -5,15 +5,15 @@ IF (ENABLE_TESTS)
# This define is used for tests that need to locate the test
# data under tests/testdata in the qgis source tree.
# the TEST_DATA_DIR variable is set in the top level CMakeLists.txt
ADD_DEFINITIONS(-DTEST_DATA_DIR="\\"${TEST_DATA_DIR}\\"")
ADD_DEFINITIONS(-DTEST_DATA_DIR="${TEST_DATA_DIR}")

ADD_DEFINITIONS(-DINSTALL_PREFIX="\\"${CMAKE_INSTALL_PREFIX}\\"")
ADD_DEFINITIONS(-DINSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}")

# libraries
# enable postgresql tests
SET (ENABLE_PGTEST FALSE CACHE BOOL "Enable PostgreSQL provider tests")
IF ( ENABLE_PGTEST )
ADD_DEFINITIONS( "-DENABLE_PGTEST" )
ADD_DEFINITIONS(-DENABLE_PGTEST)
ENDIF ()

# because of htonl
@@ -28,9 +28,9 @@ ENDIF(APPLE)
# This define is used for tests that need to locate the test
# data under tests/testdata in the qgis source tree.
# the TEST_DATA_DIR variable is set in the top level CMakeLists.txt
ADD_DEFINITIONS(-DTEST_DATA_DIR="\\"${TEST_DATA_DIR}\\"")
ADD_DEFINITIONS(-DTEST_DATA_DIR="${TEST_DATA_DIR}")

ADD_DEFINITIONS(-DINSTALL_PREFIX="\\"${CMAKE_INSTALL_PREFIX}\\"")
ADD_DEFINITIONS(-DINSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}")

#############################################################
# libraries
@@ -59,7 +59,7 @@ ADD_QGIS_TEST(wcsprovidertest testqgswcsprovider.cpp)
# Temporarily set to old version until server is reconfigured
#SET(TEST_SERVER_URL "http://wcs.qgis.org/${COMPLETE_VERSION}")
SET(TEST_SERVER_URL "http://wcs.qgis.org/1.9.0")
#ADD_DEFINITIONS(-DTEST_SERVER_URL="\\"${TEST_SERVER_URL}\\"")
#ADD_DEFINITIONS(-DTEST_SERVER_URL="${TEST_SERVER_URL}")
SET_TARGET_PROPERTIES(qgis_wcsprovidertest PROPERTIES
COMPILE_FLAGS "-DTEST_SERVER_URL=\\\"${TEST_SERVER_URL}\\\""
)

0 comments on commit 9b2e60e

Please sign in to comment.
You can’t perform that action at this time.