mirror of
https://github.com/qgis/QGIS.git
synced 2025-07-03 00:03:10 -04:00
Compare commits
12 Commits
533d4ffa27
...
e371c10b5c
Author | SHA1 | Date | |
---|---|---|---|
|
e371c10b5c | ||
|
74549aad26 | ||
|
eac401c009 | ||
|
1f0166d35e | ||
|
ada589bb1d | ||
|
c7e1ad9894 | ||
|
3b2d1be5d6 | ||
|
b1c8ef3265 | ||
|
f4cf09d4b0 | ||
|
9db58e3726 | ||
|
551aa20f20 | ||
|
a156c43f7b |
@ -73,6 +73,9 @@ set(QGIS_APP_NAME "qgis" CACHE STRING "The main app name and bundle name")
|
||||
math(EXPR QGIS_VERSION_INT "${CPACK_PACKAGE_VERSION_MAJOR}*10000+${CPACK_PACKAGE_VERSION_MINOR}*100+${CPACK_PACKAGE_VERSION_PATCH}")
|
||||
message(STATUS "QGIS version: ${COMPLETE_VERSION} ${RELEASE_NAME} (${QGIS_VERSION_INT})")
|
||||
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
set (ENABLE_LOCAL_BUILD_SHORTCUTS FALSE CACHE BOOL "Disables some build steps which are only relevant for releases to speed up compilation time for development")
|
||||
|
||||
#############################################################
|
||||
@ -531,8 +534,6 @@ if(WITH_CORE)
|
||||
set(QT_MIN_VERSION 6.4.0)
|
||||
set(QT_VERSION_BASE "Qt6")
|
||||
set(QT_VERSION_BASE_LOWER "qt6")
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
else()
|
||||
set(QT_VERSION_MAJOR 5)
|
||||
set(QT_MIN_VERSION 5.15.2)
|
||||
@ -979,7 +980,31 @@ if (WITH_CORE)
|
||||
else()
|
||||
# UNIX
|
||||
set (DEFAULT_BIN_SUBDIR bin)
|
||||
set (DEFAULT_CGIBIN_SUBDIR bin)
|
||||
|
||||
# From https://www.cyberciti.biz/faq/how-do-i-find-the-url-for-my-cgi-bin/
|
||||
execute_process(COMMAND lsb_release -a OUTPUT_VARIABLE LSB_RELEASE_A)
|
||||
if(EXISTS "/etc/fedora-release")
|
||||
# in /var/www/cgi-bin
|
||||
set (DEFAULT_CGIBIN_SUBDIR www/cgi-bin)
|
||||
|
||||
elseif (${CMAKE_HOST_SYSTEM_NAME} MATCHES "FreeBSD")
|
||||
# in /usr/local/www/cgi-bin/
|
||||
set (DEFAULT_CGIBIN_SUBDIR www/cgi-bin)
|
||||
|
||||
elseif (${CMAKE_HOST_SYSTEM_NAME} MATCHES "BSD")
|
||||
# in /usr/local/libexec/cgi-bin/
|
||||
set (DEFAULT_CGIBIN_SUBDIR libexec/cgi-bin)
|
||||
|
||||
elseif ("${LSB_RELEASE_A}" MATCHES "Ubuntu" OR "${LSB_RELEASE_A}" MATCHES "Debian" OR "${LSB_RELEASE_A}" MATCHES "Mint")
|
||||
# in /usr/lib/cgi-bin/
|
||||
set (DEFAULT_CGIBIN_SUBDIR lib/cgi-bin)
|
||||
|
||||
else()
|
||||
# others: Red Hat/CentOS/Rocky/Alma Linux
|
||||
# in /var/www/cgi-bin/
|
||||
set (DEFAULT_CGIBIN_SUBDIR www/cgi-bin)
|
||||
endif()
|
||||
|
||||
set (DEFAULT_LIB_SUBDIR lib${LIB_SUFFIX})
|
||||
set (DEFAULT_DATA_SUBDIR share/qgis)
|
||||
set (DEFAULT_LIBEXEC_SUBDIR lib${LIB_SUFFIX}/qgis)
|
||||
|
@ -659,7 +659,10 @@ class Repositories(QObject):
|
||||
.strip()
|
||||
)
|
||||
if not qgisMaximumVersion:
|
||||
qgisMaximumVersion = qgisMinimumVersion[0] + ".99"
|
||||
if qgisMinimumVersion[0] == "3" and supports_qt6:
|
||||
qgisMaximumVersion = "4.99"
|
||||
else:
|
||||
qgisMaximumVersion = qgisMinimumVersion[0] + ".99"
|
||||
# if compatible, add the plugin to the list
|
||||
if not pluginNodes.item(i).firstChildElement(
|
||||
"disabled"
|
||||
@ -845,7 +848,10 @@ class Plugins(QObject):
|
||||
qgisMinimumVersion = "0"
|
||||
qgisMaximumVersion = pluginMetadata("qgisMaximumVersion").strip()
|
||||
if not qgisMaximumVersion:
|
||||
qgisMaximumVersion = qgisMinimumVersion[0] + ".99"
|
||||
if qgisMinimumVersion[0] == "3" and supports_qt6:
|
||||
qgisMaximumVersion = "4.99"
|
||||
else:
|
||||
qgisMaximumVersion = qgisMinimumVersion[0] + ".99"
|
||||
# if compatible, add the plugin to the list
|
||||
if not isCompatible(
|
||||
pyQgisVersion(), qgisMinimumVersion, qgisMaximumVersion
|
||||
|
@ -281,8 +281,8 @@ endif()
|
||||
|
||||
set_target_properties(qgis_3d PROPERTIES UNITY_BUILD ${ENABLE_UNITY_BUILDS})
|
||||
|
||||
# require c++17
|
||||
target_compile_features(qgis_3d PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(qgis_3d PRIVATE cxx_std_20)
|
||||
|
||||
if (BUILD_WITH_QT6)
|
||||
target_include_directories(qgis_3d SYSTEM PUBLIC
|
||||
|
@ -566,8 +566,8 @@ endif()
|
||||
|
||||
set_target_properties(qgis_analysis PROPERTIES UNITY_BUILD ${ENABLE_UNITY_BUILDS})
|
||||
|
||||
# require c++17
|
||||
target_compile_features(qgis_analysis PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(qgis_analysis PRIVATE cxx_std_20)
|
||||
|
||||
target_include_directories(qgis_analysis PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/src/analysis
|
||||
|
@ -512,9 +512,6 @@ endif()
|
||||
#############
|
||||
if (ANDROID)
|
||||
add_library(qgis ${LIBRARY_TYPE} ${QGIS_APPMAIN_SRCS})
|
||||
|
||||
# require c++17
|
||||
target_compile_features(qgis PRIVATE cxx_std_17)
|
||||
else()
|
||||
add_executable(qgis WIN32 ${QGIS_APPMAIN_SRCS})
|
||||
|
||||
@ -522,19 +519,20 @@ else()
|
||||
qt_disable_unicode_defines(qgis)
|
||||
endif()
|
||||
|
||||
# require c++17
|
||||
target_compile_features(qgis PRIVATE cxx_std_17)
|
||||
target_compile_definitions(qgis PRIVATE "QT_PLUGINS_DIR=\"${QT_PLUGINS_DIR}\"")
|
||||
endif()
|
||||
|
||||
# require c++20
|
||||
target_compile_features(qgis PRIVATE cxx_std_20)
|
||||
|
||||
set_target_properties(qgis PROPERTIES OUTPUT_NAME "${QGIS_APP_NAME}")
|
||||
|
||||
# Putting IMAGE_RCC_SRCS into qgis_app lib is causing problems when the lib is
|
||||
# loaded (by plugin for example) in test unit (qgis_layoutpicturetest).
|
||||
add_library(qgis_app ${LIBRARY_TYPE} ${QGIS_APP_SRCS})
|
||||
|
||||
# require c++17
|
||||
target_compile_features(qgis_app PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(qgis_app PRIVATE cxx_std_20)
|
||||
|
||||
target_compile_definitions(qgis_app PRIVATE "QT_PLUGINS_DIR=\"${QT_PLUGINS_DIR}\"")
|
||||
if (POSTGRES_FOUND)
|
||||
|
@ -727,19 +727,25 @@ bool QgsPluginRegistry::checkPythonPlugin( const QString &packageName )
|
||||
bool QgsPluginRegistry::isPythonPluginCompatible( const QString &packageName ) const
|
||||
{
|
||||
#ifdef WITH_BINDINGS
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 6, 0, 0 )
|
||||
bool supportsQgis4 = true;
|
||||
const QString supportsQt6 = mPythonUtils->getPluginMetadata( packageName, QStringLiteral( "supportsQt6" ) ).trimmed();
|
||||
if ( supportsQt6.compare( QLatin1String( "YES" ), Qt::CaseInsensitive ) != 0 && supportsQt6.compare( QLatin1String( "TRUE" ), Qt::CaseInsensitive ) != 0 )
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 6, 0, 0 )
|
||||
if ( !getenv( "QGIS_DISABLE_SUPPORTS_QT6_CHECK" ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
supportsQgis4 = false;
|
||||
}
|
||||
const QString minVersion = mPythonUtils->getPluginMetadata( packageName, QStringLiteral( "qgisMinimumVersion" ) );
|
||||
// try to read qgisMaximumVersion. Note checkQgisVersion can cope with "__error__" value.
|
||||
const QString maxVersion = mPythonUtils->getPluginMetadata( packageName, QStringLiteral( "qgisMaximumVersion" ) );
|
||||
QString maxVersion = mPythonUtils->getPluginMetadata( packageName, QStringLiteral( "qgisMaximumVersion" ) );
|
||||
if ( maxVersion == QLatin1String( "__error__" ) && minVersion.startsWith( QLatin1String( "3." ) ) && supportsQgis4 )
|
||||
{
|
||||
maxVersion = QLatin1String( "4.99.0" );
|
||||
}
|
||||
return minVersion != QLatin1String( "__error__" ) && checkQgisVersion( minVersion, maxVersion );
|
||||
#else
|
||||
Q_UNUSED( packageName )
|
||||
|
@ -25,8 +25,8 @@ add_library(authmethod_apiheader_a STATIC ${AUTH_APIHEADER_SRCS} ${AUTH_APIHEADE
|
||||
|
||||
target_include_directories(authmethod_apiheader_a PUBLIC ${CMAKE_SOURCE_DIR}/src/auth/apiheader/core)
|
||||
|
||||
# require c++17
|
||||
target_compile_features(authmethod_apiheader_a PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(authmethod_apiheader_a PRIVATE cxx_std_20)
|
||||
|
||||
target_link_libraries(authmethod_apiheader_a qgis_core)
|
||||
|
||||
@ -47,8 +47,8 @@ else()
|
||||
# dynamically loaded module
|
||||
add_library(authmethod_apiheader MODULE ${AUTH_APIHEADER_SRCS} ${AUTH_APIHEADER_HDRS} ${AUTH_APIHEADER_UIS_H})
|
||||
|
||||
# require c++17
|
||||
target_compile_features(authmethod_apiheader PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(authmethod_apiheader PRIVATE cxx_std_20)
|
||||
|
||||
target_link_libraries(authmethod_apiheader qgis_core)
|
||||
|
||||
|
@ -25,8 +25,8 @@ add_library(authmethod_awss3_a STATIC ${AUTH_AWSS3_SRCS} ${AUTH_AWSS3_HDRS} ${AU
|
||||
|
||||
target_include_directories(authmethod_awss3_a PUBLIC ${CMAKE_SOURCE_DIR}/src/auth/awss3/core)
|
||||
|
||||
# require c++17
|
||||
target_compile_features(authmethod_awss3_a PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(authmethod_awss3_a PRIVATE cxx_std_20)
|
||||
|
||||
target_link_libraries(authmethod_awss3_a qgis_core)
|
||||
|
||||
@ -50,8 +50,8 @@ else()
|
||||
# dynamically loaded module
|
||||
add_library(authmethod_awss3 MODULE ${AUTH_AWSS3_SRCS} ${AUTH_AWSS3_HDRS} ${AUTH_AWSS3_UIS_H})
|
||||
|
||||
# require c++17
|
||||
target_compile_features(authmethod_awss3 PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(authmethod_awss3 PRIVATE cxx_std_20)
|
||||
|
||||
target_link_libraries(authmethod_awss3 qgis_core)
|
||||
|
||||
|
@ -25,8 +25,8 @@ add_library(authmethod_basic_a STATIC ${AUTH_BASIC_SRCS} ${AUTH_BASIC_HDRS} ${AU
|
||||
|
||||
target_include_directories(authmethod_basic_a PUBLIC ${CMAKE_SOURCE_DIR}/src/auth/basic/core)
|
||||
|
||||
# require c++17
|
||||
target_compile_features(authmethod_basic_a PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(authmethod_basic_a PRIVATE cxx_std_20)
|
||||
|
||||
target_link_libraries(authmethod_basic_a qgis_core)
|
||||
|
||||
@ -50,8 +50,8 @@ else()
|
||||
# dynamically loaded module
|
||||
add_library(authmethod_basic MODULE ${AUTH_BASIC_SRCS} ${AUTH_BASIC_HDRS} ${AUTH_BASIC_UIS_H})
|
||||
|
||||
# require c++17
|
||||
target_compile_features(authmethod_basic PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(authmethod_basic PRIVATE cxx_std_20)
|
||||
|
||||
target_link_libraries(authmethod_basic qgis_core)
|
||||
|
||||
|
@ -25,8 +25,8 @@ add_library(authmethod_esritoken_a STATIC ${AUTH_ESRITOKEN_SRCS} ${AUTH_ESRITOKE
|
||||
|
||||
target_include_directories(authmethod_esritoken_a PUBLIC ${CMAKE_SOURCE_DIR}/src/auth/esritoken/core)
|
||||
|
||||
# require c++17
|
||||
target_compile_features(authmethod_esritoken_a PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(authmethod_esritoken_a PRIVATE cxx_std_20)
|
||||
|
||||
target_link_libraries(authmethod_esritoken_a qgis_core)
|
||||
|
||||
@ -47,8 +47,8 @@ else()
|
||||
# dynamically loaded module
|
||||
add_library(authmethod_esritoken MODULE ${AUTH_ESRITOKEN_SRCS} ${AUTH_ESRITOKEN_HDRS} ${AUTH_ESRITOKEN_UIS_H})
|
||||
|
||||
# require c++17
|
||||
target_compile_features(authmethod_esritoken PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(authmethod_esritoken PRIVATE cxx_std_20)
|
||||
|
||||
target_link_libraries(authmethod_esritoken qgis_core)
|
||||
|
||||
|
@ -25,8 +25,8 @@ add_library(authmethod_identcert_a STATIC ${AUTH_IDENTCERT_SRCS} ${AUTH_IDENTCER
|
||||
|
||||
target_include_directories(authmethod_identcert_a PUBLIC ${CMAKE_SOURCE_DIR}/src/auth/identcert/core)
|
||||
|
||||
# require c++17
|
||||
target_compile_features(authmethod_identcert_a PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(authmethod_identcert_a PRIVATE cxx_std_20)
|
||||
|
||||
target_link_libraries(authmethod_identcert_a qgis_core)
|
||||
|
||||
@ -49,8 +49,8 @@ else()
|
||||
# dynamically loaded module
|
||||
add_library(authmethod_identcert MODULE ${AUTH_IDENTCERT_SRCS} ${AUTH_IDENTCERT_HDRS} ${AUTH_IDENTCERT_UIS_H})
|
||||
|
||||
# require c++17
|
||||
target_compile_features(authmethod_identcert PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(authmethod_identcert PRIVATE cxx_std_20)
|
||||
|
||||
target_link_libraries(authmethod_identcert qgis_core)
|
||||
|
||||
|
@ -25,8 +25,8 @@ add_library(authmethod_maptilerhmacsha256_a STATIC ${AUTH_MAPTILER_HMACSHA256_SR
|
||||
|
||||
target_include_directories(authmethod_maptilerhmacsha256_a PUBLIC ${CMAKE_SOURCE_DIR}/src/auth/hmacsha256/core)
|
||||
|
||||
# require c++17
|
||||
target_compile_features(authmethod_maptilerhmacsha256_a PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(authmethod_maptilerhmacsha256_a PRIVATE cxx_std_20)
|
||||
|
||||
target_link_libraries(authmethod_maptilerhmacsha256_a qgis_core)
|
||||
|
||||
@ -47,8 +47,8 @@ else()
|
||||
# dynamically loaded module
|
||||
add_library(authmethod_maptilerhmacsha256 MODULE ${AUTH_MAPTILER_HMACSHA256_SRCS} ${AUTH_MAPTILER_HMACSHA256_HDRS} ${AUTH_MAPTILER_HMACSHA256_UIS_H})
|
||||
|
||||
# require c++17
|
||||
target_compile_features(authmethod_maptilerhmacsha256 PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(authmethod_maptilerhmacsha256 PRIVATE cxx_std_20)
|
||||
|
||||
target_link_libraries(authmethod_maptilerhmacsha256 qgis_core)
|
||||
|
||||
|
@ -105,8 +105,8 @@ add_library(authmethod_oauth2_a STATIC ${AUTH_OAUTH2_SRCS} ${AUTH_OAUTH2_HDRS} $
|
||||
|
||||
target_include_directories(authmethod_oauth2_a PUBLIC ${CMAKE_SOURCE_DIR}/src/auth/oauth2/core)
|
||||
|
||||
# require c++17
|
||||
target_compile_features(authmethod_oauth2_a PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(authmethod_oauth2_a PRIVATE cxx_std_20)
|
||||
target_compile_definitions(authmethod_oauth2_a PRIVATE "CMAKE_SOURCE_DIR=\"${CMAKE_SOURCE_DIR}\"")
|
||||
|
||||
target_link_libraries(authmethod_oauth2_a qgis_core)
|
||||
@ -141,8 +141,8 @@ else()
|
||||
${CMAKE_SOURCE_DIR}/src/auth/oauth2/core
|
||||
)
|
||||
|
||||
# require c++17
|
||||
target_compile_features(authmethod_oauth2 PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(authmethod_oauth2 PRIVATE cxx_std_20)
|
||||
target_compile_definitions(authmethod_oauth2 PRIVATE "CMAKE_SOURCE_DIR=\"${CMAKE_SOURCE_DIR}\"")
|
||||
|
||||
target_link_libraries(authmethod_oauth2 qgis_core)
|
||||
|
@ -24,8 +24,8 @@ add_library(authmethod_pkipaths_a STATIC ${AUTH_PKIPATHS_SRCS} ${AUTH_PKIPATHS_H
|
||||
|
||||
target_include_directories(authmethod_pkipaths_a PUBLIC ${CMAKE_SOURCE_DIR}/src/auth/pkipaths/core)
|
||||
|
||||
# require c++17
|
||||
target_compile_features(authmethod_pkipaths_a PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(authmethod_pkipaths_a PRIVATE cxx_std_20)
|
||||
|
||||
target_link_libraries(authmethod_pkipaths_a qgis_core)
|
||||
|
||||
@ -48,8 +48,8 @@ else()
|
||||
# dynamically loaded module
|
||||
add_library(authmethod_pkipaths MODULE ${AUTH_PKIPATHS_SRCS} ${AUTH_PKIPATHS_HDRS} ${AUTH_PKIPATHS_UIS_H})
|
||||
|
||||
# require c++17
|
||||
target_compile_features(authmethod_pkipaths PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(authmethod_pkipaths PRIVATE cxx_std_20)
|
||||
|
||||
target_link_libraries(authmethod_pkipaths qgis_core)
|
||||
|
||||
|
@ -24,8 +24,8 @@ add_library(authmethod_pkcs12_a STATIC ${AUTH_PKCS12_SRCS} ${AUTH_PKCS12_HDRS} $
|
||||
|
||||
target_include_directories(authmethod_pkcs12_a PUBLIC ${CMAKE_SOURCE_DIR}/src/auth/pkipkcs12/core)
|
||||
|
||||
# require c++17
|
||||
target_compile_features(authmethod_pkcs12_a PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(authmethod_pkcs12_a PRIVATE cxx_std_20)
|
||||
|
||||
target_link_libraries(authmethod_pkcs12_a qgis_core)
|
||||
|
||||
@ -48,8 +48,8 @@ else()
|
||||
# dynamically loaded module
|
||||
add_library(authmethod_pkcs12 MODULE ${AUTH_PKCS12_SRCS} ${AUTH_PKCS12_HDRS} ${AUTH_PKCS12_UIS_H})
|
||||
|
||||
# require c++17
|
||||
target_compile_features(authmethod_pkcs12 PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(authmethod_pkcs12 PRIVATE cxx_std_20)
|
||||
|
||||
target_link_libraries(authmethod_pkcs12 qgis_core)
|
||||
|
||||
|
@ -14,8 +14,6 @@ ADD_FLEX_BISON_DEPENDENCY(QgsMeshCalcLexer QgsMeshCalcParser)
|
||||
if (WITH_PDF4QT)
|
||||
SET(PDF4QT_BUILD_ONLY_CORE_LIBRARY TRUE)
|
||||
SET(PDF4QT_ENABLE_OPENGL FALSE)
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
SUBDIRS(${CMAKE_SOURCE_DIR}/external/PDF4QT)
|
||||
endif()
|
||||
|
||||
@ -2361,8 +2359,8 @@ else()
|
||||
target_link_libraries(qgis_core meshoptimizer::meshoptimizer)
|
||||
endif()
|
||||
|
||||
# require c++17
|
||||
target_compile_features(qgis_core PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(qgis_core PRIVATE cxx_std_20)
|
||||
|
||||
# Exiv still uses std::auto_ptr
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
|
@ -1532,6 +1532,7 @@ void QgsLineString::visitPointsByRegularDistance( const double distance, const s
|
||||
double pZ = std::numeric_limits<double>::quiet_NaN();
|
||||
double pM = std::numeric_limits<double>::quiet_NaN();
|
||||
double nextPointDistance = distance;
|
||||
const double eps = 4 * nextPointDistance * std::numeric_limits<double>::epsilon ();
|
||||
for ( int i = 1; i < totalPoints; ++i )
|
||||
{
|
||||
double thisX = *x++;
|
||||
@ -1540,7 +1541,7 @@ void QgsLineString::visitPointsByRegularDistance( const double distance, const s
|
||||
double thisM = m ? *m++ : 0.0;
|
||||
|
||||
const double segmentLength = QgsGeometryUtilsBase::distance2D( thisX, thisY, prevX, prevY );
|
||||
while ( nextPointDistance < distanceTraversed + segmentLength || qgsDoubleNear( nextPointDistance, distanceTraversed + segmentLength ) )
|
||||
while ( nextPointDistance < distanceTraversed + segmentLength || qgsDoubleNear( nextPointDistance, distanceTraversed + segmentLength, eps ) )
|
||||
{
|
||||
// point falls on this segment - truncate to segment length if qgsDoubleNear test was actually > segment length
|
||||
const double distanceToPoint = std::min( nextPointDistance - distanceTraversed, segmentLength );
|
||||
|
@ -116,21 +116,6 @@ QStringList makeKeyTokens_( const QString &scope, const QString &key )
|
||||
// be sure to include the canonical root node
|
||||
keyTokens.push_front( QStringLiteral( "properties" ) );
|
||||
|
||||
//check validy of keys since an invalid xml name will will be dropped upon saving the xml file. If not valid, we print a message to the console.
|
||||
for ( int i = 0; i < keyTokens.size(); ++i )
|
||||
{
|
||||
const QString keyToken = keyTokens.at( i );
|
||||
|
||||
//invalid chars in XML are found at http://www.w3.org/TR/REC-xml/#NT-NameChar
|
||||
//note : it seems \x10000-\xEFFFF is valid, but it when added to the regexp, a lot of unwanted characters remain
|
||||
const thread_local QRegularExpression sInvalidRegexp = QRegularExpression( QStringLiteral( "([^:A-Z_a-z\\x{C0}-\\x{D6}\\x{D8}-\\x{F6}\\x{F8}-\\x{2FF}\\x{370}-\\x{37D}\\x{37F}-\\x{1FFF}\\x{200C}-\\x{200D}\\x{2070}-\\x{218F}\\x{2C00}-\\x{2FEF}\\x{3001}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFFD}\\-\\.0-9\\x{B7}\\x{0300}-\\x{036F}\\x{203F}-\\x{2040}]|^[^:A-Z_a-z\\x{C0}-\\x{D6}\\x{D8}-\\x{F6}\\x{F8}-\\x{2FF}\\x{370}-\\x{37D}\\x{37F}-\\x{1FFF}\\x{200C}-\\x{200D}\\x{2070}-\\x{218F}\\x{2C00}-\\x{2FEF}\\x{3001}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFFD}])" ) );
|
||||
if ( keyToken.contains( sInvalidRegexp ) )
|
||||
{
|
||||
const QString errorString = QObject::tr( "Entry token invalid : '%1'. The token will not be saved to file." ).arg( keyToken );
|
||||
QgsMessageLog::logMessage( errorString, QString(), Qgis::MessageLevel::Critical );
|
||||
}
|
||||
}
|
||||
|
||||
return keyTokens;
|
||||
}
|
||||
|
||||
@ -1322,20 +1307,20 @@ void dump_( const QgsProjectPropertyKey &topQgsPropertyKey )
|
||||
* scope. "layers" is a list containing three string values.
|
||||
*
|
||||
* \code{.xml}
|
||||
* <properties>
|
||||
* <fsplugin>
|
||||
* <foo type="int" >42</foo>
|
||||
* <baz type="int" >1</baz>
|
||||
* <layers type="QStringList" >
|
||||
* <properties name="properties">
|
||||
* <properties name="fsplugin">
|
||||
* <properties name="foo" type="int" >42</properties>
|
||||
* <properties name="baz" type="int" >1</properties>
|
||||
* <properties name="layers" type="QStringList">
|
||||
* <value>railroad</value>
|
||||
* <value>airport</value>
|
||||
* </layers>
|
||||
* <xyqzzy type="int" >1</xyqzzy>
|
||||
* <bar type="double" >123.456</bar>
|
||||
* <feature_types type="QStringList" >
|
||||
* </properties>
|
||||
* <properties name="xyqzzy" type="int" >1</properties>
|
||||
* <properties name="bar" type="double" >123.456</properties>
|
||||
* <properties name="feature_types" type="QStringList">
|
||||
* <value>type</value>
|
||||
* </feature_types>
|
||||
* </fsplugin>
|
||||
* </properties>
|
||||
* </properties>
|
||||
* </properties>
|
||||
* \endcode
|
||||
*
|
||||
@ -3992,10 +3977,25 @@ bool QgsProject::createEmbeddedLayer( const QString &layerId, const QString &pro
|
||||
const QDomElement propertiesElem = sProjectDocument.documentElement().firstChildElement( QStringLiteral( "properties" ) );
|
||||
if ( !propertiesElem.isNull() )
|
||||
{
|
||||
const QDomElement absElem = propertiesElem.firstChildElement( QStringLiteral( "Paths" ) ).firstChildElement( QStringLiteral( "Absolute" ) );
|
||||
if ( !absElem.isNull() )
|
||||
QDomElement e = propertiesElem.firstChildElement( QStringLiteral( "Paths" ) );
|
||||
if ( e.isNull() )
|
||||
{
|
||||
useAbsolutePaths = absElem.text().compare( QLatin1String( "true" ), Qt::CaseInsensitive ) == 0;
|
||||
e = propertiesElem.firstChildElement( QStringLiteral( "properties" ) );
|
||||
while ( !e.isNull() && e.attribute( QStringLiteral( "name" ) ) != QStringLiteral( "Paths" ) )
|
||||
e = e.nextSiblingElement( QStringLiteral( "properties" ) );
|
||||
|
||||
e = e.firstChildElement( QStringLiteral( "properties" ) );
|
||||
while ( !e.isNull() && e.attribute( QStringLiteral( "name" ) ) != QStringLiteral( "Absolute" ) )
|
||||
e = e.nextSiblingElement( QStringLiteral( "properties" ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
e = e.firstChildElement( QStringLiteral( "Absolute" ) );
|
||||
}
|
||||
|
||||
if ( !e.isNull() )
|
||||
{
|
||||
useAbsolutePaths = e.text().compare( QLatin1String( "true" ), Qt::CaseInsensitive ) == 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -233,15 +233,15 @@ bool QgsProjectPropertyValue::readXml( const QDomNode &keyNode )
|
||||
|
||||
// keyElement is created by parent QgsProjectPropertyKey
|
||||
bool QgsProjectPropertyValue::writeXml( QString const &nodeName,
|
||||
QDomElement &keyElement,
|
||||
QDomDocument &document )
|
||||
QDomElement &keyElement,
|
||||
QDomDocument &document )
|
||||
{
|
||||
QDomElement valueElement = document.createElement( nodeName );
|
||||
QDomElement valueElement = document.createElement( QStringLiteral( "properties" ) );
|
||||
|
||||
// remember the type so that we can rebuild it when the project is read in
|
||||
valueElement.setAttribute( QStringLiteral( "name" ), nodeName );
|
||||
valueElement.setAttribute( QStringLiteral( "type" ), mValue.typeName() );
|
||||
|
||||
|
||||
// we handle string lists differently from other types in that we
|
||||
// create a sequence of repeated elements to cover all the string list
|
||||
// members; each value will be in a <value></value> tag.
|
||||
@ -362,33 +362,41 @@ bool QgsProjectPropertyKey::readXml( const QDomNode &keyNode )
|
||||
|
||||
while ( i < subkeys.count() )
|
||||
{
|
||||
const QDomNode subkey = subkeys.item( i );
|
||||
QString name;
|
||||
|
||||
if ( subkey.nodeName() == QStringLiteral( "properties" ) &&
|
||||
subkey.hasAttributes() && // if we have attributes
|
||||
subkey.isElement() && // and we're an element
|
||||
subkey.toElement().hasAttribute( QStringLiteral( "name" ) ) ) // and we have a "name" attribute
|
||||
name = subkey.toElement().attribute( QStringLiteral( "name" ) );
|
||||
else
|
||||
name = subkey.nodeName();
|
||||
|
||||
// if the current node is an element that has a "type" attribute,
|
||||
// then we know it's a leaf node; i.e., a subkey _value_, and not
|
||||
// a subkey
|
||||
if ( subkeys.item( i ).hasAttributes() && // if we have attributes
|
||||
subkeys.item( i ).isElement() && // and we're an element
|
||||
subkeys.item( i ).toElement().hasAttribute( QStringLiteral( "type" ) ) ) // and we have a "type" attribute
|
||||
if ( subkey.hasAttributes() && // if we have attributes
|
||||
subkey.isElement() && // and we're an element
|
||||
subkey.toElement().hasAttribute( QStringLiteral( "type" ) ) ) // and we have a "type" attribute
|
||||
{
|
||||
// then we're a key value
|
||||
delete mProperties.take( subkeys.item( i ).nodeName() );
|
||||
mProperties.insert( subkeys.item( i ).nodeName(), new QgsProjectPropertyValue );
|
||||
//
|
||||
delete mProperties.take( name );
|
||||
mProperties.insert( name, new QgsProjectPropertyValue );
|
||||
|
||||
QDomNode subkey = subkeys.item( i );
|
||||
|
||||
if ( !mProperties[subkeys.item( i ).nodeName()]->readXml( subkey ) )
|
||||
if ( !mProperties[name]->readXml( subkey ) )
|
||||
{
|
||||
QgsDebugError( QStringLiteral( "unable to parse key value %1" ).arg( subkeys.item( i ).nodeName() ) );
|
||||
QgsDebugError( QStringLiteral( "unable to parse key value %1" ).arg( name ) );
|
||||
}
|
||||
}
|
||||
else // otherwise it's a subkey, so just recurse on down the remaining keys
|
||||
{
|
||||
addKey( subkeys.item( i ).nodeName() );
|
||||
addKey( name );
|
||||
|
||||
QDomNode subkey = subkeys.item( i );
|
||||
|
||||
if ( !mProperties[subkeys.item( i ).nodeName()]->readXml( subkey ) )
|
||||
if ( !mProperties[name]->readXml( subkey ) )
|
||||
{
|
||||
QgsDebugError( QStringLiteral( "unable to parse subkey %1" ).arg( subkeys.item( i ).nodeName() ) );
|
||||
QgsDebugError( QStringLiteral( "unable to parse subkey %1" ).arg( name ) );
|
||||
}
|
||||
}
|
||||
|
||||
@ -408,7 +416,8 @@ bool QgsProjectPropertyKey::writeXml( QString const &nodeName, QDomElement &elem
|
||||
// If it's an _empty_ node (i.e., one with no properties) we need to emit
|
||||
// an empty place holder; else create new Dom elements as necessary.
|
||||
|
||||
QDomElement keyElement = document.createElement( nodeName ); // Dom element for this property key
|
||||
QDomElement keyElement = document.createElement( "properties" ); // Dom element for this property key
|
||||
keyElement.toElement().setAttribute( QStringLiteral( "name" ), nodeName );
|
||||
|
||||
if ( ! mProperties.isEmpty() )
|
||||
{
|
||||
|
@ -23,7 +23,7 @@ add_executable(qgiscrashhandler WIN32
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../app/qgis_win32.rc
|
||||
)
|
||||
|
||||
target_compile_features(qgiscrashhandler PRIVATE cxx_std_17)
|
||||
target_compile_features(qgiscrashhandler PRIVATE cxx_std_20)
|
||||
|
||||
target_link_libraries(qgiscrashhandler
|
||||
${QT_VERSION_BASE}::Core
|
||||
|
@ -6,7 +6,7 @@ if (NATIVE_CRSSYNC_BIN)
|
||||
|
||||
else ()
|
||||
add_executable(crssync main.cpp)
|
||||
target_compile_features(crssync PRIVATE cxx_std_17)
|
||||
target_compile_features(crssync PRIVATE cxx_std_20)
|
||||
|
||||
target_link_libraries(crssync
|
||||
qgis_core
|
||||
|
@ -1697,7 +1697,7 @@ add_library(qgis_gui ${LIBRARY_TYPE}
|
||||
)
|
||||
|
||||
# require c++17
|
||||
target_compile_features(qgis_gui PRIVATE cxx_std_17)
|
||||
target_compile_features(qgis_gui PRIVATE cxx_std_20)
|
||||
|
||||
if (USE_PRECOMPILED_HEADERS)
|
||||
target_precompile_headers(qgis_gui PRIVATE $<$<COMPILE_LANGUAGE:CXX>:${CMAKE_SOURCE_DIR}/src/core/qgis.h>)
|
||||
|
@ -65,7 +65,7 @@ add_library(qgis_native ${LIBRARY_TYPE} ${QGIS_NATIVE_SRCS} ${QGIS_NATIVE_HDRS})
|
||||
set_property(TARGET qgis_native PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
# require c++17
|
||||
target_compile_features(qgis_native PRIVATE cxx_std_17)
|
||||
target_compile_features(qgis_native PRIVATE cxx_std_20)
|
||||
|
||||
target_include_directories(qgis_native PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
|
@ -35,7 +35,7 @@ qt_wrap_ui(geometrychecker_UIS_H ${geometrychecker_UIS})
|
||||
add_library (plugin_geometrychecker MODULE ${geometrychecker_SRCS} ${geometrychecker_RCCS} ${geometrychecker_UIS_H})
|
||||
|
||||
# require c++17
|
||||
target_compile_features(plugin_geometrychecker PRIVATE cxx_std_17)
|
||||
target_compile_features(plugin_geometrychecker PRIVATE cxx_std_20)
|
||||
|
||||
include_directories(
|
||||
${CMAKE_SOURCE_DIR}/src/plugins
|
||||
|
@ -108,7 +108,7 @@ macro(ADD_GRASSPLUGIN GRASS_BUILD_VERSION)
|
||||
set_source_files_properties(${GRASS_PLUGIN_SRCS} PROPERTIES COMPILE_FLAGS "-wd4611")
|
||||
endif()
|
||||
|
||||
target_compile_features(plugin_grass${GRASS_BUILD_VERSION} PRIVATE cxx_std_17)
|
||||
target_compile_features(plugin_grass${GRASS_BUILD_VERSION} PRIVATE cxx_std_20)
|
||||
|
||||
target_link_libraries(plugin_grass${GRASS_BUILD_VERSION}
|
||||
qgisgrass${GRASS_BUILD_VERSION}
|
||||
|
@ -26,8 +26,8 @@ add_library (plugin_offlineediting MODULE
|
||||
${offline_editing_plugin_UIS_H}
|
||||
)
|
||||
|
||||
# require c++17
|
||||
target_compile_features(plugin_offlineediting PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(plugin_offlineediting PRIVATE cxx_std_20)
|
||||
|
||||
target_link_libraries(plugin_offlineediting
|
||||
qgis_core
|
||||
|
@ -25,8 +25,8 @@ qt_wrap_ui(topol_UIS_H ${topol_UIS})
|
||||
|
||||
add_library (plugin_topology MODULE ${topol_SRCS} ${topol_RCCS} ${topol_UIS_H})
|
||||
|
||||
# require c++17
|
||||
target_compile_features(plugin_topology PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(plugin_topology PRIVATE cxx_std_20)
|
||||
|
||||
include_directories(
|
||||
${CMAKE_SOURCE_DIR}/src/plugins
|
||||
|
@ -17,8 +17,8 @@ endif()
|
||||
|
||||
add_executable (qgis_process ${QGIS_PROCESS_SRCS})
|
||||
|
||||
# require c++17
|
||||
target_compile_features(qgis_process PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(qgis_process PRIVATE cxx_std_20)
|
||||
|
||||
target_include_directories(qgis_process PUBLIC
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
|
@ -30,8 +30,8 @@ target_include_directories(provider_arcgisfeatureserver_a PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/src/providers/arcgisrest
|
||||
)
|
||||
|
||||
# require c++17
|
||||
target_compile_features(provider_arcgisfeatureserver_a PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(provider_arcgisfeatureserver_a PRIVATE cxx_std_20)
|
||||
|
||||
# We use private headers from core that need this
|
||||
target_compile_definitions(provider_arcgisfeatureserver_a PRIVATE "CMAKE_SOURCE_DIR=\"${CMAKE_SOURCE_DIR}\"")
|
||||
@ -48,8 +48,8 @@ if (WITH_GUI)
|
||||
|
||||
set_target_properties(provider_arcgisfeatureserver_gui_a PROPERTIES UNITY_BUILD ${ENABLE_UNITY_BUILDS})
|
||||
|
||||
# require c++17
|
||||
target_compile_features(provider_arcgisfeatureserver_gui_a PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(provider_arcgisfeatureserver_gui_a PRIVATE cxx_std_20)
|
||||
|
||||
target_link_libraries(provider_arcgisfeatureserver_a
|
||||
qgis_gui
|
||||
@ -82,8 +82,8 @@ else()
|
||||
${QCA_LIBRARY}
|
||||
)
|
||||
|
||||
# require c++17
|
||||
target_compile_features(provider_arcgisfeatureserver PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(provider_arcgisfeatureserver PRIVATE cxx_std_20)
|
||||
|
||||
# We use private headers from core that need this
|
||||
target_compile_definitions(provider_arcgisfeatureserver PRIVATE "CMAKE_SOURCE_DIR=\"${CMAKE_SOURCE_DIR}\"")
|
||||
@ -113,8 +113,8 @@ target_include_directories(provider_arcgismapserver_a PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/src/providers/arcgisrest
|
||||
)
|
||||
|
||||
# require c++17
|
||||
target_compile_features(provider_arcgismapserver_a PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(provider_arcgismapserver_a PRIVATE cxx_std_20)
|
||||
|
||||
# We use private headers from core that need this
|
||||
target_compile_definitions(provider_arcgismapserver_a PRIVATE "CMAKE_SOURCE_DIR=\"${CMAKE_SOURCE_DIR}\"")
|
||||
@ -130,8 +130,8 @@ if (FORCE_STATIC_LIBS)
|
||||
else()
|
||||
add_library(provider_arcgismapserver MODULE ${AMS_SRCS})
|
||||
|
||||
# require c++17
|
||||
target_compile_features(provider_arcgismapserver PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(provider_arcgismapserver PRIVATE cxx_std_20)
|
||||
# We use private headers from core that need this
|
||||
target_compile_definitions(provider_arcgismapserver PRIVATE "CMAKE_SOURCE_DIR=\"${CMAKE_SOURCE_DIR}\"")
|
||||
|
||||
|
@ -24,8 +24,8 @@ target_link_libraries(provider_delimitedtext_a
|
||||
qgis_core
|
||||
)
|
||||
|
||||
# require c++17
|
||||
target_compile_features(provider_delimitedtext_a PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(provider_delimitedtext_a PRIVATE cxx_std_20)
|
||||
|
||||
target_compile_definitions(provider_delimitedtext_a PRIVATE "-DQT_NO_FOREACH")
|
||||
|
||||
@ -42,8 +42,8 @@ if (WITH_GUI)
|
||||
qgis_gui
|
||||
)
|
||||
|
||||
# require c++17
|
||||
target_compile_features(provider_delimitedtext_gui_a PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(provider_delimitedtext_gui_a PRIVATE cxx_std_20)
|
||||
|
||||
target_compile_definitions(provider_delimitedtext_gui_a PRIVATE "-DQT_NO_FOREACH")
|
||||
|
||||
@ -59,8 +59,8 @@ if (FORCE_STATIC_LIBS)
|
||||
else()
|
||||
add_library(provider_delimitedtext MODULE ${DTEXT_SRCS} ${DTEXT_GUI_SRCS})
|
||||
|
||||
# require c++17
|
||||
target_compile_features(provider_delimitedtext PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(provider_delimitedtext PRIVATE cxx_std_20)
|
||||
|
||||
target_link_libraries(provider_delimitedtext
|
||||
qgis_core
|
||||
|
@ -30,8 +30,8 @@ include_directories (SYSTEM
|
||||
|
||||
add_library(provider_gpx MODULE ${GPX_SRCS})
|
||||
|
||||
# require c++17
|
||||
target_compile_features(provider_gpx PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(provider_gpx PRIVATE cxx_std_20)
|
||||
|
||||
target_link_libraries(provider_gpx
|
||||
qgis_core
|
||||
|
@ -63,8 +63,8 @@ macro(ADD_GRASSLIB GRASS_BUILD_VERSION)
|
||||
${GRASS_LIBRARY_UIS_H}
|
||||
)
|
||||
|
||||
# require c++17
|
||||
target_compile_features(qgisgrass${GRASS_BUILD_VERSION} PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(qgisgrass${GRASS_BUILD_VERSION} PRIVATE cxx_std_20)
|
||||
|
||||
if(GRASS_OFF_T_SIZE)
|
||||
set(GRASS_OFF_T_SIZE_DEF "\"-DGRASS_OFF_T_SIZE=${GRASS_OFF_T_SIZE}\"")
|
||||
@ -132,8 +132,8 @@ macro(ADD_GRASSLIB GRASS_BUILD_VERSION)
|
||||
set (GRASS_VECTOR_PROVIDER_SRCS ../qgsgrassprovidermodule.cpp)
|
||||
add_library(provider_grass${GRASS_BUILD_VERSION} MODULE ${GRASS_VECTOR_PROVIDER_SRCS})
|
||||
|
||||
# require c++17
|
||||
target_compile_features(provider_grass${GRASS_BUILD_VERSION} PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(provider_grass${GRASS_BUILD_VERSION} PRIVATE cxx_std_20)
|
||||
|
||||
set_target_properties(provider_grass${GRASS_BUILD_VERSION} PROPERTIES
|
||||
COMPILE_FLAGS "-DGRASS_BASE=\\\"${GRASS_PREFIX}\\\""
|
||||
@ -157,8 +157,8 @@ macro(ADD_GRASSLIB GRASS_BUILD_VERSION)
|
||||
)
|
||||
add_library(provider_grassraster${GRASS_BUILD_VERSION} MODULE ${GRASS_RASTER_PROVIDER_SRCS})
|
||||
|
||||
# require c++17
|
||||
target_compile_features(provider_grassraster${GRASS_BUILD_VERSION} PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(provider_grassraster${GRASS_BUILD_VERSION} PRIVATE cxx_std_20)
|
||||
|
||||
set_target_properties(provider_grassraster${GRASS_BUILD_VERSION} PROPERTIES
|
||||
COMPILE_FLAGS "-DGRASS_BASE=\\\"${GRASS_PREFIX}\\\""
|
||||
@ -749,8 +749,8 @@ if(WITH_GRASS_DIRECT)
|
||||
endif()
|
||||
add_library(${FAKE_LIB_GRASS_GIS} MODULE qgsgrassgislib.cpp qgsgrassgislibfunctions.cpp )
|
||||
|
||||
# require c++17
|
||||
target_compile_features(${FAKE_LIB_GRASS_GIS} PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(${FAKE_LIB_GRASS_GIS} PRIVATE cxx_std_20)
|
||||
|
||||
# GRASS_LIBRARY_gis is path to the GRASS library used for compilation, it is the same
|
||||
# on runtime on Linux and Mac but on Windows with OSGEO4W the GRASS may be installed
|
||||
|
@ -80,9 +80,9 @@ add_library(provider_hana_a STATIC ${HANA_SRCS} ${HANA_HDRS})
|
||||
set_target_properties(provider_hana PROPERTIES UNITY_BUILD ${ENABLE_UNITY_BUILDS})
|
||||
set_target_properties(provider_hana_a PROPERTIES UNITY_BUILD ${ENABLE_UNITY_BUILDS})
|
||||
|
||||
# require c++17
|
||||
target_compile_features(provider_hana PRIVATE cxx_std_17)
|
||||
target_compile_features(provider_hana_a PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(provider_hana PRIVATE cxx_std_20)
|
||||
target_compile_features(provider_hana_a PRIVATE cxx_std_20)
|
||||
|
||||
target_compile_definitions(provider_hana
|
||||
PRIVATE
|
||||
|
@ -184,8 +184,8 @@ include_directories (
|
||||
|
||||
add_library (provider_mdal MODULE ${MDAL_SRCS} ${MDAL_LIB_SRCS} ${MDAL_LIB_HDRS})
|
||||
|
||||
# require c++17
|
||||
target_compile_features(provider_mdal PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(provider_mdal PRIVATE cxx_std_20)
|
||||
|
||||
target_link_libraries (provider_mdal
|
||||
qgis_core
|
||||
|
@ -38,8 +38,8 @@ include_directories(
|
||||
|
||||
add_library(provider_mssql MODULE ${MSSQL_SRCS} ${MSSQL_HDRS})
|
||||
|
||||
# require c++17
|
||||
target_compile_features(provider_mssql PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(provider_mssql PRIVATE cxx_std_20)
|
||||
|
||||
target_compile_definitions(provider_mssql PRIVATE "CMAKE_SOURCE_DIR=\"${CMAKE_SOURCE_DIR}\"")
|
||||
|
||||
@ -61,8 +61,8 @@ endif()
|
||||
# static library
|
||||
add_library (provider_mssql_a STATIC ${MSSQL_SRCS} ${MSSQL_HDRS})
|
||||
|
||||
# require c++17
|
||||
target_compile_features(provider_mssql_a PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(provider_mssql_a PRIVATE cxx_std_20)
|
||||
|
||||
# We use private headers from core that need this
|
||||
target_compile_definitions(provider_mssql_a PRIVATE "CMAKE_SOURCE_DIR=\"${CMAKE_SOURCE_DIR}\"")
|
||||
|
@ -50,8 +50,8 @@ endif()
|
||||
|
||||
add_library (provider_oracle MODULE ${ORACLE_SRCS} ${ORACLE_HDRS})
|
||||
|
||||
# require c++17
|
||||
target_compile_features(provider_oracle PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(provider_oracle PRIVATE cxx_std_20)
|
||||
target_compile_definitions(provider_oracle PRIVATE "CMAKE_SOURCE_DIR=\"${CMAKE_SOURCE_DIR}\"")
|
||||
|
||||
target_link_libraries (provider_oracle
|
||||
|
@ -174,7 +174,7 @@ include_directories(
|
||||
)
|
||||
|
||||
add_executable(untwine ${UNTWINE_SRCS} ${UNTWINE_HDRS})
|
||||
target_compile_features(untwine PRIVATE cxx_std_17)
|
||||
target_compile_features(untwine PRIVATE cxx_std_20)
|
||||
|
||||
set_target_properties(untwine PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY ${QGIS_OUTPUT_DIRECTORY}/${QGIS_LIBEXEC_SUBDIR}
|
||||
@ -195,7 +195,7 @@ endif()
|
||||
|
||||
if (PDAL_2_5_OR_HIGHER)
|
||||
add_executable(pdal_wrench ${PDAL_WRENCH_SRCS})
|
||||
target_compile_features(pdal_wrench PRIVATE cxx_std_17)
|
||||
target_compile_features(pdal_wrench PRIVATE cxx_std_20)
|
||||
|
||||
set_target_properties(pdal_wrench PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY ${QGIS_OUTPUT_DIRECTORY}/${QGIS_LIBEXEC_SUBDIR}
|
||||
@ -218,7 +218,7 @@ endif()
|
||||
|
||||
add_library (provider_pdal MODULE ${PDAL_SRCS} ${PDAL_HDRS} ${PDAL_GUI_SRCS} ${PDAL_GUI_HDRS})
|
||||
|
||||
target_compile_features(provider_pdal PRIVATE cxx_std_17)
|
||||
target_compile_features(provider_pdal PRIVATE cxx_std_20)
|
||||
|
||||
target_link_libraries (provider_pdal
|
||||
qgis_core
|
||||
@ -243,8 +243,8 @@ endif()
|
||||
# static library
|
||||
add_library (provider_pdal_a STATIC ${PDAL_SRCS} ${PDAL_HDRS})
|
||||
|
||||
# require c++17
|
||||
target_compile_features(provider_pdal_a PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(provider_pdal_a PRIVATE cxx_std_20)
|
||||
|
||||
target_link_libraries (provider_pdal_a
|
||||
${PDAL_LIBRARIES}
|
||||
@ -260,8 +260,8 @@ target_link_libraries (provider_pdal_a
|
||||
if (WITH_GUI)
|
||||
add_library (provider_pdal_gui_a STATIC ${PDAL_GUI_SRCS} ${PDAL_GUI_HDRS})
|
||||
|
||||
# require c++17
|
||||
target_compile_features(provider_pdal_gui_a PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(provider_pdal_gui_a PRIVATE cxx_std_20)
|
||||
|
||||
target_link_libraries (provider_pdal_gui_a
|
||||
${PDAL_LIBRARIES}
|
||||
|
@ -50,8 +50,8 @@ target_include_directories(provider_postgres_a PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/src/providers/postgres
|
||||
)
|
||||
|
||||
# require c++17
|
||||
target_compile_features(provider_postgres_a PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(provider_postgres_a PRIVATE cxx_std_20)
|
||||
target_compile_definitions(provider_postgres_a PRIVATE "CMAKE_SOURCE_DIR=\"${CMAKE_SOURCE_DIR}\"")
|
||||
|
||||
target_link_libraries (provider_postgres_a
|
||||
@ -70,8 +70,8 @@ if (WITH_GUI)
|
||||
${CMAKE_BINARY_DIR}/src/providers/postgres
|
||||
)
|
||||
|
||||
# require c++17
|
||||
target_compile_features(provider_postgres_gui_a PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(provider_postgres_gui_a PRIVATE cxx_std_20)
|
||||
target_compile_definitions(provider_postgres_gui_a PRIVATE "CMAKE_SOURCE_DIR=\"${CMAKE_SOURCE_DIR}\"")
|
||||
|
||||
target_link_libraries(provider_postgres_gui_a
|
||||
@ -101,8 +101,8 @@ target_include_directories(provider_postgresraster_a PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/src/providers/postgres/raster
|
||||
)
|
||||
|
||||
# require c++17
|
||||
target_compile_features(provider_postgresraster_a PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(provider_postgresraster_a PRIVATE cxx_std_20)
|
||||
target_compile_definitions(provider_postgresraster_a PRIVATE "CMAKE_SOURCE_DIR=\"${CMAKE_SOURCE_DIR}\"")
|
||||
|
||||
target_link_libraries (provider_postgresraster_a
|
||||
@ -138,9 +138,9 @@ else()
|
||||
${CMAKE_SOURCE_DIR}/src/providers/postgres
|
||||
)
|
||||
|
||||
# require c++17
|
||||
target_compile_features(provider_postgres PRIVATE cxx_std_17)
|
||||
target_compile_features(provider_postgresraster PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(provider_postgres PRIVATE cxx_std_20)
|
||||
target_compile_features(provider_postgresraster PRIVATE cxx_std_20)
|
||||
target_compile_definitions(provider_postgres PRIVATE "CMAKE_SOURCE_DIR=\"${CMAKE_SOURCE_DIR}\"")
|
||||
target_compile_definitions(provider_postgresraster PRIVATE "CMAKE_SOURCE_DIR=\"${CMAKE_SOURCE_DIR}\"")
|
||||
|
||||
|
@ -43,8 +43,8 @@ target_link_libraries(provider_spatialite_a
|
||||
spatialite::spatialite
|
||||
)
|
||||
|
||||
# require c++17
|
||||
target_compile_features(provider_spatialite_a PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(provider_spatialite_a PRIVATE cxx_std_20)
|
||||
target_compile_definitions(provider_spatialite_a PRIVATE "CMAKE_SOURCE_DIR=\"${CMAKE_SOURCE_DIR}\"")
|
||||
|
||||
target_compile_definitions(provider_spatialite_a PRIVATE "-DQT_NO_FOREACH")
|
||||
@ -67,8 +67,8 @@ if (WITH_GUI)
|
||||
qgis_gui
|
||||
)
|
||||
|
||||
# require c++17
|
||||
target_compile_features(provider_spatialite_gui_a PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(provider_spatialite_gui_a PRIVATE cxx_std_20)
|
||||
target_compile_definitions(provider_spatialite_gui_a PRIVATE "CMAKE_SOURCE_DIR=\"${CMAKE_SOURCE_DIR}\"")
|
||||
|
||||
target_compile_definitions(provider_spatialite_gui_a PRIVATE "-DQT_NO_FOREACH")
|
||||
@ -92,8 +92,8 @@ else()
|
||||
|
||||
set_target_properties(provider_spatialite PROPERTIES UNITY_BUILD ${ENABLE_UNITY_BUILDS})
|
||||
|
||||
# require c++17
|
||||
target_compile_features(provider_spatialite PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(provider_spatialite PRIVATE cxx_std_20)
|
||||
target_compile_definitions(provider_spatialite PRIVATE "CMAKE_SOURCE_DIR=\"${CMAKE_SOURCE_DIR}\"")
|
||||
|
||||
target_compile_definitions(provider_spatialite PRIVATE "-DQT_NO_FOREACH")
|
||||
|
@ -42,8 +42,8 @@ target_link_libraries(provider_virtuallayer_a
|
||||
qgis_core
|
||||
)
|
||||
|
||||
# require c++17
|
||||
target_compile_features(provider_virtuallayer_a PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(provider_virtuallayer_a PRIVATE cxx_std_20)
|
||||
|
||||
target_compile_definitions(provider_virtuallayer_a PRIVATE "-DQT_NO_FOREACH")
|
||||
|
||||
@ -59,8 +59,8 @@ if (WITH_GUI)
|
||||
qgis_gui
|
||||
)
|
||||
|
||||
# require c++17
|
||||
target_compile_features(provider_virtuallayer_gui_a PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(provider_virtuallayer_gui_a PRIVATE cxx_std_20)
|
||||
|
||||
target_compile_definitions(provider_virtuallayer_gui_a PRIVATE "-DQT_NO_FOREACH")
|
||||
|
||||
@ -82,8 +82,8 @@ if (FORCE_STATIC_LIBS)
|
||||
else()
|
||||
add_library(provider_virtuallayer MODULE ${VLAYER_PROVIDER_SRCS} ${VLAYER_PROVIDER_HDRS} ${VLAYER_PROVIDER_GUI_SRCS} ${VLAYER_PROVIDER_GUI_HDRS} ${VLAYER_PROVIDER_UIS_H} ${VLAYER_SQL_FUNCTIONS_RCCS})
|
||||
|
||||
# require c++17
|
||||
target_compile_features(provider_virtuallayer PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(provider_virtuallayer PRIVATE cxx_std_20)
|
||||
|
||||
target_compile_definitions(provider_virtuallayer PRIVATE "-DQT_NO_FOREACH")
|
||||
|
||||
|
@ -13,8 +13,8 @@ set(VRP_HDRS
|
||||
|
||||
add_library (provider_virtualraster MODULE ${VRP_SRCS} ${VRP_HDRS})
|
||||
|
||||
# require c++17
|
||||
target_compile_features(provider_virtualraster PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(provider_virtualraster PRIVATE cxx_std_20)
|
||||
|
||||
target_link_libraries (provider_virtualraster
|
||||
qgis_core
|
||||
|
@ -26,8 +26,8 @@ target_link_libraries(provider_wcs_a
|
||||
qgis_core
|
||||
)
|
||||
|
||||
# require c++17
|
||||
target_compile_features(provider_wcs_a PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(provider_wcs_a PRIVATE cxx_std_20)
|
||||
|
||||
# We use private headers from core that need this
|
||||
target_compile_definitions(provider_wcs_a PRIVATE "CMAKE_SOURCE_DIR=\"${CMAKE_SOURCE_DIR}\"")
|
||||
@ -47,8 +47,8 @@ if (WITH_GUI)
|
||||
qgis_gui
|
||||
)
|
||||
|
||||
# require c++17
|
||||
target_compile_features(provider_wcs_gui_a PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(provider_wcs_gui_a PRIVATE cxx_std_20)
|
||||
|
||||
target_compile_definitions(provider_wcs_gui_a PRIVATE "-DQT_NO_FOREACH")
|
||||
|
||||
@ -68,8 +68,8 @@ if (FORCE_STATIC_LIBS)
|
||||
else()
|
||||
add_library(provider_wcs MODULE ${WCS_SRCS} ${WCS_GUI_SRCS})
|
||||
|
||||
# require c++17
|
||||
target_compile_features(provider_wcs PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(provider_wcs PRIVATE cxx_std_20)
|
||||
|
||||
# We use private headers from core that need this
|
||||
target_compile_definitions(provider_wcs PRIVATE "CMAKE_SOURCE_DIR=\"${CMAKE_SOURCE_DIR}\"")
|
||||
|
@ -70,8 +70,8 @@ target_link_libraries(provider_wfs_a
|
||||
GDAL::GDAL
|
||||
)
|
||||
|
||||
# require c++17
|
||||
target_compile_features(provider_wfs_a PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(provider_wfs_a PRIVATE cxx_std_20)
|
||||
|
||||
|
||||
# We use private headers from core that need this
|
||||
@ -97,8 +97,8 @@ if (WITH_GUI)
|
||||
qgis_gui
|
||||
)
|
||||
|
||||
# require c++17
|
||||
target_compile_features(provider_wfs_gui_a PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(provider_wfs_gui_a PRIVATE cxx_std_20)
|
||||
|
||||
target_compile_definitions(provider_wfs_gui_a PRIVATE "-DQT_NO_FOREACH")
|
||||
|
||||
@ -121,8 +121,8 @@ else()
|
||||
|
||||
set_target_properties(provider_wfs PROPERTIES UNITY_BUILD ${ENABLE_UNITY_BUILDS})
|
||||
|
||||
# require c++17
|
||||
target_compile_features(provider_wfs PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(provider_wfs PRIVATE cxx_std_20)
|
||||
|
||||
# We use private headers from core that need this
|
||||
target_compile_definitions(provider_wfs PRIVATE "CMAKE_SOURCE_DIR=\"${CMAKE_SOURCE_DIR}\"")
|
||||
|
@ -31,8 +31,8 @@ target_include_directories(provider_wms_a PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/src/providers/wms
|
||||
)
|
||||
|
||||
# require c++17
|
||||
target_compile_features(provider_wms_a PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(provider_wms_a PRIVATE cxx_std_20)
|
||||
|
||||
if (WITH_GUI)
|
||||
qt_wrap_ui(WMS_UIS_H ${WMS_UIS})
|
||||
@ -45,8 +45,8 @@ if (WITH_GUI)
|
||||
${CMAKE_BINARY_DIR}/src/providers/wms
|
||||
)
|
||||
|
||||
# require c++17
|
||||
target_compile_features(provider_wms_gui_a PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(provider_wms_gui_a PRIVATE cxx_std_20)
|
||||
|
||||
add_dependencies(provider_wms_a ui)
|
||||
add_dependencies(provider_wms_gui_a ui)
|
||||
@ -80,8 +80,8 @@ else()
|
||||
|
||||
set_target_properties(provider_wms PROPERTIES UNITY_BUILD ${ENABLE_UNITY_BUILDS})
|
||||
|
||||
# require c++17
|
||||
target_compile_features(provider_wms PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(provider_wms PRIVATE cxx_std_20)
|
||||
|
||||
target_link_libraries(provider_wms
|
||||
qgis_core
|
||||
|
@ -2,8 +2,8 @@ set(QGISPYTHON_SRCS qgispython.cpp qgspythonutilsimpl.cpp)
|
||||
|
||||
add_library (qgispython SHARED ${QGISPYTHON_SRCS})
|
||||
|
||||
# require c++17
|
||||
target_compile_features(qgispython PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(qgispython PRIVATE cxx_std_20)
|
||||
|
||||
target_include_directories(qgispython PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/src/python
|
||||
|
@ -46,8 +46,8 @@ add_library(qgis_quick ${LIBRARY_TYPE}
|
||||
${QGIS_QUICK_GUI_MOC_SRCS}
|
||||
${QGIS_QUICK_GUI_HDRS})
|
||||
|
||||
# require c++17
|
||||
target_compile_features(qgis_quick PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(qgis_quick PRIVATE cxx_std_20)
|
||||
|
||||
target_link_libraries(qgis_quick
|
||||
${QT_VERSION_BASE}::Quick
|
||||
|
@ -52,8 +52,8 @@ add_library(qgis_quick_plugin ${LIBRARY_TYPE}
|
||||
${QGIS_QUICK_PLUGIN_RESOURCES}
|
||||
)
|
||||
|
||||
# require c++17
|
||||
target_compile_features(qgis_quick_plugin PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(qgis_quick_plugin PRIVATE cxx_std_20)
|
||||
|
||||
target_link_libraries(qgis_quick_plugin qgis_quick)
|
||||
set_target_properties(qgis_quick_plugin PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${QGIS_QUICK_PLUGIN_RUNTIME_DIR})
|
||||
|
@ -92,8 +92,8 @@ endif()
|
||||
|
||||
set_target_properties(qgis_server PROPERTIES UNITY_BUILD ${ENABLE_UNITY_BUILDS})
|
||||
|
||||
# require c++17
|
||||
target_compile_features(qgis_server PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(qgis_server PRIVATE cxx_std_20)
|
||||
|
||||
target_include_directories(qgis_server SYSTEM PUBLIC
|
||||
${FCGI_INCLUDE_DIR}
|
||||
@ -154,9 +154,9 @@ set(QGIS_SERVER_TESTRCCS ../../tests/testdata/testdata.qrc)
|
||||
add_executable(qgis_mapserv.fcgi qgis_map_serv.cpp ${QGIS_SERVER_TESTRCCS})
|
||||
add_executable(qgis_mapserver qgis_mapserver.cpp ${QGIS_SERVER_TESTRCCS})
|
||||
|
||||
# require c++17
|
||||
target_compile_features(qgis_mapserv.fcgi PRIVATE cxx_std_17)
|
||||
target_compile_features(qgis_mapserver PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(qgis_mapserv.fcgi PRIVATE cxx_std_20)
|
||||
target_compile_features(qgis_mapserver PRIVATE cxx_std_20)
|
||||
|
||||
target_link_libraries(qgis_mapserv.fcgi qgis_server)
|
||||
target_link_libraries(qgis_mapserver qgis_server)
|
||||
|
@ -13,8 +13,8 @@ set (LANDINGPAGE_SRCS
|
||||
|
||||
add_library (landingpage MODULE ${LANDINGPAGE_SRCS})
|
||||
|
||||
# require c++17
|
||||
target_compile_features(landingpage PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(landingpage PRIVATE cxx_std_20)
|
||||
|
||||
include_directories(SYSTEM
|
||||
)
|
||||
|
@ -15,8 +15,8 @@ set (wcs_SRCS
|
||||
|
||||
add_library (wcs MODULE ${wcs_SRCS})
|
||||
|
||||
# require c++17
|
||||
target_compile_features(wcs PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(wcs PRIVATE cxx_std_20)
|
||||
|
||||
include_directories(
|
||||
${CMAKE_SOURCE_DIR}/src/server
|
||||
|
@ -31,8 +31,8 @@ foreach(_library_type MODULE STATIC)
|
||||
|
||||
add_library (${_library_name} ${_library_type} ${WFS_SRCS} ${WFS_HDRS})
|
||||
|
||||
# require c++17
|
||||
target_compile_features(${_library_name} PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(${_library_name} PRIVATE cxx_std_20)
|
||||
|
||||
target_include_directories(${_library_name} PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/src/server
|
||||
|
@ -42,8 +42,8 @@ foreach(_library_type MODULE STATIC)
|
||||
|
||||
add_library(${_library_name} ${_library_type} ${WMS_SRCS} ${WMS_HDRS})
|
||||
|
||||
# require c++17
|
||||
target_compile_features(${_library_name} PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(${_library_name} PRIVATE cxx_std_20)
|
||||
|
||||
target_include_directories(${_library_name} PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/src/server
|
||||
|
@ -20,8 +20,8 @@ set (WMTS_HDRS
|
||||
|
||||
add_library (wmts MODULE ${WMTS_SRCS} ${WMTS_HDRS})
|
||||
|
||||
# require c++17
|
||||
target_compile_features(wmts PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(wmts PRIVATE cxx_std_20)
|
||||
|
||||
include_directories(
|
||||
|
||||
|
@ -14,8 +14,8 @@ add_library(qgis_test ${LIBRARY_TYPE}
|
||||
${QGIS_TEST_HDRS}
|
||||
)
|
||||
|
||||
# require c++17
|
||||
target_compile_features(qgis_test PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(qgis_test PRIVATE cxx_std_20)
|
||||
|
||||
target_include_directories(qgis_test PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/src/test
|
||||
|
@ -11,8 +11,8 @@ set (BENCH_SRCS
|
||||
|
||||
add_executable (qgis_bench WIN32 ${BENCH_SRCS} )
|
||||
|
||||
# require c++17
|
||||
target_compile_features(qgis_bench PRIVATE cxx_std_17)
|
||||
# require c++20
|
||||
target_compile_features(qgis_bench PRIVATE cxx_std_20)
|
||||
|
||||
include_directories(
|
||||
|
||||
|
@ -25,7 +25,7 @@ add_executable(qgis_3d_sandbox
|
||||
qgis_3d_sandbox.cpp
|
||||
)
|
||||
# require c++17
|
||||
target_compile_features(qgis_3d_sandbox PRIVATE cxx_std_17)
|
||||
target_compile_features(qgis_3d_sandbox PRIVATE cxx_std_20)
|
||||
|
||||
set_target_properties(qgis_3d_sandbox PROPERTIES AUTORCC TRUE)
|
||||
target_link_libraries(qgis_3d_sandbox
|
||||
|
@ -14,7 +14,7 @@ if (ENABLE_TESTS)
|
||||
set (TESTNAME "test_${ARG_QGIS_TEST_MODULE}_${TESTNAME}")
|
||||
add_executable(${TESTNAME} ${TESTSRC} ${util_SRCS})
|
||||
# add_custom_target(${TESTNAME}moc ALL DEPENDS ${${TESTNAME}_MOC_SRCS})
|
||||
target_compile_features(${TESTNAME} PRIVATE cxx_std_17)
|
||||
target_compile_features(${TESTNAME} PRIVATE cxx_std_20)
|
||||
set_target_properties(${TESTNAME} PROPERTIES AUTORCC TRUE)
|
||||
target_link_libraries(${TESTNAME} ${ARG_QGIS_TEST_LINKEDLIBRARIES})
|
||||
target_link_libraries(${TESTNAME} qgis_test)
|
||||
|
@ -84,7 +84,7 @@ if(UNIX AND NOT ANDROID AND CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
)
|
||||
|
||||
add_executable(test_provider_wcs ${WCSTEST_SRCS} )
|
||||
target_compile_features(test_provider_wcs PRIVATE cxx_std_17)
|
||||
target_compile_features(test_provider_wcs PRIVATE cxx_std_20)
|
||||
target_compile_definitions(test_provider_wcs PRIVATE "CMAKE_SOURCE_DIR=\"${CMAKE_SOURCE_DIR}\"")
|
||||
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
|
||||
|
@ -10,7 +10,7 @@ macro (ADD_QGIS_GRASS_TEST grass_build_version testname testsrc)
|
||||
set(qgis_${testname}${grass_build_version}_SRCS ${testsrc} ${util_SRCS})
|
||||
add_custom_target(qgis_${testname}${grass_build_version}moc ALL DEPENDS ${qgis_${testname}${grass_build_version}_MOC_SRCS})
|
||||
add_executable(qgis_${testname}${grass_build_version} ${qgis_${testname}${grass_build_version}_SRCS})
|
||||
target_compile_features(qgis_${testname}${grass_build_version} PRIVATE cxx_std_17)
|
||||
target_compile_features(qgis_${testname}${grass_build_version} PRIVATE cxx_std_20)
|
||||
|
||||
include_directories(
|
||||
${CMAKE_BINARY_DIR}/src/providers/grass/${grass_build_version}
|
||||
|
@ -65,84 +65,6 @@ class TestQgsProject(QgisTestCase):
|
||||
QgisTestCase.__init__(self, methodName)
|
||||
self.messageCaught = False
|
||||
|
||||
def test_makeKeyTokens_(self):
|
||||
# see http://www.w3.org/TR/REC-xml/#d0e804 for a list of valid characters
|
||||
|
||||
invalidTokens = []
|
||||
validTokens = []
|
||||
|
||||
# all test tokens will be generated by prepending or inserting characters to this token
|
||||
validBase = "valid"
|
||||
|
||||
# some invalid characters, not allowed anywhere in a token
|
||||
# note that '/' must not be added here because it is taken as a separator by makeKeyTokens_()
|
||||
invalidChars = "+*,;<>|!$%()=?#\x01"
|
||||
|
||||
# generate the characters that are allowed at the start of a token (and at every other position)
|
||||
validStartChars = ":_"
|
||||
charRanges = [
|
||||
(ord("a"), ord("z")),
|
||||
(ord("A"), ord("Z")),
|
||||
(0x00F8, 0x02FF),
|
||||
(0x0370, 0x037D),
|
||||
(0x037F, 0x1FFF),
|
||||
(0x200C, 0x200D),
|
||||
(0x2070, 0x218F),
|
||||
(0x2C00, 0x2FEF),
|
||||
(0x3001, 0xD7FF),
|
||||
(0xF900, 0xFDCF),
|
||||
(0xFDF0, 0xFFFD),
|
||||
# (0x10000, 0xEFFFF), while actually valid, these are not yet accepted by makeKeyTokens_()
|
||||
]
|
||||
for r in charRanges:
|
||||
for c in range(r[0], r[1]):
|
||||
validStartChars += chr(c)
|
||||
|
||||
# generate the characters that are only allowed inside a token, not at the start
|
||||
validInlineChars = "-.\xB7"
|
||||
charRanges = [
|
||||
(ord("0"), ord("9")),
|
||||
(0x0300, 0x036F),
|
||||
(0x203F, 0x2040),
|
||||
]
|
||||
for r in charRanges:
|
||||
for c in range(r[0], r[1]):
|
||||
validInlineChars += chr(c)
|
||||
|
||||
# test forbidden start characters
|
||||
for c in invalidChars + validInlineChars:
|
||||
invalidTokens.append(c + validBase)
|
||||
|
||||
# test forbidden inline characters
|
||||
for c in invalidChars:
|
||||
invalidTokens.append(validBase[:4] + c + validBase[4:])
|
||||
|
||||
# test each allowed start character
|
||||
for c in validStartChars:
|
||||
validTokens.append(c + validBase)
|
||||
|
||||
# test each allowed inline character
|
||||
for c in validInlineChars:
|
||||
validTokens.append(validBase[:4] + c + validBase[4:])
|
||||
|
||||
logger = QgsApplication.messageLog()
|
||||
logger.messageReceived.connect(self.catchMessage)
|
||||
prj = QgsProject.instance()
|
||||
|
||||
for token in validTokens:
|
||||
self.messageCaught = False
|
||||
prj.readEntry("test", token)
|
||||
myMessage = f"valid token '{token}' not accepted"
|
||||
assert not self.messageCaught, myMessage
|
||||
|
||||
for token in invalidTokens:
|
||||
self.messageCaught = False
|
||||
prj.readEntry("test", token)
|
||||
myMessage = f"invalid token '{token}' accepted"
|
||||
assert self.messageCaught, myMessage
|
||||
|
||||
logger.messageReceived.disconnect(self.catchMessage)
|
||||
|
||||
def catchMessage(self):
|
||||
self.messageCaught = True
|
||||
|
||||
|
@ -38,7 +38,7 @@ add_executable(${QGIS_QUICK_APP_NAME}
|
||||
${QGIS_QUICK_APP_MOC_SRCS}
|
||||
)
|
||||
|
||||
target_compile_features(${QGIS_QUICK_APP_NAME} PRIVATE cxx_std_17)
|
||||
target_compile_features(${QGIS_QUICK_APP_NAME} PRIVATE cxx_std_20)
|
||||
|
||||
target_link_libraries(${QGIS_QUICK_APP_NAME}
|
||||
${QT_VERSION_BASE}::Gui
|
||||
|
Loading…
x
Reference in New Issue
Block a user