List:Commits« Previous MessageNext Message »
From:Joerg Bruehe Date:January 31 2011 5:43pm
Subject:Re: bzr commit into mysql-5.5-bugteam branch (joerg:3209) Bug#42969
View as plain text  
Vlad,


I have to come back to some Windows-specific issues:

Vladislav Vaintroub wrote:
> Hi Joerg,
> 
> Some more feedback (this time only windows-related).
> 
> I get this in VERSION_bin files
> 
> 
> ===== Compiler flags used (from the 'sql/' subdirectory): =====
> File 'sql/CMakeFiles/sql.dir/flags.make' is not yet found.
> 
> Unless  build is done with NMake, there will never be such file.  To extract build
> flags from Visual Studio, you'd need to process
> project files with an XML processor. Maybe, just skipping this for Visual Studio
> would be appropriate.
> For Visual Studio users there relevant info in CMAKE_GENERATOR  variable (Visual
> Studio version) that is worth to be output.

See below - it seems this doesn't work in cmake 2.6.4.

> 
> ===== Feature flags used: =====
> Some info extracted from CMakeCache.txt are internal flags, hidden from user in
> normal cmake-gui or ccmake (stuff with :INTERNAL
> suffixes, like WITH_MYISAM_STORAGE_ENGINE:INTERNAL=ON).
> Some interesting flags on the other hand are missing (like INSTALL_LAYOUT or
> MYSQL_DATADIR). Maybe, cmake -LH ${CMAKE_BINARY_DIR}
> could do a better job in extracting interesting flags.

Ok, I did this by calling "cmake -N -L".


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,
but I do miss the timestamp and the "generator" output.
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.

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).

|
|   # ${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.

|   ELSEIF(UNIX)
|     ...
|   ENDIF()
|
|   FILE(APPEND ${INFO_BIN} "===== Feature flags used: =====\n")
|   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")
|   ELSE()
|     FILE(APPEND ${INFO_BIN} "File 'CMakeCache.txt' is not yet found.\n\n")
|   ENDIF()
|
|   FILE(APPEND ${INFO_BIN} "===== EOF =====\n")
|
| ENDMACRO(CREATE_INFO_BIN)


Regards,
Jörg

-- 
Joerg Bruehe,  MySQL Build Team,  joerg.bruehe@stripped
               (+49 30) 417 01 487
ORACLE Deutschland B.V. & Co. KG,   Komturstrasse 18a,   D-12099 Berlin
Geschaeftsfuehrer: Juergen Kunz, Marcel v.d. Molen, Alexander v.d. Ven
Amtsgericht Muenchen: HRA 95603

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