List:Commits« Previous MessageNext Message »
From:Tor Didriksen Date:November 24 2010 2:03pm
Subject:bzr commit into mysql-5.5-bugteam branch (tor.didriksen:3138) Bug#58372
View as plain text  
#At file:///export/home/didrik/repo/5.5-bugteam-bug58372-cmake/ based on revid:magnus.blaudd@stripped

 3138 Tor Didriksen	2010-11-23
      Bug #58372 cmake should not write temporary files in the source directory
     @ cmake/do_abi_check.cmake
        Put temporary files in ${BINARY_DIR} rather than in source directory.
        Slight reformatting for readability of commands.

    modified:
      cmake/do_abi_check.cmake
=== modified file 'cmake/do_abi_check.cmake'
--- a/cmake/do_abi_check.cmake	2010-08-27 06:45:35 +0000
+++ b/cmake/do_abi_check.cmake	2010-11-23 09:26:26 +0000
@@ -53,23 +53,27 @@
 SET(abi_check_out ${BINARY_DIR}/abi_check.out)
 
 FOREACH(file ${ABI_HEADERS})
-  SET(tmpfile ${file}.pp.tmp)
-    EXECUTE_PROCESS(
-     COMMAND ${COMPILER} 
-       -E -nostdinc -dI -DMYSQL_ABI_CHECK -I${SOURCE_DIR}/include
-       -I${BINARY_DIR}/include -I${SOURCE_DIR}/include/mysql -I${SOURCE_DIR}/sql
-       ${file} 
-       ERROR_QUIET OUTPUT_FILE ${tmpfile})
-    EXECUTE_PROCESS(
-      COMMAND sed -e 
-      "/^# /d" -e "/^[	]*$/d"  -e "/^#pragma GCC set_debug_pwd/d" -e "/^#ident/d"
-      RESULT_VARIABLE result OUTPUT_FILE ${abi_check_out} INPUT_FILE ${tmpfile})
+  GET_FILENAME_COMPONENT(header_basename ${file} NAME)
+  SET(tmpfile ${BINARY_DIR}/${header_basename}.pp.tmp)
+
+  EXECUTE_PROCESS(
+    COMMAND ${COMPILER} 
+      -E -nostdinc -dI -DMYSQL_ABI_CHECK -I${SOURCE_DIR}/include
+      -I${BINARY_DIR}/include -I${SOURCE_DIR}/include/mysql -I${SOURCE_DIR}/sql
+      ${file} 
+      ERROR_QUIET OUTPUT_FILE ${tmpfile})
+  EXECUTE_PROCESS(
+    COMMAND sed -e "/^# /d"
+                -e "/^[	]*$/d"
+                -e "/^#pragma GCC set_debug_pwd/d"
+                -e "/^#ident/d"
+    RESULT_VARIABLE result OUTPUT_FILE ${abi_check_out} INPUT_FILE ${tmpfile})
   IF(NOT ${result} EQUAL 0)
     MESSAGE(FATAL_ERROR "sed returned error ${result}")
   ENDIF()
   FILE(REMOVE ${tmpfile})
-  EXECUTE_PROCESS(COMMAND diff -w ${file}.pp ${abi_check_out} RESULT_VARIABLE
-     result)
+  EXECUTE_PROCESS(
+    COMMAND diff -w ${file}.pp ${abi_check_out} RESULT_VARIABLE result)
   IF(NOT ${result} EQUAL 0)
     MESSAGE(FATAL_ERROR 
       "ABI check found difference between ${file}.pp and ${abi_check_out}")


Attachment: [text/bzr-bundle] bzr/tor.didriksen@oracle.com-20101123092626-alplf2qce569a5br.bundle
Thread
bzr commit into mysql-5.5-bugteam branch (tor.didriksen:3138) Bug#58372Tor Didriksen24 Nov