Thread overview
Does ldc has an environment variable to refers to include paths ?
Jul 21, 2020
bioinfornatics
Jul 22, 2020
kinke
Jul 22, 2020
Johan
Jul 24, 2020
bioinfornatics
Jul 24, 2020
David Nadlinger
Jul 25, 2020
bioinfornatics
July 21, 2020
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
July 22, 2020
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.
July 22, 2020
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

July 24, 2020
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.
July 24, 2020
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
July 25, 2020
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