[poppler] qt5/CMakeLists.txt

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Sep 19 21:21:07 UTC 2018


 qt5/CMakeLists.txt |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 5dadcc93c4d4d44d0ec3bdc6bb54851f6ffaee98
Author: Tobias Deiminger <haxtibal at posteo.de>
Date:   Sun Sep 9 09:28:22 2018 +0200

    Compile Qt5 frontend with -DQT_STRICT_ITERATORS
    
    QT_STRICT_ITERATORS prevents conversion from non-const iterator to const iterator.
    
    It helps detecting situations where we waste resources due to
    needless detach from implicitely shared container data (i.e. deep copy).
    
    If anyone should run into problems, they can disable strict iterators
    using a global cache variable:
    
    $ cmake DENABLE_QT_STRICT_ITERATORS=OFF [...]

diff --git a/qt5/CMakeLists.txt b/qt5/CMakeLists.txt
index 6bd7a6be..624ea643 100644
--- a/qt5/CMakeLists.txt
+++ b/qt5/CMakeLists.txt
@@ -1,5 +1,10 @@
 set(CMAKE_AUTOMOC ON)
 
+set(ENABLE_QT_STRICT_ITERATORS ON CACHE BOOL "Select whether to compile with QT_STRICT_ITERATORS. Leave it ON, unless your Qt lacks support, or your compiler can't do SRA optimization.")
+if(ENABLE_QT_STRICT_ITERATORS)
+  add_definitions(-DQT_STRICT_ITERATORS)
+endif()
+
 add_subdirectory(src)
 add_subdirectory(tests)
 add_subdirectory(demos)


More information about the poppler mailing list