Commit efc96e57 authored by Davi Arnaut's avatar Davi Arnaut

Strip maintainer mode options from the flags written to

mysql_config. Those are mainly warning options intended
to monitor the server code and shouldn't be leaked to
client code.
parent 4bb985ff
...@@ -91,16 +91,18 @@ ENDIF() ...@@ -91,16 +91,18 @@ ENDIF()
IF(CMAKE_GENERATOR MATCHES "Makefiles") IF(CMAKE_GENERATOR MATCHES "Makefiles")
# No multiconfig build - use CMAKE_C_FLAGS # No multiconfig build - use CMAKE_C_FLAGS
SET(CFLAGS "@CMAKE_C_FLAGS@") # Strip maintainer mode options if necessary
SET(CXXFLAGS "@CMAKE_CXX_FLAGS@") STRING(REPLACE "${MY_MAINTAINER_C_WARNINGS}" "" CFLAGS "${CMAKE_C_FLAGS}")
STRING(REPLACE "${MY_MAINTAINER_CXX_WARNINGS}" "" CXXFLAGS "${CMAKE_CXX_FLAGS}")
FOREACH(ARCH ${CMAKE_OSX_ARCHITECTURES}) FOREACH(ARCH ${CMAKE_OSX_ARCHITECTURES})
SET(CFLAGS "${CFLAGS} -arch ${ARCH}") SET(CFLAGS "${CFLAGS} -arch ${ARCH}")
SET(CXXFLAGS "${CXXFLAGS} -arch ${ARCH}") SET(CXXFLAGS "${CXXFLAGS} -arch ${ARCH}")
ENDFOREACH() ENDFOREACH()
ELSE() ELSE()
# Multiconfig build - use CMAKE_C_FLAGS_RELWITHDEBINFO # Multiconfig build - use CMAKE_C_FLAGS_RELWITHDEBINFO
SET(CFLAGS "@CMAKE_C_FLAGS_RELWITHDEBINFO@") # Strip maintainer mode options if necessary
SET(CXXFLAGS "@CMAKE_CXX_FLAGS_RELWITHDEBINFO@") STRING(REPLACE "${MY_MAINTAINER_C_WARNINGS}" "" CFLAGS "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
STRING(REPLACE "${MY_MAINTAINER_CXX_WARNINGS}" "" CXXFLAGS "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
ENDIF() ENDIF()
IF(UNIX) IF(UNIX)
......
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