mirror of
https://github.com/MariaDB/server.git
synced 2025-01-27 09:14:17 +01:00
Fixes for cmake2.8
This commit is contained in:
parent
20b785c0fb
commit
a15d4127fd
4 changed files with 24 additions and 24 deletions
|
@ -19,16 +19,14 @@ SET(CMAKE_CURRENT_BINARY_DIR "@CMAKE_CURRENT_BINARY_DIR@")
|
|||
SET(MYSQLD_EXECUTABLE "@MYSQLD_EXECUTABLE@")
|
||||
SET(CMAKE_CFG_INTDIR "@CMAKE_CFG_INTDIR@")
|
||||
SET(WIN32 "@WIN32@")
|
||||
# Force Visual Studio to output to stdout
|
||||
IF(ENV{VS_UNICODE_OUTPUT})
|
||||
SET ($ENV{VS_UNICODE_OUTPUT})
|
||||
IF(CMAKE_CFG_INTDIR)
|
||||
IF(CONFIG)
|
||||
MESSAGE(${CONFIG})
|
||||
ENDIF()
|
||||
IF(CMAKE_CFG_INTDIR AND CONFIG)
|
||||
#Resolve build configuration variables
|
||||
STRING(REPLACE "${CMAKE_CFG_INTDIR}" ${CONFIG} MYSQLD_EXECUTABLE
|
||||
"${MYSQLD_EXECUTABLE}")
|
||||
ELSE()
|
||||
MESSAGE(FATAL_ERROR "Please provide CONFIG parameter to the script")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
# Create bootstrapper SQL script
|
||||
|
@ -44,9 +42,8 @@ FOREACH(FILENAME mysql_system_tables.sql mysql_system_tables_data.sql
|
|||
ENDFOREACH()
|
||||
|
||||
|
||||
MAKE_DIRECTORY(data)
|
||||
FILE(REMOVE_RECURSE data/mysql)
|
||||
MAKE_DIRECTORY(data/mysql)
|
||||
FILE(REMOVE_RECURSE mysql)
|
||||
MAKE_DIRECTORY(mysql)
|
||||
IF(WIN32)
|
||||
SET(CONSOLE --console)
|
||||
ENDIF()
|
||||
|
|
|
@ -209,7 +209,8 @@ IF(WIN32)
|
|||
ADD_DEFINITIONS("-DWIN32_LEAN_AND_MEAN")
|
||||
IF (MSVC_VERSION GREATER 1400)
|
||||
# Speed up multiprocessor build
|
||||
ADD_DEFINITIONS("/MP")
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
|
||||
ENDIF()
|
||||
|
||||
# default to x86 platform. We'll check for X64 in a bit
|
||||
|
|
|
@ -76,13 +76,12 @@ SET(FIX_PRIVILEGES_SQL
|
|||
)
|
||||
|
||||
# Build mysql_fix_privilege_tables.sql (concatenate 2 sql scripts)
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${FIX_PRIVILEGES_SQL}
|
||||
COMMAND ${CMAKE_COMMAND} "-DIN=${FIX_PRIVS_IN}" "-DOUT=${FIX_PRIVILEGES_SQL}"
|
||||
-P "${CMAKE_SOURCE_DIR}/cmake/cat.cmake"
|
||||
VERBATIM
|
||||
DEPENDS ${FIX_PRIVS_IN}
|
||||
)
|
||||
FILE(WRITE ${FIX_PRIVILEGES_SQL} "")
|
||||
FOREACH(FILENAME ${FIX_PRIVS_IN})
|
||||
FILE(READ "${FILENAME}" CONTENTS)
|
||||
FILE(APPEND ${FIX_PRIVILEGES_SQL} "${CONTENTS}")
|
||||
ENDFOREACH()
|
||||
|
||||
|
||||
# Build mysql_fix_privilege_tables.c
|
||||
ADD_CUSTOM_COMMAND(
|
||||
|
@ -91,7 +90,7 @@ ADD_CUSTOM_COMMAND(
|
|||
mysql_fix_privilege_tables
|
||||
mysql_fix_privilege_tables.sql
|
||||
mysql_fix_privilege_tables_sql.c
|
||||
DEPENDS comp_sql ${CMAKE_CURRENT_BINARY_DIR}/mysql_fix_privilege_tables.sql
|
||||
DEPENDS comp_sql
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
|
||||
|
|
|
@ -232,11 +232,14 @@ IF(WIN32 AND MYSQLD_EXECUTABLE)
|
|||
@ONLY
|
||||
)
|
||||
|
||||
IF(MSVC_IDE OR CMAKE_GENERATOR MATCHES "Xcode")
|
||||
SET (CONFIG_PARAM -DCONFIG=${CMAKE_CFG_INTDIR})
|
||||
ENDIF()
|
||||
MAKE_DIRECTORY(${CMAKE_CURRENT_BINARY_DIR}/data)
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/data/mysql/user.frm
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-DCONFIG=${CMAKE_CFG_INTDIR}
|
||||
${CONFIG_PARAM}
|
||||
-P ${CMAKE_CURRENT_BINARY_DIR}/create_initial_db.cmake
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/data
|
||||
DEPENDS mysqld
|
||||
|
|
Loading…
Add table
Reference in a new issue