[cmake-developers] Adding Swift support to CMake

Stephen Kelly steveire at gmail.com
Wed Jul 8 15:19:50 EDT 2015


Brad King wrote:

> On 07/08/2015 03:04 PM, Stephen Kelly wrote:
>> I guess. I think part of the reason it seems wrong to me is that there is
>> a platform id called 'APPLE' (different case) and a variable of that name
>> 
>> There is also an existing GNU platorm/compiler id (same case).
>> 
>> If the same name is to be used, is there any reason not to use the same
>> case?
> 
> All compiler id values use CamelCase or are acronyms.  The variable
> named "APPLE" is historical and meant to match the __APPLE__
> preprocessor macro.  Compiler id values are different.
> 
> What do you think of Ben's "AppleSwift" suggestion?

It made me wonder what would AppleClang be called if it was introduced in 
the future. If the Swift compiler id is 'Apple', and the Clang CXX compiler 
id was 'Apple' then we would have, eg

 Apple-CXX.cmake
 Apple-Swift.cmake

instead of 

 AppleClang-CXX.cmake
 Apple-Swift.cmake

or 

 AppleClang-CXX.cmake
 AppleSwift-Swift.cmake

Seen this way, it looks like 'Apple' is the future proof compiler id and 
'AppleClang' is the outlier (an alias could be introduced).

So, I don't think the name 'Apple' is so strange anymore.

Thanks,

Steve.




More information about the cmake-developers mailing list