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 15 Jun 2023, 10:05 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,

    C 1 Reply Last reply 15 Jun 2023, 15:05
    0
    • B Brijesh
      15 Jun 2023, 10:05

      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,

      C Offline
      C Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on 15 Jun 2023, 15:05 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 15 Jun 2023, 15:20
      1
      • C Christian Ehrlicher
        15 Jun 2023, 15:05

        @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 15 Jun 2023, 15:20 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.

        S 1 Reply Last reply 15 Jun 2023, 19:12
        0
        • B Brijesh
          15 Jun 2023, 15:20

          @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.

          S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 15 Jun 2023, 19:12 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 16 Jun 2023, 08:13
          1
          • S SGaist
            15 Jun 2023, 19:12

            Hi,

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

            B Offline
            B Offline
            Brijesh
            wrote on 16 Jun 2023, 08:13 last edited by
            #5

            @SGaist
            Hi,

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

            Thanks,
            Brijesh

            S 1 Reply Last reply 16 Jun 2023, 20:28
            0
            • B Brijesh
              16 Jun 2023, 08:13

              @SGaist
              Hi,

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

              Thanks,
              Brijesh

              S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 16 Jun 2023, 20:28 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 19 Jun 2023, 09:00
              0
              • S SGaist
                16 Jun 2023, 20:28

                What exactly do you mean exactly by Auto test ?

                B Offline
                B Offline
                Brijesh
                wrote on 19 Jun 2023, 09:00 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

                S 1 Reply Last reply 19 Jun 2023, 19:43
                0
                • B Brijesh
                  19 Jun 2023, 09:00

                  @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

                  S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 19 Jun 2023, 19:43 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

                  1/8

                  15 Jun 2023, 10:05

                  • Login

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