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
commit30d35590a3bce929679cdc38d36fc67f7923a39e (patch)
treedaa86ad8e4629fbb06f18007e27b5be644a2d611 /cmake
parent2943c8131a180de40d94a28bec89d3c1ba1f3687 (diff)
downloadmariadb-git-30d35590a3bce929679cdc38d36fc67f7923a39e.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
+)