CMake: Add option to enable -Werror cflag in some areas
[blender.git] / extern / libmv / CMakeLists.txt
index 089743567f0e5bf2ee05f04253fae96b35ee3a03..eb43285fdec3714181333cae143142594b6d27ee 100644 (file)
@@ -37,6 +37,11 @@ set(SRC
        libmv-capi.h
 )
 
+if(WITH_LIBMV_WERROR)
+       ADD_CHECK_C_COMPILER_FLAG(CMAKE_C_FLAGS C_WERROR -Werror)
+       ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS C_WERROR -Werror)
+endif()
+
 if(WITH_LIBMV OR WITH_GTESTS OR (WITH_CYCLES AND WITH_CYCLES_LOGGING))
        list(APPEND INC
                third_party/gflags