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. Creator/cmake: How to set build folder before any temporary files are written?
QtWS25 Last Chance

Creator/cmake: How to set build folder before any temporary files are written?

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
8 Posts 2 Posters 1.1k Views
  • 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.
  • A Offline
    A Offline
    Asperamanca
    wrote on 19 Dec 2022, 09:14 last edited by
    #1

    When I open a cmakelists-File as a new project and select the kit, Creator immediately start generating files in my source folder, before I can specify a different build folder.

    How can I prevent that?

    1 Reply Last reply
    0
    • C Offline
      C Offline
      cristian-adam
      wrote on 19 Dec 2022, 09:37 last edited by
      #2

      In the Kit selection page, you can click on Details and select the build directory.

      Alternatively you can use CMake Presets to have control over the binaryDir. See https://www.qt.io/blog/qt-creator-9-cmakepresets for more details.

      A 1 Reply Last reply 19 Dec 2022, 09:42
      2
      • C cristian-adam
        19 Dec 2022, 09:37

        In the Kit selection page, you can click on Details and select the build directory.

        Alternatively you can use CMake Presets to have control over the binaryDir. See https://www.qt.io/blog/qt-creator-9-cmakepresets for more details.

        A Offline
        A Offline
        Asperamanca
        wrote on 19 Dec 2022, 09:42 last edited by
        #3

        @cristian-adam
        Do you mean the page "Build settings", section "CMake" item "Build directory"?

        Yes, that's where I can change it. But when I select the kit, Creator doesn't wait for me to specify a build directory. Since the default is the source folder, Creator immediately starts to pollute it with temporary files, before I have a chance to change the folder.

        1 Reply Last reply
        0
        • C Offline
          C Offline
          cristian-adam
          wrote on 19 Dec 2022, 14:30 last edited by
          #4

          No. I mean the Kit selection dialog, which is popped up when your project is first configured. You can delete your CMakeLists.txt.user file to get this dialog.

          See below:
          alt text

          A 1 Reply Last reply 20 Dec 2022, 08:28
          2
          • C cristian-adam
            19 Dec 2022, 14:30

            No. I mean the Kit selection dialog, which is popped up when your project is first configured. You can delete your CMakeLists.txt.user file to get this dialog.

            See below:
            alt text

            A Offline
            A Offline
            Asperamanca
            wrote on 20 Dec 2022, 08:28 last edited by
            #5

            @cristian-adam
            How do I get this view when I add a Kit to an existing project?

            1 Reply Last reply
            0
            • C Offline
              C Offline
              cristian-adam
              wrote on 20 Dec 2022, 10:50 last edited by
              #6

              You can do it in two ways:

              1. As written above, delete your CMakeLists.txt.user file after closing the project. Reopening the project will get you the dialog.
              2. In the CMake settings dialog right click on the existing kits and click on Disable. When you disabled all of them, you will get the dialog.
              A 1 Reply Last reply 20 Dec 2022, 11:10
              0
              • C cristian-adam
                20 Dec 2022, 10:50

                You can do it in two ways:

                1. As written above, delete your CMakeLists.txt.user file after closing the project. Reopening the project will get you the dialog.
                2. In the CMake settings dialog right click on the existing kits and click on Disable. When you disabled all of them, you will get the dialog.
                A Offline
                A Offline
                Asperamanca
                wrote on 20 Dec 2022, 11:10 last edited by
                #7

                @cristian-adam
                Thanks for elaborating.
                I wish there was a pause button for all the background tasks Creator is doing :-)

                1 Reply Last reply
                0
                • C Offline
                  C Offline
                  cristian-adam
                  wrote on 20 Dec 2022, 11:12 last edited by
                  #8

                  Depending on your project, you can disable some plugins that will be triggered after a project is loaded. (Qml, Testing).

                  Feel free to open a feature request at https://bugreports.qt.io/

                  1 Reply Last reply
                  0

                  8/8

                  20 Dec 2022, 11:12

                  • Login

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