MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Vladislav Vaintroub Date:November 17 2010 9:06pm
Subject:bzr commit into mysql-5.5-bugteam branch (vvaintroub:3127) Bug#58272
View as plain text  
#At file:///H:/bzr-new/mysql-5.5-bugteam/ based on revid:mats.kindahl@stripped

 3127 Vladislav Vaintroub	2010-11-17
      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.

    modified:
      CMakeLists.txt
      cmake/build_configurations/mysql_release.cmake
=== modified file 'CMakeLists.txt'
--- a/CMakeLists.txt	2010-11-13 22:16:52 +0000
+++ b/CMakeLists.txt	2010-11-17 21:06:24 +0000
@@ -79,12 +79,12 @@ ELSEIF(NOT HAVE_CMAKE_BUILD_TYPE OR OLD_
   SET(OLD_WITH_DEBUG 0 CACHE INTERNAL "" FORCE)
 ENDIF()
 
-IF(BUILD_CONFIG)
-  SET(CMAKE_USER_MAKE_RULES_OVERRIDE 
-    ${CMAKE_SOURCE_DIR}/cmake/build_configurations/${BUILD_CONFIG}.cmake)
-ENDIF()
 
 PROJECT(MySQL)
+IF(BUILD_CONFIG)
+  INCLUDE(
+  ${CMAKE_SOURCE_DIR}/cmake/build_configurations/${BUILD_CONFIG}.cmake)
+ENDIF()
 
 # Include the platform-specific file. To allow exceptions, this code
 # looks for files in order of how specific they are. If there is, for

=== modified file 'cmake/build_configurations/mysql_release.cmake'
--- a/cmake/build_configurations/mysql_release.cmake	2010-10-08 13:30:58 +0000
+++ b/cmake/build_configurations/mysql_release.cmake	2010-11-17 21:06:24 +0000
@@ -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()


Attachment: [text/bzr-bundle] bzr/vvaintroub@mysql.com-20101117210624-dpsad7q6wt66o1tv.bundle
Thread
bzr commit into mysql-5.5-bugteam branch (vvaintroub:3127) Bug#58272Vladislav Vaintroub17 Nov