Commit a40f29ab authored by Sergei Golubchik's avatar Sergei Golubchik

MYSQL_MAINTAINER_MODE fixes

* MSVC check was lost in a bad merge
* add a comment
* move AIX check where it belongs and where it would still
  allow -Werror, if desired
parent 1636db54
...@@ -14,7 +14,8 @@ ...@@ -14,7 +14,8 @@
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA
IF(MYSQL_MAINTAINER_MODE STREQUAL "NO") IF(MSVC OR MYSQL_MAINTAINER_MODE STREQUAL "NO")
# Windows support is in cmake/os/Windows.cmake, not here
RETURN() RETURN()
ENDIF() ENDIF()
...@@ -40,11 +41,7 @@ FOREACH(F ${MY_WARNING_FLAGS}) ...@@ -40,11 +41,7 @@ FOREACH(F ${MY_WARNING_FLAGS})
MY_CHECK_AND_SET_COMPILER_FLAG(${F} DEBUG RELWITHDEBINFO) MY_CHECK_AND_SET_COMPILER_FLAG(${F} DEBUG RELWITHDEBINFO)
ENDFOREACH() ENDFOREACH()
IF(CMAKE_SYSTEM_NAME MATCHES AIX) SET(MY_ERROR_FLAGS -Werror)
SET(MY_ERROR_FLAGS "")
ELSE()
SET(MY_ERROR_FLAGS -Werror)
ENDIF()
IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_C_COMPILER_VERSION VERSION_LESS "6.0.0") IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_C_COMPILER_VERSION VERSION_LESS "6.0.0")
SET(MY_ERROR_FLAGS ${MY_ERROR_FLAGS} -Wno-error=maybe-uninitialized) SET(MY_ERROR_FLAGS ${MY_ERROR_FLAGS} -Wno-error=maybe-uninitialized)
......
...@@ -33,3 +33,6 @@ ELSE() ...@@ -33,3 +33,6 @@ ELSE()
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -maix64 -pthread -mcmodel=large") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -maix64 -pthread -mcmodel=large")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -maix64 -pthread -mcmodel=large") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -maix64 -pthread -mcmodel=large")
ENDIF() ENDIF()
# make it WARN by default, not AUTO (that implies -Werror)
SET(MYSQL_MAINTAINER_MODE "WARN" CACHE STRING "Enable MariaDB maintainer-specific warnings. One of: NO (warnings are disabled) WARN (warnings are enabled) ERR (warnings are errors) AUTO (warnings are errors in Debug only)")
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment