diff options
author | Jonathan Perkin <jonathan.perkin@oracle.com> | 2010-07-05 15:44:40 +0100 |
---|---|---|
committer | Jonathan Perkin <jonathan.perkin@oracle.com> | 2010-07-05 15:44:40 +0100 |
commit | daf738448b8243af7a9a3741d8893cec0f579a58 (patch) | |
tree | bc1792abb74d71fd07c00cf2d24e958a4484ef4d /scripts | |
parent | 261c543610ca98208ca10695a6dde804448fb189 (diff) | |
download | mariadb-git-daf738448b8243af7a9a3741d8893cec0f579a58.tar.gz |
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.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/CMakeLists.txt | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index 4513b4619f8..6ea81d8a484 100755 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -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 ".", |