MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Vladislav Vaintroub Date:March 3 2010 11:29am
Subject:bzr commit into mysql-next-mr-bugfixing branch (vvaintroub:3100)
Bug#51488
View as plain text  
#At file:///home/vvaintroub/bzr/mysql-next-mr-cmake/ based on revid:wlad@stripped

 3100 Vladislav Vaintroub	2010-03-03
      Bug #51488 :missing features and change behavior in cmake runs compared to
      autotools runs
      - Fix recognition of --with-debug=full in configure wrapper
      - Remove CMakeCache.txt in configure wrapper, to match the original
      - Fix recognition of max-no-ndb
      - Fix broken dependencies of mysql_fix_privilege_table.sql from 
        mysql_system_tables.sql and mysql_system_tables_fix.sql
      - Add "distclean target" that informs user about appropriate bzr command
     @ cmake/configure.pl
        - Recognize --with-debug=full, map to WITH_DEBUG_FULL
        - remove CMakeCache.txt, so the configuration is no more sticky
        (to match the original configure behavior)
     @ cmake/plugin.cmake
        - Recognize WITH_MAX_NO_NDB, this fixes missing storage engines after BUILD/*max-no-ndb scripts
     @ mysql-test/CMakeLists.txt
        test-force uses the same macros (MTR_FORCE) as test-bt* now
     @ scripts/CMakeLists.txt
        - Fix broken dependency when producing mysql_fix_privilege_tables.sql, reported by Davi.
        We now concatenate 2 scripts in custom command that
        has dependency on both scripts rather than concatenating them at cmake time.
     @ sql/CMakeLists.txt
        Address frequently asked question "where is distclean" by implementing distclean target 
        that does nothing except pointing to appropriate 
        bzr command.
        
        It is better not to call "bzr clean-tree" automatically, without user consent.
        It could clean new files that were meant to be added.

    modified:
      cmake/configure.pl
      cmake/plugin.cmake
      mysql-test/CMakeLists.txt
      scripts/CMakeLists.txt
      sql/CMakeLists.txt
=== modified file 'cmake/configure.pl'
--- a/cmake/configure.pl	2010-02-24 18:51:45 +0000
+++ b/cmake/configure.pl	2010-03-03 11:29:34 +0000
@@ -179,6 +179,11 @@ foreach my $option (@ARGV)
     $cmakeargs = $cmakeargs." -DMYSQL_DATADIR=".substr($option,14); 
     next;
   }
+  if ($option =~ /with-debug=full/)
+  {
+    $cmakeargs = $cmakeargs." -DWITH_DEBUG_FULL=1"; 
+    next;
+  }
 
   $option = uc($option);
   $option =~ s/-/_/g;
@@ -186,5 +191,6 @@ foreach my $option (@ARGV)
 }
 
 print("configure.pl : calling cmake $srcdir $cmakeargs\n");
+unlink("CMakeCache.txt");
 my $rc = system("cmake $srcdir $cmakeargs");
 exit($rc);

=== modified file 'cmake/plugin.cmake'
--- a/cmake/plugin.cmake	2010-01-29 02:07:00 +0000
+++ b/cmake/plugin.cmake	2010-03-03 11:29:34 +0000
@@ -52,6 +52,11 @@ MACRO(MYSQL_ADD_PLUGIN)
     SET(WITH_${plugin} 1)
   ENDIF()
 
+  IF(WITH_MAX_NO_NDB)
+    SET(WITH_MAX 1)
+    SET(WITHOUT_NDBCLUSTER 1)
+  ENDIF()
+
   IF(WITH_${plugin}_STORAGE_ENGINE 
     OR WITH_{$plugin}
     OR WITH_ALL 

=== modified file 'mysql-test/CMakeLists.txt'
--- a/mysql-test/CMakeLists.txt	2010-02-24 19:19:24 +0000
+++ b/mysql-test/CMakeLists.txt	2010-03-03 11:29:34 +0000
@@ -64,12 +64,6 @@ ELSE()
 ENDIF()
 
 
-ADD_CUSTOM_TARGET(test-force
-  COMMAND ${SETCONFIG_COMMAND}
-  COMMAND ${SETOS_COMMAND}
-  COMMAND perl mysql-test-run.pl --force
-  WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-)
 
 SET(EXP --experimental=collections/default.experimental)
 IF(WIN32)
@@ -100,6 +94,11 @@ SET(TEST_BT_START
   COMMAND ${SET_ENV} MTR_BUILD_THREAD=auto
 )
 
+ADD_CUSTOM_TARGET(test-force
+  ${TEST_BT_START}
+  COMMAND ${MTR_FORCE}
+)
+
 ADD_CUSTOM_TARGET(test-bt
   ${TEST_BT_START}
   COMMAND ${MTR_FORCE} --comment=normal --timer  --skip-ndbcluster --report-features ${EXP}
@@ -124,4 +123,3 @@ ADD_CUSTOM_TARGET(test-bt-debug
   COMMAND ${MTR_FORCE} --comment=debug --timer  --skip-ndbcluster --skip-rpl --report-features ${EXP}
 )
 
-

=== modified file 'scripts/CMakeLists.txt'
--- a/scripts/CMakeLists.txt	2010-02-25 20:40:15 +0000
+++ b/scripts/CMakeLists.txt	2010-03-03 11:29:34 +0000
@@ -20,31 +20,41 @@ IF(NOT CMAKE_CROSSCOMPILING)
  TARGET_LINK_LIBRARIES(comp_sql)
 ENDIF()
 
-SET(FIX_PRIVS_IN 
-  ${CMAKE_CURRENT_SOURCE_DIR}/mysql_system_tables.sql
-  ${CMAKE_CURRENT_SOURCE_DIR}/mysql_system_tables_fix.sql
-)
-SET(FIX_PRIVILEGES_SQL
- ${CMAKE_CURRENT_BINARY_DIR}/mysql_fix_privilege_tables.sql
-)
 
 # Build mysql_fix_privilege_tables.sql (concatenate 2 sql scripts)
-FILE(WRITE ${FIX_PRIVILEGES_SQL} "")
-FOREACH(FILENAME ${FIX_PRIVS_IN})
-  FILE(READ "${FILENAME}" CONTENTS)
-  FILE(APPEND ${FIX_PRIVILEGES_SQL} "${CONTENTS}")
-ENDFOREACH()
+IF(NOT WIN32 OR CMAKE_CROSSCOMPILING)
+  FIND_PROGRAM(CAT_EXECUTABLE cat DOC "path to the executable")
+ENDIF()
 
+IF(CAT_EXECUTABLE)
+  SET(CAT_COMMAND COMMAND 
+    ${CMAKE_COMMAND} -E chdir  ${CMAKE_CURRENT_SOURCE_DIR}
+    ${CAT_EXECUTABLE} mysql_system_tables.sql mysql_system_tables_fix.sql >
+    ${CMAKE_CURRENT_BINARY_DIR}/mysql_fix_privilege_tables.sql
+  )
+ELSEIF(WIN32)
+  FILE(TO_NATIVE_PATH ${CMAKE_CURRENT_BINARY_DIR}/mysql_fix_privilege_tables.sql
+   native_outfile )
+  SET(CAT_COMMAND
+   COMMAND ${CMAKE_COMMAND} -E chdir ${CMAKE_CURRENT_SOURCE_DIR}
+   cmd /c copy /b mysql_system_tables.sql + mysql_system_tables_fix.sql
+   ${native_outfile} )
+ELSE()
+  MESSAGE(FATAL_ERROR "Cannot concatenate files")
+ENDIF()
 
 # Build mysql_fix_privilege_tables.c
 ADD_CUSTOM_COMMAND(
   OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/mysql_fix_privilege_tables_sql.c
+  ${CAT_COMMAND}
   COMMAND comp_sql
   mysql_fix_privilege_tables
   mysql_fix_privilege_tables.sql
   mysql_fix_privilege_tables_sql.c
-  DEPENDS comp_sql
   WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+  DEPENDS comp_sql
+  ${CMAKE_CURRENT_SOURCE_DIR}/mysql_system_tables.sql
+  ${CMAKE_CURRENT_SOURCE_DIR}/mysql_system_tables_fix.sql
 )
 
 # Add target for the above to be built

=== modified file 'sql/CMakeLists.txt'
--- a/sql/CMakeLists.txt	2010-02-24 19:19:24 +0000
+++ b/sql/CMakeLists.txt	2010-03-03 11:29:34 +0000
@@ -238,8 +238,12 @@ ADD_CUSTOM_TARGET(dist 
   WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
 )
 
-
-
+ADD_CUSTOM_TARGET(distclean
+  COMMAND ${CMAKE_COMMAND} -E echo  WARNING: distclean target is not functional
+  COMMAND ${CMAKE_COMMAND} -E echo  Use 'bzr clean-tree' with --unknown and/or
+    --ignored parameter instead
+  VERBATIM
+  )
 
 IF(INSTALL_LAYOUT STREQUAL "STANDALONE")
 


Attachment: [text/bzr-bundle] bzr/vvaintroub@mysql.com-20100303112934-8rfv85yrokaplfum.bundle
Thread
bzr commit into mysql-next-mr-bugfixing branch (vvaintroub:3100)Bug#51488Vladislav Vaintroub3 Mar