Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. How to setup single build configuration to handle both qmake and CMake code compilation??
Forum Updated to NodeBB v4.3 + New Features

How to setup single build configuration to handle both qmake and CMake code compilation??

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
8 Posts 3 Posters 737 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Brijesh
    wrote on last edited by
    #1

    Dear team,

    Requirement is to have build configuration, so that qmake compile the application source code and after that CMake compile unit test cases for each software component. How it can be achieved in QT Creator environment with in single build configuration?

    Please let me know if there are existing references for the same, it would be great help.

    Thanks,

    Christian EhrlicherC 1 Reply Last reply
    0
    • B Brijesh

      Dear team,

      Requirement is to have build configuration, so that qmake compile the application source code and after that CMake compile unit test cases for each software component. How it can be achieved in QT Creator environment with in single build configuration?

      Please let me know if there are existing references for the same, it would be great help.

      Thanks,

      Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Brijesh said in How to setup single build configuration to handle both qmake and CMake code compilation??:

      be achieved in QT Creator environment with in single build configuration?

      It can't - use one build system for both tasks.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      B 1 Reply Last reply
      1
      • Christian EhrlicherC Christian Ehrlicher

        @Brijesh said in How to setup single build configuration to handle both qmake and CMake code compilation??:

        be achieved in QT Creator environment with in single build configuration?

        It can't - use one build system for both tasks.

        B Offline
        B Offline
        Brijesh
        wrote on last edited by
        #3

        @Christian-Ehrlicher
        Thank you so much for response.

        my application implemented as QT quick app and now I want to implement unit test for C++ backend code using the QT test framework. Please teach me what should be the right approach for unit test implementation? Windows 10 is the development environment.

        I don't want to have separate project Auto test project. Unit test code implementation need to be implemented for each software component in their respective directory path.

        I am stuck and looking for best possible solution for the project.

        SGaistS 1 Reply Last reply
        0
        • B Brijesh

          @Christian-Ehrlicher
          Thank you so much for response.

          my application implemented as QT quick app and now I want to implement unit test for C++ backend code using the QT test framework. Please teach me what should be the right approach for unit test implementation? Windows 10 is the development environment.

          I don't want to have separate project Auto test project. Unit test code implementation need to be implemented for each software component in their respective directory path.

          I am stuck and looking for best possible solution for the project.

          SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi,

          Did you already saw the QTest overview showing how to write tests with cmake ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          B 1 Reply Last reply
          1
          • SGaistS SGaist

            Hi,

            Did you already saw the QTest overview showing how to write tests with cmake ?

            B Offline
            B Offline
            Brijesh
            wrote on last edited by
            #5

            @SGaist
            Hi,

            Yes, I have created Auto test project and able to run test project as stand alone.

            Thanks,
            Brijesh

            SGaistS 1 Reply Last reply
            0
            • B Brijesh

              @SGaist
              Hi,

              Yes, I have created Auto test project and able to run test project as stand alone.

              Thanks,
              Brijesh

              SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              What exactly do you mean exactly by Auto test ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              B 1 Reply Last reply
              0
              • SGaistS SGaist

                What exactly do you mean exactly by Auto test ?

                B Offline
                B Offline
                Brijesh
                wrote on last edited by
                #7

                @SGaist
                Hi,

                Auto test means , used project template as "Other Project" on New Project- QT Creator window. Under "Other Project" template there are option to choose "Auto Test Project". Auto test project selection allow you to create and use different test framework Qt test, google test, Qt quick test, Boost Test and catch2.

                Thanks,
                Brijesh

                SGaistS 1 Reply Last reply
                0
                • B Brijesh

                  @SGaist
                  Hi,

                  Auto test means , used project template as "Other Project" on New Project- QT Creator window. Under "Other Project" template there are option to choose "Auto Test Project". Auto test project selection allow you to create and use different test framework Qt test, google test, Qt quick test, Boost Test and catch2.

                  Thanks,
                  Brijesh

                  SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  Why not use the example from the documentation to implement your tests since you want to use the QtTest module ?

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved