enable -Werror only for 'libs' and 'dbms' ; add 'cmake .. -DNO_WERROR… (#372)

* enable -Werror only for 'libs' and 'dbms' ; add 'cmake .. -DNO_WERROR=1'  option

* add -Werror for utils
This commit is contained in:
proller 2017-01-19 22:30:58 +03:00 committed by alexey-milovidov
parent 7201e2846a
commit 04d2149e8a
4 changed files with 16 additions and 1 deletions

View File

@ -50,7 +50,7 @@ if (NOT AARCH64)
set (MACHINE_FLAGS "-msse4 -mpopcnt")
endif ()
set (COMMON_WARNING_FLAGS "-Wall -Werror")
set (COMMON_WARNING_FLAGS "-Wall")
set (CXX_WARNING_FLAGS "-Wnon-virtual-dtor")
set (CXX11_ABI "ENABLE" CACHE STRING "Use C++11 ABI: DEFAULT, ENABLE, DISABLE")

View File

@ -15,6 +15,11 @@ if (NOT ENABLE_LIBTCMALLOC)
add_definitions(-DNO_TCMALLOC)
endif ()
if (NOT NO_WERROR)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
endif ()
add_subdirectory (src)
add_library(string_utils

View File

@ -1,3 +1,8 @@
if (NOT NO_WERROR)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
endif ()
add_subdirectory (libcommon)
add_subdirectory (libpocoext)
add_subdirectory (libmysqlxx)

View File

@ -1,5 +1,10 @@
include(${CMAKE_SOURCE_DIR}/cmake/dbms_include.cmake)
if (NOT NO_WERROR)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
endif ()
add_subdirectory (compressor)
add_subdirectory (iotest)
add_subdirectory (corrector_utf8)