pcc/CMake — comment on commit f2c8f7b789758dd42a90ea2c52c2564f2b4e549f
File:  line 0
By polrop:

On Sun, Oct 2, 2011 at 8:11 PM, pcc

wrote:
> On Thu, Sep 29, 2011 at 12:34:33AM -0700, Nicolas Despres wrote:
>> The point was to prevent name clash in project mixing Fortran and C/C++ languages.
>
> Since these are build-statement local variables, I can't see how
> the name clash might happen. This could become an issue if we were
> to use global variables in subninja files to split the build.ninja
> file into targets, but currently we don't do that, and in any case,
> if we did, we'd need to rethink variable mappings anyway.
>

Well, at the beginning, I planned to use a flags.ninja files to store
global variables with default value for the build-statement local
variables that's why I prefixed them with the language name like for
the rules. Since it is finally not the case I agree with you.

>> Also I think linking an object where the source language does not match the link language is not a good idea, but I have no evidence of that.
>
> This is a completely normal, supported scenario for many applications.
> For example, linking C object files and C++ object files requires a
> C++ link language.

I was more thinking about Fortran and C/C++, but I'm ok with your example.

Cheers,

--
Nicolas Desprès