Author Topic: Exclude Projects from Workspace Rebuild?  (Read 3807 times)

Offline aphirst

  • Single posting newcomer
  • *
  • Posts: 5
Exclude Projects from Workspace Rebuild?
« on: March 01, 2017, 05:53:53 pm »
I have a workspace which contains the projects (names replaced) "myproj", "dep1" and "dep2". In the settings for "myproj", both "dep"s are marked as Project Dependencies. This means that if there are changes to source files in either "dep", the "dep" is also built whenever I build the main project. So far, so good.

However, whenever I click "rebuild" on the Compiler toolbar in the main C::B window, all three projects are rebuilt, not just the active "myproj". The dependencies are somewhat large, especially compared to my project, so it seems excessive to do this. What I would like to do is have the "rebuild" button only rebuild my active project, not the entire workspace. Is this possible somehow? I've tried to work it out in the settings but haven't had much luck, and similarly asked in the IRC channel to no avail. Searching the forums for keywords like "exclude project workspace rebuild" didn't yield anything relevant.

If anyone wants me to clarify my question, feel free to ask. :)

Offline cacb

  • Lives here!
  • ****
  • Posts: 536
Re: Exclude Projects from Workspace Rebuild?
« Reply #1 on: March 01, 2017, 06:09:26 pm »
Good point. I have seen this also. An special option to rebuild a single project but not its dependencies would be useful.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7576
    • My Best Post
Re: Exclude Projects from Workspace Rebuild?
« Reply #2 on: March 01, 2017, 06:21:57 pm »
Remove the project dependencies.

I prefer to use the external dependencies without using any project dependencies.

Tim S.
 
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7576
    • My Best Post
Re: Exclude Projects from Workspace Rebuild?
« Reply #3 on: March 01, 2017, 06:33:49 pm »
Good point. I have seen this also. An special option to rebuild a single project but not its dependencies would be useful.

Create a separate workspace with no project dependencies.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Online Commaster

  • Almost regular
  • **
  • Posts: 171
Re: Exclude Projects from Workspace Rebuild?
« Reply #4 on: March 01, 2017, 06:36:30 pm »
What happens, if you right-click the project on the side panel and select Rebuild there?

Offline aphirst

  • Single posting newcomer
  • *
  • Posts: 5
Re: Exclude Projects from Workspace Rebuild?
« Reply #5 on: March 01, 2017, 06:44:49 pm »
What happens, if you right-click the project on the side panel and select Rebuild there?
I get the exact same behaviour as I mention in my original post.

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5489
Re: Exclude Projects from Workspace Rebuild?
« Reply #6 on: March 01, 2017, 08:23:01 pm »
I think this is a good suggestion, to indeed have a non recursive (non dependency) build, sometimes I also wish for that. Certainly when for example you are depending on like +-100 libraries, then I takes a lot of time to just visit tehm all to conclude nothing needs to be done there.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Exclude Projects from Workspace Rebuild?
« Reply #7 on: March 01, 2017, 09:22:47 pm »
I made a experimental plugin that can do this: https://github.com/bluehazzard/cbSelectiveCompiling
It won't work with the current Codeblocks, because it is a squirrel plugin, but i think this would be an idea to port.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Exclude Projects from Workspace Rebuild?
« Reply #8 on: March 02, 2017, 12:20:16 am »
This is not a feature a plugin should implement. It should be added to the compiler plugin.

@killerbot: The slowness is a cb problem and not a problem with checking file's timestamps. I think I have a partial solution in the works.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline cacb

  • Lives here!
  • ****
  • Posts: 536
Re: Exclude Projects from Workspace Rebuild?
« Reply #9 on: March 02, 2017, 08:32:27 am »

Create a separate workspace with no project dependencies.

Tim S.

I have, and want to have, a single workspace with the dependencies described. I don't want to model the same dependencies in multiple workspaces to work around this issue. It is just that sometimes, as you are editing the source of one of the projects, you know you will have to rebuild the current project, but not the projects upon which it depends. It is as simple as that.

All my projects generate object files and binaries in a .cmp subfolder. My current work around for the above situation is to delete that subfolder and hit build instead of rebuild. I guess if C::B could offer an option to "Clear this project but not the dependencies" it would be a way to handle this situation.