chkaufmann 17 Posted August 29, 2022 Hi, I use FastMM5 in a unit for logging, however I don't want this unit/code to be compiled into my IDE package. Is there a predefined constant for an IFDEF to see if my unit is compiled in an application or into a package? Or do I have to create my own constant for this? Christian Share this post Link to post
Fr0sT.Brutal 900 Posted August 29, 2022 (edited) "Package-specific Compiler Directives" help topic. However it doesn't contain anything like "IFDEF PACKAGE". I'm afraid there's no straight way to do it, only some kinds of workarounds Edited August 29, 2022 by Fr0sT.Brutal Share this post Link to post
chkaufmann 17 Posted August 29, 2022 This is not what I need. I need a constant so I can exclude code (and put some dummy code) when the unit goes to the package. Christian Share this post Link to post
SwiftExpat 65 Posted August 29, 2022 It is what you need, consider how you are building the package, specifically the run time and design time flags you are setting, use the above: 2 hours ago, Fr0sT.Brutal said: "Package-specific Compiler Directives" Test the mix of $DESIGNONLY and $RUNONLY that fits your usage. 1 Share this post Link to post
Remy Lebeau 1394 Posted August 29, 2022 9 hours ago, chkaufmann said: Is there a predefined constant for an IFDEF to see if my unit is compiled in an application or into a package? No, there is not. You would have to create your own conditional in the Package's project options. 9 hours ago, chkaufmann said: Or do I have to create my own constant for this? Yes. Share this post Link to post