Commit abcf6cce authored by knielsen@mysql.com's avatar knielsen@mysql.com

Changes to make testsuite run in CMake build tree.

parent dc2f25a8
...@@ -1497,7 +1497,7 @@ int main(int argc, char** argv) ...@@ -1497,7 +1497,7 @@ int main(int argc, char** argv)
the server the server
*/ */
#ifdef __WIN__ #if defined(__WIN__) && !defined(USING_CMAKE)
#include "my_decimal.h" #include "my_decimal.h"
#include "decimal.c" #include "decimal.c"
#include "my_decimal.cpp" #include "my_decimal.cpp"
......
...@@ -954,16 +954,25 @@ sub executable_setup () { ...@@ -954,16 +954,25 @@ sub executable_setup () {
if ( $glob_win32 ) if ( $glob_win32 )
{ {
$path_client_bindir= mtr_path_exists("$glob_basedir/client_release", $path_client_bindir= mtr_path_exists("$glob_basedir/client_release",
"$glob_basedir/bin"); "$glob_basedir/bin",
# New CMake locations.
"$glob_basedir/client/release",
"$glob_basedir/client/debug");
$exe_mysqld= mtr_exe_exists ("$path_client_bindir/mysqld-max", $exe_mysqld= mtr_exe_exists ("$path_client_bindir/mysqld-max",
"$path_client_bindir/mysqld-nt", "$path_client_bindir/mysqld-nt",
"$path_client_bindir/mysqld", "$path_client_bindir/mysqld",
"$path_client_bindir/mysqld-debug",); "$path_client_bindir/mysqld-debug",
$path_language= mtr_path_exists("$glob_basedir/share/english/"); "$glob_basedir/sql/release/mysqld",
$path_charsetsdir= mtr_path_exists("$glob_basedir/share/charsets"); "$glob_basedir/sql/debug/mysqld");
$path_language= mtr_path_exists("$glob_basedir/share/english/",
"$glob_basedir/sql/share/english/");
$path_charsetsdir= mtr_path_exists("$glob_basedir/share/charsets",
"$glob_basedir/sql/share/charsets");
$exe_my_print_defaults= $exe_my_print_defaults=
mtr_exe_exists("$path_client_bindir/my_print_defaults"); mtr_exe_exists("$path_client_bindir/my_print_defaults",
"$glob_basedir/extra/release/my_print_defaults",
"$glob_basedir/extra/debug/my_print_defaults");
} }
else else
{ {
......
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX") SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX") SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
ADD_DEFINITIONS(-DUSE_TLS -DMYSQL_CLIENT) # The old Windows build method used renamed (.cc -> .cpp) source files, fails
# in #include in mysqlbinlog.cc. So disable that using the USING_CMAKE define.
ADD_DEFINITIONS(-DUSE_TLS -DUSING_CMAKE)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/zlib ${CMAKE_SOURCE_DIR}/zlib
${CMAKE_SOURCE_DIR}/extra/yassl/include ${CMAKE_SOURCE_DIR}/extra/yassl/include
${CMAKE_SOURCE_DIR}/libmysql) ${CMAKE_SOURCE_DIR}/libmysql
${CMAKE_SOURCE_DIR}/regex
${CMAKE_SOURCE_DIR}/sql
${CMAKE_SOURCE_DIR}/strings)
ADD_LIBRARY(mysqlclient ../mysys/array.c ../strings/bchange.c ../strings/bmove.c ADD_LIBRARY(mysqlclient ../mysys/array.c ../strings/bchange.c ../strings/bmove.c
../strings/bmove_upp.c ../mysys/charset-def.c ../mysys/charset.c ../strings/bmove_upp.c ../mysys/charset-def.c ../mysys/charset.c
...@@ -47,3 +52,26 @@ ADD_DEPENDENCIES(mysqlclient GenError) ...@@ -47,3 +52,26 @@ ADD_DEPENDENCIES(mysqlclient GenError)
ADD_EXECUTABLE(mysql completion_hash.cc mysql.cc readline.cc sql_string.cc) ADD_EXECUTABLE(mysql completion_hash.cc mysql.cc readline.cc sql_string.cc)
LINK_DIRECTORIES(${MYSQL_BINARY_DIR}/mysys ${MYSQL_BINARY_DIR}/zlib) LINK_DIRECTORIES(${MYSQL_BINARY_DIR}/mysys ${MYSQL_BINARY_DIR}/zlib)
TARGET_LINK_LIBRARIES(mysql mysqlclient mysys yassl zlib dbug yassl taocrypt wsock32) TARGET_LINK_LIBRARIES(mysql mysqlclient mysys yassl zlib dbug yassl taocrypt wsock32)
ADD_EXECUTABLE(mysqltest mysqltest.c)
TARGET_LINK_LIBRARIES(mysqltest mysqlclient mysys yassl zlib dbug regex wsock32)
ADD_EXECUTABLE(mysqlcheck mysqlcheck.c)
TARGET_LINK_LIBRARIES(mysqlcheck mysqlclient dbug yassl zlib wsock32)
ADD_EXECUTABLE(mysqldump mysqldump.c ../sql-common/my_user.c)
TARGET_LINK_LIBRARIES(mysqldump mysqlclient mysys dbug yassl zlib wsock32)
ADD_EXECUTABLE(mysqlimport mysqlimport.c)
TARGET_LINK_LIBRARIES(mysqlimport mysqlclient mysys dbug yassl zlib wsock32)
ADD_EXECUTABLE(mysqlshow mysqlshow.c)
TARGET_LINK_LIBRARIES(mysqlshow mysqlclient mysys dbug yassl zlib wsock32)
ADD_EXECUTABLE(mysqlbinlog mysqlbinlog.cc ../mysys/mf_tempdir.c ../mysys/my_new.cc
../mysys/my_bit.c ../mysys/my_bitmap.c ../mysys/my_vle.c
../mysys/base64.c)
TARGET_LINK_LIBRARIES(mysqlbinlog mysqlclient dbug yassl zlib wsock32)
ADD_EXECUTABLE(mysqladmin mysqladmin.cc)
TARGET_LINK_LIBRARIES(mysqladmin mysqlclient mysys dbug yassl zlib wsock32)
...@@ -19,3 +19,5 @@ ADD_CUSTOM_TARGET(GenError ...@@ -19,3 +19,5 @@ ADD_CUSTOM_TARGET(GenError
ADD_EXECUTABLE(my_print_defaults my_print_defaults.c)
TARGET_LINK_LIBRARIES(my_print_defaults strings mysys dbug taocrypt odbc32 odbccp32 wsock32)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment