summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorTor Didriksen <tor.didriksen@oracle.com>2012-10-03 16:05:07 +0200
committerTor Didriksen <tor.didriksen@oracle.com>2012-10-03 16:05:07 +0200
commitd68d303118b9b6db9a2975ab04d688f8296b3ec3 (patch)
treedaa86ad8e4629fbb06f18007e27b5be644a2d611 /cmake
parent5ba127e16685cc3218065b78825b4ff1bde77209 (diff)
downloadmariadb-git-d68d303118b9b6db9a2975ab04d688f8296b3ec3.tar.gz
Bug#13713525 CREATE_INITIAL_DB.CMAKE IS FAILING ON WINDOWS, STILL "DEVENV" RETURNS 0
This bug depends on cmake version. For cmake 2.6 (which is still in use for some pushbuild trees) the main build would succeed, even if create_initial_db failed. The problem was the chaining of commands in the CUSTOM_COMMAND to produce 'initdb.dep'. It first invokes cmake to run mysqld, then invokes 'touch' to create the file. Moving the 'touch' command makes the error propagate properly for both cmake 2.6 and 2.8
Diffstat (limited to 'cmake')
-rw-r--r--cmake/create_initial_db.cmake.in10
1 files changed, 8 insertions, 2 deletions
diff --git a/cmake/create_initial_db.cmake.in b/cmake/create_initial_db.cmake.in
index e37f41255e0..fba6209d147 100644
--- a/cmake/create_initial_db.cmake.in
+++ b/cmake/create_initial_db.cmake.in
@@ -69,10 +69,13 @@ EXECUTE_PROCESS(
COMMAND "@CMAKE_COMMAND@" -E echo Executing ${BOOTSTRAP_COMMAND}
)
EXECUTE_PROCESS (
- COMMAND "@CMAKE_COMMAND@" -E echo input file bootstrap.sql, current directory ${CWD}
+ COMMAND "@CMAKE_COMMAND@" -E
+ echo input file bootstrap.sql, current directory ${CWD}
)
EXECUTE_PROCESS (
- COMMAND ${BOOTSTRAP_COMMAND} INPUT_FILE bootstrap.sql OUTPUT_VARIABLE OUT
+ COMMAND ${BOOTSTRAP_COMMAND}
+ INPUT_FILE bootstrap.sql
+ OUTPUT_VARIABLE OUT
ERROR_VARIABLE ERR
RESULT_VARIABLE RESULT
)
@@ -81,3 +84,6 @@ IF(NOT RESULT EQUAL 0)
MESSAGE(FATAL_ERROR "Could not create initial database \n ${OUT} \n ${ERR}")
ENDIF()
+EXECUTE_PROCESS (
+ COMMAND "@CMAKE_COMMAND@" -E touch ${CMAKE_CURRENT_BINARY_DIR}/initdb.dep
+)