How do people typically manage their workspace? (i.e. build folder clutter)



  • Hi – simple question. I have a workspace defined for learning Qt where all my projects are saved, etc. It also seems like the default location for saving the debug and release builds. I would like to change that.

    What I end up with it is:
    marble_test1 <- project folder
    build-marble_test1-Desktop_Qt_5_5_1_clang_64bit-Debug <- debug folder

    I am coming from a Flex background where things are saved to bin-debug and bin-release directories within the project directory – that is what I would like to set up (unless someone tells me that is a "Bad Thing To Do").

    I see in the QtCreator prefs that there is a default build path (below) but I don't understand it enough to change it.

    ../build-%{CurrentProject:Name}-%{CurrentKit:FileSystemName}-%{CurrentBuild:Name}

    Can someone explain what I need to edit in the above path?

    – thanks!


  • Qt Champions 2016

    Hi I have installed a ramdisk and just change it to use that drive (e:)

    e:/build-%{CurrentProject:Name}-%{CurrentKit:FileSystemName}-%{CurrentBuild:Name}

    you could make folder on c:\builds and set it to that

    c:/builds/build-%{CurrentProject:Name}-%{CurrentKit:FileSystemName}-%{CurrentBuild:Name}


  • Moderators

    unless someone tells me that is a "Bad Thing To Do"

    It's not "bad", but it's a lot cleaner to keep the build dirs out of the source tree, especially if you're keeping your project in some version controlled code repository. This way you're not polluting the source with build artifacts and it's a little easier to move/delete/share the source.

    The default build directory is just that - the default that will be used when you're first configuring your project. It's just a convenience feature and you can change the path later for each individual project in the "Projects" tab Build Settings under "Build directory".

    The snippet provided by default is just a standard path with some variables. ".." means "directory up" and variables are placed in %{}. You can click the "AB" icon to see a list of possible variables and what they expand to.

    To get bin-release you would use bin-%{CurrentBuild:Type}, but I suggest you build out of source tree and use something like ../bin-%{CurrentBuild:Type}



  • @Chris-Kawa

    It's not "bad", but it's a lot cleaner to keep the build dirs out of the source tree

    Good point. With Flex/Flash Builder and git, I used the gitIgnore file to keep things tidy but right now I am just learning so not using any source control.

    (I should probably be spending more time on the "learning" part and less on the "housekeeping" part.. . ;-)

    thanks!



  • @TOMATO_QT said:

    I have a workspace defined for learning Qt where all my projects are save

    I also has such a folder.

    What I did is took the original path and updated it as follow :

    ../builds/%{CurrentProject:Name}-%{CurrentKit:FileSystemName}-%{CurrentBuild:Name}
    

    So now in my test folder I have one builds folder and in there it contains the builds for all other applications and tests.



  • @TheBadger

    That seems what I am looking for: just to not clutter up my project folder with lots of "build" folders. etc.

    thanks!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.