Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 6 of 6 total
Thread Conditional compilation requirement
Fri, Feb 3 2017 6:33 AMPermanent Link

Matthew Jones

Turns out that I cannot use a unit for conditional compilation control. This is a major lack IMO, which would be good to have improved.

If I have a unit uBuildControl.wbs with {$DEFINE DEBUG_CHANGES} in the interface and include that unit in another unit uWorkStuff, the definition is not passed to the uWorkStuff compile, so conditionals that depend on it do not work.

It is therefore not possible to have a global define that controls activity across a project. I'd like this to work, separately/along with the idea of a general project defined option. That way I could set an option in the project (e.g. "VER_ADMIN") and then use that in the uBuildControl to determine individual options, and then each other unit can be controlled by them.

--

Matthew Jones
Wed, Feb 8 2017 2:49 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Matthew,

<< Turns out that I cannot use a unit for conditional compilation control. This is a major lack IMO, which would be good to have improved.

If I have a unit uBuildControl.wbs with {$DEFINE DEBUG_CHANGES} in the interface and include that unit in another unit uWorkStuff, the definition is not passed to the uWorkStuff compile, so conditionals that depend on it do not work.

It is therefore not possible to have a global define that controls activity across a project. I'd like this to work, separately/along with the idea of a general project defined option. That way I could set an option in the project (e.g. "VER_ADMIN") and then use that in the uBuildControl to determine individual options, and then each other unit can be controlled by them. >>

Yep, still on the list, waiting until the next round of UI changes for the IDE.  These types of changes require re-taking of screen shots galore, as well as documentation modifications.  That is why they take so long to implement.

Tim Young
Elevate Software
www.elevatesoft.com
Thu, Feb 9 2017 4:42 AMPermanent Link

Matthew Jones

Tim Young [Elevate Software] wrote:

> These types of changes require re-taking of screen shots galore, as well as documentation modifications.  That is why they take so long to implement.

There you go with that perfection again. 8-)

--

Matthew Jones
Fri, May 8 2020 1:33 PMPermanent Link

Douglas Lyman

Unless I am missing something, you still cannot create a global define.
Fri, May 8 2020 2:50 PMPermanent Link

Douglas Lyman

OK, It is working.  

Note to self:  You cannot comment out a define (// {$DEFINE...)
Mon, May 11 2020 11:59 AMPermanent Link

Douglas Lyman

Scratch previous.

Changes made to a compiler directive {$DEFINE... do not take effect if the project has been run at least once in the IDE.  You have to close the project and recompile.  Potentially dangerous.
Image