Commit daf73844 authored by Jonathan Perkin's avatar Jonathan Perkin

No need to save/restore C*FLAGS, they are only used for one script.

Use CMAKE_*_FLAGS_RELWITHDEBINFO for C*FLAGS expansion, they are
the most likely to contain the flags we need.
parent 261c5436
......@@ -90,15 +90,13 @@ IF(MALLOC_LIB)
ENDIF()
IF(CMAKE_GENERATOR MATCHES "Makefiles")
# No multiconfig build - use CMAKE_C_FLAGS
SET(CFLAGS "@CMAKE_C_FLAGS@")
SET(CXXFLAGS "@CMAKE_CXX_FLAGS@")
SET(CFLAGS "@CMAKE_C_FLAGS_RELWITHDEBINFO@")
SET(CXXFLAGS "@CMAKE_CXX_FLAGS_RELWITHDEBINFO@")
FOREACH(ARCH ${CMAKE_OSX_ARCHITECTURES})
SET(CFLAGS "${CFLAGS} -arch ${ARCH}")
SET(CXXFLAGS "${CXXFLAGS} -arch ${ARCH}")
ENDFOREACH()
ELSE()
# Multiconfig build - use CMAKE_C_FLAGS_RELWITHDEBINFO
SET(CFLAGS "@CMAKE_C_FLAGS_RELWITHDEBINFO@")
SET(CXXFLAGS "@CMAKE_CXX_FLAGS_RELWITHDEBINFO@")
ENDIF()
......@@ -144,16 +142,10 @@ SET(HOSTNAME "hostname")
# and expand default cmake variables
SET(CC ${CMAKE_C_COMPILER})
SET(CXX ${CMAKE_CXX_COMPILER})
# Override CFLAGS for mysqlbug then reset
SET(BACKUP_CFLAGS ${CFLAGS})
SET(BACKUP_CXXFLAGS ${CXXFLAGS})
SET(CFLAGS ${CMAKE_C_FLAGS_RELWITHDEBINFO})
SET(CXXFLAGS ${CMAKE_CXX_FLAGS_RELWITHDEBINFO})
#
SET(SAVE_CC ${CMAKE_C_COMPILER})
SET(SAVE_CXX ${CMAKE_CXX_COMPILER})
SET(SAVE_CFLAGS ${CMAKE_C_FLAGS_RELWITHDEBINFO})
SET(SAVE_CXXFLAGS ${CMAKE_CXX_FLAGS_RELWITHDEBINFO})
SET(SAVE_CFLAGS ${CFLAGS})
SET(SAVE_CXXFLAGS ${CXXFLAGS})
# XXX no cmake equivalent for this, just make one up
SET(CONFIGURE_LINE "Built using CMake")
......@@ -183,10 +175,6 @@ INSTALL_SCRIPT(${CMAKE_CURRENT_BINARY_DIR}/mysqlbug
COMPONENT Server
)
# Reset CFLAGS/CXXFLAGS back
SET(CFLAGS ${BACKUP_CFLAGS})
SET(CXXFLAGS ${BACKUP_CXXFLAGS})
ENDIF(UNIX)
# Really ugly, one script, "mysql_install_db", needs prefix set to ".",
......
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