#At file:///MySQL/REPO/V55/bug42969-5.5/ based on revid:joerg@stripped
3211 Joerg Bruehe 2011-02-01
Bug#42969 Please add a MANIFEST to each build
Additional fix:
cmake variables must be taken using the '@var@' notation
and then be passed through "configure_file()",
this was missing for the cmake_[host_]system*" ones.
modified:
cmake/info_macros.cmake.in
=== modified file 'cmake/info_macros.cmake.in'
--- a/cmake/info_macros.cmake.in 2011-01-31 21:14:38 +0000
+++ b/cmake/info_macros.cmake.in 2011-02-01 13:53:07 +0000
@@ -17,12 +17,22 @@
# Handle/create the "INFO_*" files describing a MySQL (server) binary.
# This is part of the fix for bug#42969.
+
+# Several of cmake's variables need to be translated from '@' notation
+# to '${}', this is done by the "configure" call in top level "CMakeLists.txt".
+# If further variables are used in this file, add them to this list.
+
SET(VERSION "@VERSION@")
SET(CMAKE_SOURCE_DIR "@CMAKE_SOURCE_DIR@")
SET(CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@")
SET(CMAKE_GENERATOR "@CMAKE_GENERATOR@")
SET(CMAKE_SIZEOF_VOID_P "@CMAKE_SIZEOF_VOID_P@")
SET(BZR_EXECUTABLE "@BZR_EXECUTABLE@")
+SET(CMAKE_CROSSCOMPILING "@CMAKE_CROSSCOMPILING@")
+SET(CMAKE_HOST_SYSTEM "@CMAKE_HOST_SYSTEM@")
+SET(CMAKE_HOST_SYSTEM_PROCESSOR "@CMAKE_HOST_SYSTEM_PROCESSOR@")
+SET(CMAKE_SYSTEM "@CMAKE_SYSTEM@")
+SET(CMAKE_SYSTEM_PROCESSOR "@CMAKE_SYSTEM_PROCESSOR@")
# Create an "INFO_SRC" file with information about the source (only).
@@ -76,7 +86,7 @@ MACRO(CREATE_INFO_BIN)
ELSEIF(UNIX)
EXECUTE_PROCESS(COMMAND date "+%Y-%m-%d %H:%M:%S" OUTPUT_VARIABLE TMP_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
ELSE()
- SET(TMP_DATE "No date command known")
+ SET(TMP_DATE "(no date command known for this platform)")
ENDIF()
SITE_NAME(HOSTNAME)
FILE(APPEND ${INFO_BIN} "Build was run at ${TMP_DATE} on host '${HOSTNAME}'\n\n")
@@ -84,10 +94,10 @@ MACRO(CREATE_INFO_BIN)
# According to the cmake docs, these variables should always be set.
# However, they are empty in my tests, using cmake 2.6.4 on Linux, various Unix, and Windows.
# Still, include this code, so we will profit if a build environment does provide that info.
- IF(${CMAKE_HOST_SYSTEM})
+ IF(CMAKE_HOST_SYSTEM)
FILE(APPEND ${INFO_BIN} "Build was done on ${CMAKE_HOST_SYSTEM} using ${CMAKE_HOST_SYSTEM_PROCESSOR}\n")
ENDIF()
- IF(${CMAKE_SYSTEM})
+ IF(CMAKE_CROSSCOMPILING)
FILE(APPEND ${INFO_BIN} "Build was done for ${CMAKE_SYSTEM} using ${CMAKE_SYSTEM_PROCESSOR}\n")
ENDIF()
@@ -112,7 +122,7 @@ MACRO(CREATE_INFO_BIN)
IF(EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt)
# Attention: "-N" prevents cmake from entering a recursion, and it must be a separate flag from "-L".
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -N -L ${CMAKE_BINARY_DIR} OUTPUT_VARIABLE FEATURE_FLAGS)
- FILE(APPEND ${INFO_BIN} ${FEATURE_FLAGS} "\n\n")
+ FILE(APPEND ${INFO_BIN} ${FEATURE_FLAGS} "\n")
ELSE()
FILE(APPEND ${INFO_BIN} "File 'CMakeCache.txt' is not yet found.\n\n")
ENDIF()
Attachment: [text/bzr-bundle] bzr/joerg@mysql.com-20110201135307-42x4s0qz1l7w8si4.bundle
| Thread |
|---|
| • bzr commit into mysql-5.5-bugteam branch (joerg:3211) Bug#42969 | Joerg Bruehe | 1 Feb |