Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-16737

Qt Creator discards important information in CMakeCache.txt

    XMLWordPrintable

Details

    Description

      Qt Creator removes

      //Result of TRY_COMPILE
      THREADS_HAVE_PTHREAD_ARG:INTERNAL=TRUE
      //Result of TRY_RUN
      THREADS_PTHREAD_ARG:INTERNAL=2

      from CMakeCache.txt, this causes my compile to fail when including a threads library, such as pthreads. This does not happen if I generate cmake files with cmake or cmake-gui.
      The cmake source lines that include this would be

      set(THREADS_PREFER_PTHREAD_FLAG ON)
      find_package(Threads REQUIRED)
      target_link_libraries(MyTarget Threads::Threads)

      The obvious solution is to leave the CMakeCache.txt in tact after cmake generated it, or at least not remove pthread related information.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            hunger Tobias Hunger
            dragoon Rafaƫl Kooi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes