From d68d303118b9b6db9a2975ab04d688f8296b3ec3 Mon Sep 17 00:00:00 2001 From: Tor Didriksen Date: Wed, 3 Oct 2012 16:05:07 +0200 Subject: 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 --- cmake/create_initial_db.cmake.in | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'cmake') 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 +) -- cgit v1.2.1