From be93a81172071c412b5c890c06c691ce4c5054ec Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Wed, 17 Nov 2010 22:06:24 +0100 Subject: Bug#58272: -DBUILD_CONFIG=mysql_release is broken with cmake 2.8.3 The reason for the bug is that : - we use system checks in cmake/os/mysql_release.cmake - we include cmake/os/mysql_release.cmake using CMAKE_USER_MAKE_RULES_OVERRIDE - this (having system checks based on TRY_COMPILE inside file pointed by CMAKE_USER_MAKE_RULES_OVERRIDE does not work with cmake 2.8.3, and according to Kitware was never meant to work, it just happened to work by accident until 2.8.2 release (though, it seems not to work wiith 2.6.0 either) Related CMake bug discussing the situation: http://public.kitware.com/Bug/view.php?id=11469 The fix is to use INCLUDE instead of CMAKE_USER_MAKE_RULES_OVERRIDE as suggested by Kitware. The downside is that compile flags are not in cache, but this is pure cosmetics. The functionality is the same, flags are used for compiling are correct using INCLUDE. --- cmake/build_configurations/mysql_release.cmake | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'cmake/build_configurations') diff --git a/cmake/build_configurations/mysql_release.cmake b/cmake/build_configurations/mysql_release.cmake index 48d3765ea67..b3f7cdefd95 100644 --- a/cmake/build_configurations/mysql_release.cmake +++ b/cmake/build_configurations/mysql_release.cmake @@ -219,22 +219,4 @@ IF(UNIX) ENDIF() ENDIF() ENDIF() - - IF(CMAKE_C_FLAGS_DEBUG) - SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}" - CACHE STRING "Debug C compile flags") - ENDIF() - IF(CMAKE_CXX_FLAGS_DEBUG) - SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}" - CACHE STRING "Debug C++ compile flags") - ENDIF() - IF(CMAKE_C_FLAGS_RELWITHDEBINFO) - SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}" - CACHE STRING "RelWithDebInfo C compile flags") - ENDIF() - IF(CMAKE_CXX_FLAGS_RELWITHDEBINFO) - SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}" - CACHE STRING "RelWithDebInfo C++ compile flags") - ENDIF() - ENDIF() -- cgit v1.2.1