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

Don't use aux_source_directory in new CMake projects

    XMLWordPrintable

Details

    Description

      When creating a new CMake project, the list of sources gets defined in CMakeLists.txt as

      aux_source_directory(. SRC_LIST)
      

      However, this is bad practice, because CMake cannot notice when new files are added to the project until it is explicity re-run. Cf. https://cmake.org/cmake/help/v3.6/command/aux_source_directory.html

      Instead, Creator should use explicitly set SRC_LIST, maybe leaving room for adding more files:

      set(SRC_LIST
        newly_created_file.c
      )
      

      Attachments

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

        Activity

          People

            hunger Tobias Hunger
            dg0yt Kai Pastor
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes