Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-79671

Qt5CoreConfigExtras.cmake adds -fPIC to languages that it shouldn't (like CUDA)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.14.1, 5.15.0 Alpha
    • 5.12.5
    • Build System
    • None
    • CUDA Toolkit 10.0
      GCC 6.5.0
      Ubuntu 18.04
    • d5608ca43756ed62678e60215da71827dd26a900 (qt/qtbase/5.14)

    Description

      Qt5CoreConfigExtras.cmake adds -fPIC to the INTERFACE_COMPILE_OPTIONS for the Qt5::Core imported target. This should be in a conditional generator expression so that it only applies to the C and CXX languages. Otherwise -fPIC will get added to CUDA compilers like nvcc which (annoyingly) choke on this. Something like:

      $<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:-fPIC>

       

      Attachments

        For Gerrit Dashboard: QTBUG-79671
        # Subject Branch Project Status CR V

        Activity

          People

            jbornema Joerg Bornemann
            nocnokneo Taylor Braun-Jones
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes