[Poppler-bugs] [Bug 103591] New: CMake: building with BUILD_QT4_TESTS=NO fails

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Nov 6 14:08:52 UTC 2017


https://bugs.freedesktop.org/show_bug.cgi?id=103591

            Bug ID: 103591
           Summary: CMake: building with BUILD_QT4_TESTS=NO fails
           Product: poppler
           Version: unspecified
          Hardware: Other
                OS: Linux (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: general
          Assignee: poppler-bugs at lists.freedesktop.org
          Reporter: r.hieber at pengutronix.de

Hi,

I want to explicitely disable tests in poppler-0.60.1 because I don't need them
when building for embedded systems. However, when calling CMake I get the
following error message:

        $ rm CMakeCache.txt; cmake -DENABLE_QT4=ON -DBUILD_QT4_TESTS=NO
        [...]
        CMake Error at cmake/modules/PopplerMacros.cmake:18
(add_custom_target):
          add_custom_target cannot create target "buildtests" because another
target
          with the same name already exists.  The existing target is a custom
target
          created in source directory "/ptx/work/bohne/rhi/poppler/qt4/tests". 
See
          documentation for policy CMP0002 for more details.
        Call Stack (most recent call first):
          qt4/demos/CMakeLists.txt:27 (poppler_add_test)


        Building Poppler with support for:
          font configuration:   fontconfig
          splash output:        yes
          cairo output:         yes
          qt4 wrapper:          yes
          qt5 wrapper:          yes
          glib wrapper:         yes
            introspection:      no
            gtk-doc:            no
          cpp wrapper:          yes
          use libjpeg:          yes
          use libpng:           yes
          use libtiff:          yes
          use zlib compress:    yes
          use zlib uncompress:  no
          use nss3:             no
          use curl:             yes
          use libopenjpeg:      yes
              with openjpeg2
          use cms:              yes
              with lcms2
          command line utils:   yes
          test data dir:        /ptx/work/bohne/rhi/poppler/../test
        -- Configuring incomplete, errors occurred!
        See also "/ptx/work/bohne/rhi/poppler/CMakeFiles/CMakeOutput.log".
        See also "/ptx/work/bohne/rhi/poppler/CMakeFiles/CMakeError.log".

CMakeOutput.log and CMakeError.log don't seem to contain related errors, so I
have left them out for now.

I have tried some print-debugging, the error happens when calling
`poppler_add_test(poppler_qt4viewer, BUILD_QT4_TESTS)` in
qt4/demos/CMakeLists.txt. However, the calls to poppler_add_test() from
qt4/test/CMakeLists.txt, which are executed before that, are successful.

The same error also happens with the Qt5 version:

        $ cmake -DENABLE_QT5=ON -DBUILD_QT5_TESTS=NO
        [...]
        CMake Error at cmake/modules/PopplerMacros.cmake:18
(add_custom_target):
          add_custom_target cannot create target "buildtests" because another
target
          with the same name already exists.  The existing target is a custom
target
          created in source directory "/ptx/work/bohne/rhi/poppler/qt5/tests". 
See
          documentation for policy CMP0002 for more details.
        Call Stack (most recent call first):
          qt5/demos/CMakeLists.txt:35 (poppler_add_test)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/poppler-bugs/attachments/20171106/bcfdda74/attachment.html>


More information about the Poppler-bugs mailing list