I have a file in one of our projects that defines a variable that affects the behavior of most of the other modules throughout the project. Let's call it custom.h
. It looks like this:
#pragma once
#define BUILD 3 // 1: personal, 2: select, 3: elite
Throughout the project there are numerous references to this variable to control behavior between product editions. Changing this value triggers a rebuild of most of the project. What I'd like to do is create separate Build Configurations, one for each edition, so that it only rebuilds modified files, not the entire project, when I make a change to the edition.
If I have three Configurations, one for each edition, is there a way to get Visual Studio not to rebuild when a change is made to this custom.h
file if the edition matched what was built for that Configuration already? IE, if I set BUILD to 3 and build with the Elite Configuration, then change BUILD to 2 and build with the Select Configuration, I don't want it to rebuild the whole project, because the Intermediary Files for Select should already exist.
The Configurations all have their own Intermediary Directories as well as their own Output Directories. It feels like I'm close to what I need, but some advice at this point would be invaluable.