CMake: Remove per-module Werror settings
authorSergey Sharybin <sergey.vfx@gmail.com>
Fri, 29 Jan 2016 23:04:52 +0000 (00:04 +0100)
committerSergey Sharybin <sergey.vfx@gmail.com>
Fri, 29 Jan 2016 23:04:52 +0000 (00:04 +0100)
Seems i was the only one who was really up to using it and
i do have gcc-5 finally backported and installed here so
such a fine-tune flags are no longer needed.

CMakeLists.txt
intern/cycles/CMakeLists.txt
intern/opensubdiv/CMakeLists.txt
source/blender/blenkernel/CMakeLists.txt
source/blender/compositor/CMakeLists.txt

index ae224f2a53d37051096c4825d9150097b3febaad..20215fb27df49868e4193b72cd5b393914e03700 100644 (file)
@@ -233,12 +233,8 @@ option(WITH_OPENCOLORIO   "Enable OpenColorIO color management" ${_init_OPENCOLO
 
 # Compositor
 option(WITH_COMPOSITOR         "Enable the tile based nodal compositor" ON)
-option(WITH_COMPOSITOR_WERROR  "Treat warnings as errors in compositor code" OFF)
-mark_as_advanced(WITH_COMPOSITOR_WERROR)
 
 option(WITH_OPENSUBDIV    "Enable OpenSubdiv for surface subdivision" _init_OPENSUBDIV)
-option(WITH_SUBSURF_WERROR  "Treat warnings as errors in subsurf code" OFF)
-mark_as_advanced(WITH_COMPOSITOR_WERROR)
 
 option(WITH_OPENVDB       "Enable features relying on OpenVDB" OFF)
 option(WITH_OPENVDB_BLOSC "Enable blosc compression for OpenVDB, only enable if OpenVDB was built with blosc support" OFF)
@@ -350,9 +346,7 @@ endif()
 # Camera/motion tracking
 option(WITH_LIBMV         "Enable Libmv structure from motion library" ON)
 option(WITH_LIBMV_SCHUR_SPECIALIZATIONS "Enable fixed-size schur specializations." OFF)
-option(WITH_LIBMV_WERROR  "Treat warnings as errors in Libmv (and Blender's motion tracking) code")
 mark_as_advanced(WITH_LIBMV_SCHUR_SPECIALIZATIONS)
-mark_as_advanced(WITH_LIBMV_WERROR)
 
 # Freestyle
 option(WITH_FREESTYLE     "Enable Freestyle (advanced edges rendering)" ON)
@@ -395,10 +389,8 @@ mark_as_advanced(CYCLES_CUDA_BINARIES_ARCH)
 unset(PLATFORM_DEFAULT)
 option(WITH_CYCLES_LOGGING     "Build Cycles with logging support" ON)
 option(WITH_CYCLES_DEBUG       "Build Cycles with extra debug capabilities" OFF)
-option(WITH_CYCLES_WERROR      "Treat warnings as errors in Cycles code" OFF)
 mark_as_advanced(WITH_CYCLES_LOGGING)
 mark_as_advanced(WITH_CYCLES_DEBUG)
-mark_as_advanced(WITH_CYCLES_WERROR)
 
 option(WITH_CUDA_DYNLOAD "Dynamically load CUDA libraries at runtime" ON)
 mark_as_advanced(WITH_CUDA_DYNLOAD)
index 6d1c6bf6c9523518e8dd8a26e8b4fad23345fba8..bd75f4d0d17851df699dc89b236cfa0d7f80bae8 100644 (file)
@@ -14,11 +14,6 @@ include(cmake/external_libs.cmake)
 # todo: this code could be refactored a bit to avoid duplication
 # note: CXX_HAS_SSE is needed in case passing SSE flags fails altogether (gcc-arm)
 
-if(WITH_CYCLES_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(NOT WITH_CPU_SSE)
        set(CXX_HAS_SSE FALSE)
        set(CXX_HAS_AVX FALSE)
index a4dfe33972864491d20660702234353475e2e0aa..311b89b97cfa7b0ba909e6eb7635f5a812bad384 100644 (file)
@@ -49,11 +49,6 @@ set(SRC
        opensubdiv_intern.h
 )
 
-if(WITH_SUBSURF_WERROR)
-       ADD_CHECK_C_COMPILER_FLAG(CMAKE_C_FLAGS C_WERROR -Werror)
-       ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS C_WERROR -Werror)
-endif()
-
 macro(OPENSUBDIV_DEFINE_COMPONENT component)
        if(${${component}})
                add_definitions(-D${component})
index b0a105bb910483f7ac7904d000e40d45299de5d9..7177ddc3e6d7c5700f9eb96fbb13668c9ae216da 100644 (file)
@@ -470,20 +470,6 @@ if(WITH_LIBMV)
        add_definitions(-DWITH_LIBMV)
 endif()
 
-if(WITH_LIBMV_WERROR)
-       if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
-               set_source_files_properties(intern/tracking.c
-                                           intern/tracking_auto.c
-                                           intern/tracking_detect.c
-                                           intern/tracking_plane_tracker.c
-                                           intern/tracking_region_tracker.c
-                                           intern/tracking_solver.c
-                                           intern/tracking_stabilize.c
-                                           intern/tracking_util.c
-                                           PROPERTIES COMPILE_FLAGS -Werror)
-       endif()
-endif()
-
 if(WITH_FFTW3)
        list(APPEND INC_SYS
                ${FFTW3_INCLUDE_DIRS}
@@ -505,16 +491,6 @@ if(WITH_OPENSUBDIV)
                ../../../intern/opensubdiv
                ${OPENSUBDIV_INCLUDE_DIRS}
        )
-       if(WITH_SUBSURF_WERROR)
-               if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
-                       set_source_files_properties(intern/CCGSubSurf.c
-                                                   intern/CCGSubSurf_legacy.c
-                                                   intern/CCGSubSurf_opensubdiv.c
-                                                   intern/CCGSubSurf_opensubdiv_converter.c
-                                                   intern/CCGSubSurf_util.c
-                                                   PROPERTIES COMPILE_FLAGS -Werror)
-               endif()
-       endif()
 endif()
 
 if(WITH_OPENVDB)
index f0ac709e7641e874e47ccc533679d870ce3b98d0..6ad8be719cef7f290825183e55a96951f430a183 100644 (file)
@@ -542,11 +542,6 @@ list(APPEND INC
        ${CMAKE_CURRENT_BINARY_DIR}/operations
 )
 
-if(WITH_COMPOSITOR_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(MSVC)
        set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} /arch:SSE2")
        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:SSE2")