[cmake-developers] Adding logic to CMake for -fPIE and -fPIC
Brad King
brad.king at kitware.com
Wed May 30 14:45:43 EDT 2012
On 05/30/2012 02:22 PM, Stephen Kelly wrote:
> Brad King wrote:
>> Also the code near calls to GetShouldUseOldFlags is not
>> indented with our convention.
>
> I've had a look, and I don't see the breaks from the convention. Can you say
> what commits and hunks?
In the makefile generator:
+ if (this->LocalGenerator->GetShouldUseOldFlags(shared, l))
+ {
+ this->LocalGenerator->AddSharedFlags(flags, lang, shared);
+ } else {
+ // Add position independendent flags, if needed.
+ if (this->Target->GetPropertyAsBool("POSITION_INDEPENDENT_CODE"))
+ {
+ this->LocalGenerator->AddPositionIndependentFlags(flags,
+ lang,
+ targetType);
+ }
+ if (shared)
+ {
+ this->LocalGenerator->AppendFeatureOptions(flags, lang, "DLL");
+ }
+ }
and similarly in Ninja. The "} else {" construct is not consistent
with style in the rest of our code.
> I haven't tried to implement the XCode patch
> I might be able to try making one at some point in the next few weeks, but
> if someone else can do that, it would be great.
Thanks for your patience with so many rounds of review.
I think the topic is in good shape other than for Xcode.
I'll try to look at Xcode when I get a chance.
-Brad
More information about the cmake-developers
mailing list