From: Joerg Bruehe Date: January 31 2011 5:43pm Subject: Re: bzr commit into mysql-5.5-bugteam branch (joerg:3209) Bug#42969 List-Archive: http://lists.mysql.com/commits/130075 Message-Id: <4D46F4D6.3070303@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Vlad, I have to come back to some Windows-specific issues: Vladislav Vaintroub wrote: > Hi Joerg, >=20 > Some more feedback (this time only windows-related). >=20 > I get this in VERSION_bin files >=20 >=20 > =3D=3D=3D=3D=3D Compiler flags used (from the 'sql/' subdirectory): =3D= =3D=3D=3D=3D > File 'sql/CMakeFiles/sql.dir/flags.make' is not yet found. >=20 > Unless build is done with NMake, there will never be such file. To ex= tract build flags from Visual Studio, you'd need to process > project files with an XML processor. Maybe, just skipping this for Visu= al Studio would be appropriate. > For Visual Studio users there relevant info in CMAKE_GENERATOR variabl= e (Visual Studio version) that is worth to be output. See below - it seems this doesn't work in cmake 2.6.4. >=20 > =3D=3D=3D=3D=3D Feature flags used: =3D=3D=3D=3D=3D > 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=3DON). > Some interesting flags on the other hand are missing (like INSTALL_LAYO= UT 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): | =3D=3D=3D=3D=3D Information about the build process: =3D=3D=3D=3D=3D | 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 | | =3D=3D=3D=3D=3D Compiler / generator used: =3D=3D=3D=3D=3D | | | =3D=3D=3D=3D=3D Feature flags used: =3D=3D=3D=3D=3D | -- Cache values | CANDLE_EXECUTABLE:FILEPATH=3DC:/Program Files (x86)/Windows Installer XML v3.5/bin/candle.exe | CMAKE_INSTALL_PREFIX:PATH=3DC:/Program Files (x86)/MySQL | COMMUNITY_BUILD:BOOL=3DON | FEATURE_SET:STRING=3Dcommunity | HEAT_EXECUTABLE:FILEPATH=3DC:/Program Files (x86)/Windows Installer XML= v3.5/bin/heat.exe | INSTALL_LAYOUT:STRING=3DSTANDALONE | LIGHT_EXECUTABLE:FILEPATH=3DC:/Program Files (x86)/Windows Installer XM= L 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} "=3D=3D=3D=3D=3D Information about the build p= rocess: =3D=3D=3D=3D=3D\n") | IF (WIN32) | EXECUTE_PROCESS(COMMAND date /c /T OUTPUT_VARIABLE TMP_DATE) =46rom 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 Lin= ux. | # 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= =2E | 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} "=3D=3D=3D=3D=3D Compiler / generator used:= =3D=3D=3D=3D=3D\n") | FILE(APPEND ${INFO_BIN} ${CMAKE_GENERATOR} "\n\n") Also empty in the generated file. | ELSEIF(UNIX) | ... | ENDIF() | | FILE(APPEND ${INFO_BIN} "=3D=3D=3D=3D=3D Feature flags used: =3D=3D=3D= =3D=3D\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} "=3D=3D=3D=3D=3D EOF =3D=3D=3D=3D=3D\n") | | ENDMACRO(CREATE_INFO_BIN) Regards, J=F6rg --=20 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