Re: [CMake] Error on uninitialized vars?

2011-05-26 Thread Johan Björk
Hi,

Basically we "need" to compile a few files with specific flags (only
in release builds, and we had no test that checked for this) and I had
a typo in the flag variable, resulting no extra flags being set.

SET_SOURCE_FILES_PROPERTIES(some.cpp files.cpp PROPERTIES
COMPILE_FLAGS "${SPECIAL_Flgs}")

/Johan


On Wed, May 25, 2011 at 6:12 PM, David Cole  wrote:
> Johan,
>
> I do not think there's a built-in way to make these warnings into errors...
> It would be easy enough to do, but it's not there right now.
>
> One reason is that most projects were developed with the understanding that
> ${uninitialized_variable} resolves to empty. Many projects even depend on
> this, and so making it a warning first (that must be explicitly turned on),
> seemed to be the right way to approach it.
>
> I'm curious: what sorts of "nasty bugs" did you find...?
>
>
> HTH,
> David
>
>
> On Tue, May 24, 2011 at 7:42 AM, Johan Björk  wrote:
>>
>> Hi guys,
>>
>> I just discovered the --warn-uninitialized flag to cmake, and in the
>> process found some really nasty bugs. Is there any way to enable this
>> from the CMakeLists.txt files? Is there a corresponding
>> --error-uninitialized value?
>>
>> Thanks
>> /Johan
>> ___
>> 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://www.cmake.org/mailman/listinfo/cmake
>
>
___
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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Error on uninitialized vars?

2011-05-25 Thread David Cole
Johan,

I do not think there's a built-in way to make these warnings into errors...
It would be easy enough to do, but it's not there right now.

One reason is that most projects were developed with the understanding that
${uninitialized_variable} resolves to empty. Many projects even depend on
this, and so making it a warning first (that must be explicitly turned on),
seemed to be the right way to approach it.

I'm curious: what sorts of "nasty bugs" did you find...?


HTH,
David


On Tue, May 24, 2011 at 7:42 AM, Johan Björk  wrote:

> Hi guys,
>
> I just discovered the --warn-uninitialized flag to cmake, and in the
> process found some really nasty bugs. Is there any way to enable this
> from the CMakeLists.txt files? Is there a corresponding
> --error-uninitialized value?
>
> Thanks
> /Johan
> ___
> 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://www.cmake.org/mailman/listinfo/cmake
>
___
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://www.cmake.org/mailman/listinfo/cmake

[CMake] Error on uninitialized vars?

2011-05-24 Thread Johan Björk
Hi guys,

I just discovered the --warn-uninitialized flag to cmake, and in the
process found some really nasty bugs. Is there any way to enable this
from the CMakeLists.txt files? Is there a corresponding
--error-uninitialized value?

Thanks
/Johan
___
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://www.cmake.org/mailman/listinfo/cmake