From eb82aa83f2530e5e4df420ab64476b947bdc7f5d Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Sat, 14 Nov 2020 11:04:02 +0100 Subject: Raise error when ACCEPT_USE_OF_DEPRECATED_PROJ_API_H is defined --- scripts/cppcheck.sh | 2 +- src/proj.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/cppcheck.sh b/scripts/cppcheck.sh index 1cfd61b5..4e76db94 100755 --- a/scripts/cppcheck.sh +++ b/scripts/cppcheck.sh @@ -22,7 +22,7 @@ for dirname in ${TOPDIR}/src; do echo "Running cppcheck on $dirname... (can be long)" if ! cppcheck --inline-suppr --template='{file}:{line},{severity},{id},{message}' \ --enable=all --inconclusive --std=posix \ - -DCPPCHECK -D__cplusplus=201103L -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H -DNAN \ + -DCPPCHECK -D__cplusplus=201103L -DNAN \ -I${TOPDIR}/src -I${TOPDIR}/include \ "$dirname" \ -j 8 >>${LOG_FILE} 2>&1 ; then diff --git a/src/proj.h b/src/proj.h index 0597db26..e2c47a17 100644 --- a/src/proj.h +++ b/src/proj.h @@ -119,6 +119,10 @@ #include /* For size_t */ +#ifdef ACCEPT_USE_OF_DEPRECATED_PROJ_API_H + #error "The proj_api.h header has been removed from PROJ with version 8.0.0" +#endif + #ifdef PROJ_RENAME_SYMBOLS #include "proj_symbol_rename.h" #endif -- cgit v1.2.3