List:Commits« Previous MessageNext Message »
From:Vladislav Vaintroub Date:January 31 2011 7:51pm
Subject:RE: bzr commit into mysql-5.5-bugteam branch (joerg:3209) Bug#42969
View as plain text  

> -----Original Message-----
> From: Joerg Bruehe [mailto:joerg.bruehe@stripped]
> Sent: Montag, 31. Januar 2011 18:44
> To: Vladislav Vaintroub
> Cc: commits@stripped
> Subject: Re: bzr commit into mysql-5.5-bugteam branch (joerg:3209) Bug#42969
> 
> Vlad,
> 


> This is the start of a current "INFO_BIN" file, identical for 32 and 64
> bit except for the directory names in the "Source - Binaries ..." line
> (yes, same host):
> 
> | ===== Information about the build process: =====
> | Build was run at:  on host 'LOKI09'
> |
> |
> | Source G:/pb2/build/sb_0-2906909-1296245684.3/mysql-5.5.9 - Binaries
> G:/pb2/build/sb_0-2906909-1296245684.3/release
> | Build was done using cmake 2.6.4
> |
> | ===== Compiler / generator used: =====
> |
> |
> | ===== Feature flags used: =====
> | -- Cache values
> | CANDLE_EXECUTABLE:FILEPATH=C:/Program Files (x86)/Windows Installer
> XML v3.5/bin/candle.exe
> | CMAKE_INSTALL_PREFIX:PATH=C:/Program Files (x86)/MySQL
> | COMMUNITY_BUILD:BOOL=ON
> | FEATURE_SET:STRING=community
> | HEAT_EXECUTABLE:FILEPATH=C:/Program Files (x86)/Windows Installer XML
> v3.5/bin/heat.exe
> | INSTALL_LAYOUT:STRING=STANDALONE
> | LIGHT_EXECUTABLE:FILEPATH=C:/Program Files (x86)/Windows Installer XML
> v3.5/bin/light.exe
> | ...
> 
> Note this is cmake 2.6.4 which should be current (in the 2.6 line).
> 
> I don't have any issues with those specific "*.exe" file names written,
Those probably need to be marked as "advanced" so they do not appear here.
MARK_AS_ADVANCED(CANDLE_EXECUTABLE  HEAT_EXECUTABLE  LIGHT_EXECUTABLE)
might help here (or maybe even prepend them with FORCE, like
 MARK_AS_ADVANCED(FORCE  CANDLE_EXECUTABLE ... )

> but I do miss the timestamp and the "generator" output.

How do you produce the timestamp? cmd /c date /T worked fine for me (I wrote about it
earlier)  but not the "date /T",  which in my
environment called gnuwin32 date.exe , which has no idea of /T

${CMAKE_GENERATOR} is an internal variable,  e.g more advanced than "advanced",
it cannot be changed after it is set, one needs to remove the whole build directory and
rerun cmake in this case.

But it is available at cmake time, always. If you need it in the configured script, usual
trick SET(CMAKE_GENERATOR
"@CMAKE_GENERATOR@") 
does the trick.


> Also, I'm a bit disappointed that neither on Windows nor on Linux I get
> informed whether this was a 32 or 64 bit build, but so be it.

CMAKE_SIZEOF_VOIDP is the size of void pointer in bytes. It does not have a meaning in
"mixed bitness" builds, as in osx universal
binaries.

> This is the code I used (with remarks inserted):
> 
> | MACRO(CREATE_INFO_BIN)
> |   SET(INFO_BIN "Docs/INFO_BIN")
> |
> |   FILE(WRITE ${INFO_BIN} "===== Information about the build process:
> =====\n")
> |   IF (WIN32)
> |     EXECUTE_PROCESS(COMMAND date /c /T OUTPUT_VARIABLE TMP_DATE)
> From the result, "TMP_DATE" must be empty.
> 
> |   ELSEIF(UNIX)
> |     ...
> |   ENDIF()
> |   SITE_NAME(HOSTNAME)
> |   FILE(APPEND ${INFO_BIN} "Build was run at: ${TMP_DATE} on host
> '${HOSTNAME}'\n\n")
> |   FILE(APPEND ${INFO_BIN} "\nSource ${CMAKE_SOURCE_DIR} - Binaries
> ${CMAKE_BINARY_DIR}\n")
> That line is for debugging only, will be removed.
> 
> |
> |   # According to the cmake docs, this variable should always be set.
> |   # However, it is empty in my tests, both cmake 2.6.0 and 2.6.4 on Linux.
> |   # Include this code, so we will profit if a build environment does
> provide that info.
> |   IF(${CMAKE_HOST_SYSTEM})
> |     IF(${CMAKE_CROSSCOMPILING})
> |       FILE(APPEND ${INFO_BIN} "Build was done for ${CMAKE_SYSTEM}
> using ${CMAKE_SYSTEM_PROCESSOR}\n")
> |     ENDIF()
> |     FILE(APPEND ${INFO_BIN} "Build was done on  ${CMAKE_HOST_SYSTEM}
> using ${CMAKE_HOST_SYSTEM_PROCESSOR}\n\n")
> |   ENDIF()
> I may replace the above code by two separate "if", for "cmake_system"
> and "cmake_host_system", but according to the docs I should get output
> (no crosscompiling, so the values are identical, and only the second
> line should appear).

No idea. Personally, I did not find CMAKE_HOST_SYSTEM interesting. Even if MySQL had 
working cross-compiling environment (which is
not that simple, because some tools produced during  the build, are also used during  the
build), even then  HOST_SYSTEM is , from
my perspective,  would be of limited use.

> |
> |   # ${CMAKE_VERSION} doesn't work in 2.6.0, use the separate components.
> |   FILE(APPEND ${INFO_BIN} "Build was done using cmake
> ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} \n\n")
> |
> |   IF (WIN32)
> |     FILE(APPEND ${INFO_BIN} "===== Compiler / generator used: =====\n")
> |     FILE(APPEND ${INFO_BIN} ${CMAKE_GENERATOR} "\n\n")
> Also empty in the generated file.

I think 
SET(CMAKE_GENERATOR "@CMAKE_GENERATOR@")  at the start of file will help.


Thread
bzr commit into mysql-5.5-bugteam branch (joerg:3209) Bug#42969Joerg Bruehe21 Jan
  • RE: bzr commit into mysql-5.5-bugteam branch (joerg:3209) Bug#42969Vladislav Vaintroub21 Jan
    • Re: bzr commit into mysql-5.5-bugteam branch (joerg:3209) Bug#42969Joerg Bruehe22 Jan
      • RE: bzr commit into mysql-5.5-bugteam branch (joerg:3209) Bug#42969Vladislav Vaintroub22 Jan
        • RE: bzr commit into mysql-5.5-bugteam branch (joerg:3209) Bug#42969Vladislav Vaintroub22 Jan
          • Re: bzr commit into mysql-5.5-bugteam branch (joerg:3209) Bug#42969Joerg Bruehe31 Jan
            • RE: bzr commit into mysql-5.5-bugteam branch (joerg:3209) Bug#42969Vladislav Vaintroub31 Jan
              • Re: bzr commit into mysql-5.5-bugteam branch (joerg:3209) Bug#42969Joerg Bruehe31 Jan
        • Re: bzr commit into mysql-5.5-bugteam branch (joerg:3209) Bug#42969Joerg Bruehe25 Jan
          • Re: bzr commit into mysql-5.5-bugteam branch (joerg:3209) Bug#42969Joerg Bruehe26 Jan
          • RE: bzr commit into mysql-5.5-bugteam branch (joerg:3209) Bug#42969Vladislav Vaintroub26 Jan