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

Cmake superproject with several subprojects

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: Not Evaluated
    • Resolution: Unresolved
    • Affects Version/s: Qt Creator 4.15.0
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      CentOS8, cmake 3.20.2, QtCreator 5.15.0
    • Platform/s:
      Linux/X11

      Description

      I would like to create a Cmake superproject which call several subprojects.

       

      To do that, I add the following command in my cmake superproject:

      add_subdirectory(source_dir binary_dir) where:

      source_dir=/absolute/path/to/my/subproject

      binary_dir=subproject_name

       

      In this case, I have several issues:

      1 - The source file of the subprojects don't appear in the project manager tree

      2 - If my superproject contains only 1 subproject, the superproject works well. The table of couples (Key, Value) in cmake compiler parameters contains parameters of this subproject. I can build the whole superproject.

      3 - If my superproject contains several subprojects,  I have several issues in this case. The table of couples (Key, Value) in cmake compiler parameters contains only parameters of the first subproject. Therefore, the second subproject don't build.

       

        Attachments

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

          Activity

            People

            Assignee:
            cadam Cristian Adam
            Reporter:
            phfr83 phfr83
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes