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
This commit is contained in:
parent
1636db5443
commit
a40f29ab19
@ -14,7 +14,8 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# 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()
|
||||
ENDIF()
|
||||
|
||||
@ -40,11 +41,7 @@ FOREACH(F ${MY_WARNING_FLAGS})
|
||||
MY_CHECK_AND_SET_COMPILER_FLAG(${F} DEBUG RELWITHDEBINFO)
|
||||
ENDFOREACH()
|
||||
|
||||
IF(CMAKE_SYSTEM_NAME MATCHES AIX)
|
||||
SET(MY_ERROR_FLAGS "")
|
||||
ELSE()
|
||||
SET(MY_ERROR_FLAGS -Werror)
|
||||
ENDIF()
|
||||
SET(MY_ERROR_FLAGS -Werror)
|
||||
|
||||
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)
|
||||
|
@ -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_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -maix64 -pthread -mcmodel=large")
|
||||
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)")
|
||||
|
Loading…
x
Reference in New Issue
Block a user