On 05/31/2012 05:30 AM, Stephen Kelly wrote:
> I see cmGlobalUnixMakefileGenerator3::AddCXXCompileCommand gave me the wrong
> idea I think.
I never noticed that one, thanks.
>> and similarly in Ninja. The "} else {" construct is not consistent
>> with style in the rest of our code.
>
> Both fixed.
See the patch below for what I meant.
> Another change in my newest push is that I've moved the storage of the
> shared library flags from inside the
>
> } // end if in try compile
>
> to inside the
>
> } // end for each language
>
> I noticed when running the unit tests that I was getting the policy warning
> otherwise because the flags were not actually being stored.
Good catch.
Thanks,
-Brad
diff --git a/Source/cmMakefileTargetGenerator.cxx
b/Source/cmMakefileTargetGenerator.cxx
index a071a2a..451283b 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -265,7 +265,9 @@ std::string cmMakefileTargetGenerator::GetFlags(const
std::string &l)
if (this->LocalGenerator->GetShouldUseOldFlags(shared, l))
{
this->LocalGenerator->AddSharedFlags(flags, lang, shared);
- } else {
+ }
+ else
+ {
// Add position independendent flags, if needed.
if (this->Target->GetPropertyAsBool("POSITION_INDEPENDENT_CODE"))
{
diff --git a/Source/cmNinjaTargetGenerator.cxx
b/Source/cmNinjaTargetGenerator.cxx
index edd17f7..2191422 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -149,7 +149,9 @@ cmNinjaTargetGenerator::ComputeFlagsForObject(cmSourceFile
*source,
if (this->LocalGenerator->GetShouldUseOldFlags(shared, language))
{
this->LocalGenerator->AddSharedFlags(flags, language.c_str(), shared);
- } else {
+ }
+ else
+ {
if (this->Target->GetPropertyAsBool("POSITION_INDEPENDENT_CODE"))
{
// Add position independendent flags, if needed.
--
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers