mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
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
This commit is contained in:
parent
01ee0f9677
commit
273d74eaa5
5 changed files with 45 additions and 22 deletions
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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}
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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")
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue