On 2/2/2011 9:59 AM, Micha Renner wrote:
Am Mittwoch, den 02.02.2011, 09:12 -0500 schrieb Bill Hoffman:
On 2/2/2011 6:10 AM, Micha Renner wrote:
Am Mittwoch, den 02.02.2011, 12:00 +0100 schrieb Emmanuel Blot:
Hello,

How to disable the new warnings CMake 2.8.4-rc2 emits, such as the
following ones?

I support this question too.

There should be a way to switch off this feature of CMake, especially
when variables are used uninitialized.


Currently, there is no way to turn this off.  Are the warnings valid?
In my case not. My approach was uninitialized variables do not hurt.
An example (pseudo code):
The first thing I do is a platform check.
IF(MSVC)
        UseAndFind(TLIBWIN)
ELSEIF(APPLE)
        UseAndFind(TLIBQUARTZ)
ELSEIF(UNIX)
        UseAndFind(TLIBUNIX)
END()

Then somewhere in the build-tree:
        TARGET_LINK_LIBRARIES(tm ${TLIBWIN} ${TLIBQUARTZ} ${TLIBUNIX})
That was a simple solution.

It would be interesting to see, what your CMakeLists(Version 1.0) file
says :)

It should not warn about that by default. It only warns by default for unused variables passed on the command line.

-Bill
_______________________________________________
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

Reply via email to