Hi all,

I would like to check if one piece of code generates a warning or not (about a deprecated method). I want to use TRY_COMPILE and adds -Werror to gcc flags.

I have tried the following:

TRY_COMPILE(VTK_FFMPEG_GUESSFORMAT
         ${VTK_BINARY_DIR}/CMakeTmp
         ${VTK_CMAKE_DIR}/vtkFFMPEGTestGuessFormat.cxx
         CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:STRING=${FFMPEG_INCLUDE_DIR}"
           -DCOMPILE_DEFINITIONS:STRING=-D${VTK_FFMPEG_CDEFS}
           -DCOMPILE_DEFINITIONS:STRING=-D__STDC_CONSTANT_MACROS
          "-DLINK_LIBRARIES:STRING=${FFMPEG_avformat_LIBRARY}"
          "-DCMAKE_CXX_FLAGS:STRING=-Werror"
         OUTPUT_VARIABLE OUTPUT)

But VTK_FFMPEG_GUESSFORMAT is still true...

Any idea?

Thanks,
Arnaud
_______________________________________________
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