cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
esiemiat
Level 9

Compile from IDE

Is there any way to determine if a script is being compiled from the IDE? We want to force our managers to use product builds that are marked as official on our build machines, instead of the ones we create for testing on our development machines.

I was wondering if there was a special preprocessor constant defined by the IDE that we could use in a preprocessor condition that would compile a special secition of code that marks the build as test only. If not, is there an environment variable like CL, that would tell the IDE to pass an extra command line argument to the compiler. I know we could do this manually, but I was wondering if there was some automatic way to detect this.
Labels (1)
0 Kudos
(1) Reply
MichaelU
Level 12 Flexeran
Level 12 Flexeran

I don't think the IDE defines anything special; in general our goal is to minimize the difference between IDE and command-line builds. It would probably be easier to do the reverse by adding something to your build script which defines a variable for your official builds.

(Although if you're tricky, you may be able to simulate your preference by setting a default define and overriding it to empty in your official build. Of course your code can do anything it wants with the #ifdef, so it's probably easier and safer to not expect anything from the IDE - a new release may not pick up the setting.)
0 Kudos