www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ldc - Does ldc has an environment variable to refers to include paths ?

reply bioinfornatics <bioinfornatics fedoraproject.org> writes:
Dear,

C and C++ have both C_INCLUDE_PATH and CPLUS_INCLUDE_PATH
such env var is really helpful I would like to know if ldc has a 
D_INCLUDE_PATH ?

if not, is it possible to introduce this feature?

thanks


Best regards
Jul 21 2020
parent reply kinke <noone nowhere.com> writes:
On Tuesday, 21 July 2020 at 09:18:37 UTC, bioinfornatics wrote:
 C and C++ have both C_INCLUDE_PATH and CPLUS_INCLUDE_PATH
 such env var is really helpful I would like to know if ldc has 
 a D_INCLUDE_PATH ?

 if not, is it possible to introduce this feature?
No and I wouldn't approve of such magic. DFLAGS can be used to a similar effect when using ldmd2.
Jul 22 2020
parent reply Johan <j j.nl> writes:
On Wednesday, 22 July 2020 at 08:43:05 UTC, kinke wrote:
 On Tuesday, 21 July 2020 at 09:18:37 UTC, bioinfornatics wrote:
 C and C++ have both C_INCLUDE_PATH and CPLUS_INCLUDE_PATH
 such env var is really helpful I would like to know if ldc has 
 a D_INCLUDE_PATH ?

 if not, is it possible to introduce this feature?
No and I wouldn't approve of such magic. DFLAGS can be used to a similar effect when using ldmd2.
I agree we shouldn't add that hardcoded into the compiler. Possibly we could add support for environment variables in ldc2.conf. -Johan
Jul 22 2020
parent reply bioinfornatics <bioinfornatics fedoraproject.jorg> writes:
On Wednesday, 22 July 2020 at 09:33:42 UTC, Johan wrote:
 On Wednesday, 22 July 2020 at 08:43:05 UTC, kinke wrote:
 On Tuesday, 21 July 2020 at 09:18:37 UTC, bioinfornatics wrote:
 C and C++ have both C_INCLUDE_PATH and CPLUS_INCLUDE_PATH
 such env var is really helpful I would like to know if ldc 
 has a D_INCLUDE_PATH ?

 if not, is it possible to introduce this feature?
No and I wouldn't approve of such magic. DFLAGS can be used to a similar effect when using ldmd2.
I agree we shouldn't add that hardcoded into the compiler. Possibly we could add support for environment variables in ldc2.conf. -Johan
Such env var would be helpful on HPC computing. Indeed most of worldwide grid use the "environment module" -> https://github.com/cea-hpc/modules I found this article which describe well this technology: https://www.admin-magazine.com/HPC/Articles/Environment-Modules In short to allow multiple version of same tools, "environment module" use PATH, C_INCLUDE_PATH, LD_CONFIG_PATH, PYTHONPATH and others to reach this goal. But in D that seem not easy to do it as this env var do not exist.
Jul 24 2020
parent reply "David Nadlinger" <code klickverbot.at> writes:
On 24 Jul 2020, at 22:21, bioinfornatics via digitalmars-d-ldc wrote:
 But in D that seem not easy to do it as this env var do not exist.
Is DFLAGS not sufficient for what you want? —David
Jul 24 2020
parent bioinfornatics <bioinfornatics fedoraproject.jorg> writes:
On Friday, 24 July 2020 at 22:02:49 UTC, David Nadlinger wrote:
 On 24 Jul 2020, at 22:21, bioinfornatics via digitalmars-d-ldc 
 wrote:
 But in D that seem not easy to do it as this env var do not 
 exist.
Is DFLAGS not sufficient for what you want? —David
I will give a try with it Thanks
Jul 24 2020