digitalmars.D.learn - How to share 'version' info between files
- Dwayne Robinson (13/13) Nov 04 2005 How can you share version information between several modules?
- Stewart Gordon (20/29) Nov 04 2005 The issue cropped up a while back:
- Dwayne Robinson (4/15) Nov 04 2005 Hmm :-| Thank you.
- Georg Wrede (3/21) Nov 04 2005 How about declaring constants that are not used _in actual_ code, but
- Jarrett Billingsley (4/6) Nov 04 2005 Only problem with that is that static ifs can't be used at the module le...
How can you share version information between several modules? I have several switches that I want to set which would be overkill to set all on the command line. So I created a single file that all the others import, which would wonderfully except the compiler ignores version information from other modules. I would love to use 'static if' if not for it being useless at the module level :-| Anyone solved this problem? --- config.d --- version=MMX; version=FastBlit; version=... --- several other files --- import config;
Nov 04 2005
Dwayne Robinson wrote:How can you share version information between several modules? I have several switches that I want to set which would be overkill to set all on the command line. So I created a single file that all the others import, which would wonderfully except the compiler ignores version information from other modules. I would love to use 'static if' if not for it being useless at the module level :-| Anyone solved this problem?The issue cropped up a while back: http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D/11981 A workaround is to have a configuration file and use the command line syntax. For example ----- version.cmd ----- version=qwert version=yuiop ----------- dmd version.cmd module.d or something like this.... Stewart. -- -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS/M d- s:- C++ a->--- UB P+ L E W++ N+++ o K- w++ O? M V? PS- PE- Y? PGP- t- 5? X? R b DI? D G e++>++++ h-- r-- !y ------END GEEK CODE BLOCK------ My e-mail is valid but not my primary mailbox. Please keep replies on the 'group where everyone may benefit.
Nov 04 2005
The issue cropped up a while back: http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D/11981 A workaround is to have a configuration file and use the command line syntax. For example ----- version.cmd ----- version=qwert version=yuiop ----------- dmd version.cmd module.d or something like this.... Stewart.Hmm :-| Thank you. After reading your "version import" suggestion, I really wish that was implemented. -Dwayne
Nov 04 2005
Dwayne Robinson wrote:How about declaring constants that are not used _in actual_ code, but which are tested with static ifs?The issue cropped up a while back: http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D/11981 A workaround is to have a configuration file and use the command line syntax. For example ----- version.cmd ----- version=qwert version=yuiop ----------- dmd version.cmd module.d or something like this.... Stewart.Hmm :-| Thank you. After reading your "version import" suggestion, I really wish that was implemented.
Nov 04 2005
"Georg Wrede" <georg.wrede nospam.org> wrote in message news:436BEE7B.3090105 nospam.org...How about declaring constants that are not used _in actual_ code, but which are tested with static ifs?Only problem with that is that static ifs can't be used at the module level. :\
Nov 04 2005