Bug #58074 | ADD_VERSION_INFO cmake/mysql_version.cmake fails if LINK_FLAGS are modified | ||
---|---|---|---|
Submitted: | 9 Nov 2010 8:52 | Modified: | 15 Dec 2010 1:33 |
Reporter: | Bernd Ocklin | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Packaging | Severity: | S3 (Non-critical) |
Version: | mysql-5.5.5+ | OS: | Any |
Assigned to: | Vladislav Vaintroub | CPU Architecture: | Any |
Tags: | SEAGULL |
[9 Nov 2010 8:52]
Bernd Ocklin
[9 Nov 2010 14:22]
Bernd Ocklin
Here is the correct patch: diff -u ../mysql-5.5.5-m3-release/./cmake/mysql_version.cmake ./cmake/mysql_version.cmake --- ../mysql-5.5.5-m3-release/./cmake/mysql_version.cmake 2010-06-28 18:12:23.000000000 +0200 +++ ./cmake/mysql_version.cmake 2010-10-26 12:31:53.000000000 +0200 @@ -157,13 +157,17 @@ FUNCTION(ADD_VERSION_INFO target) GET_TARGET_PROPERTY(target_type ${target} TYPE) + GET_TARGET_PROPERTY(tmp_link_flags ${target} LINK_FLAGS) + IF(NOT DEFINED ${tmp_link_flags}) + SET(tmp_link_flags "") + ENDIF() ADD_DEPENDENCIES(${target} gen_versioninfo) IF(target_type MATCHES "SHARED" OR target_type MATCHES "MODULE") - SET_PROPERTY(TARGET ${target} APPEND PROPERTY LINK_FLAGS - "\"${CMAKE_BINARY_DIR}/versioninfo_dll.res\"") + SET_PROPERTY(TARGET ${target} PROPERTY LINK_FLAGS + "${tmp_link_flags} \"${CMAKE_BINARY_DIR}/versioninfo_dll.res\"") ELSEIF(target_type MATCHES "EXE") - SET_PROPERTY(TARGET ${target} APPEND PROPERTY LINK_FLAGS - "${target_link_flags} \"${CMAKE_BINARY_DIR}/versioninfo_exe.res\"") + SET_PROPERTY(TARGET ${target} PROPERTY LINK_FLAGS + "${tmp_link_flags} ${target_link_flags} \"${CMAKE_BINARY_DIR}/versioninfo_exe.res\"") ENDIF() ENDFUNCTION() ELSE()
[9 Nov 2010 23:52]
MySQL Verification Team
Thank you for the bug report.
[12 Nov 2010 12:43]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/123713 3120 Vladislav Vaintroub 2010-11-12 Bug#58074: ADD_VERSION_INFO cmake/mysql_version.cmake fails if LINK_FLAGS are modified Backport version info handling (Windows-specific) from next-mr. Instead of adding ".res" object as linker flag, add resource file (.rc) file to the source list. This is more obvious and less error prone method.
[12 Nov 2010 12:53]
Vladislav Vaintroub
Bernd, I took the handling from next-mr (using source file version_info_xxx.rc rather then precompiled object version_info_xxx.res). On a reason I do not remember (likely an oversight), it was not in 5.5, even if it was in next-mr since April or so.
[5 Dec 2010 12:41]
Bugs System
Pushed into mysql-trunk 5.6.1 (revid:alexander.nozdrin@oracle.com-20101205122447-6x94l4fmslpbttxj) (version source revid:alexander.nozdrin@oracle.com-20101205122447-6x94l4fmslpbttxj) (merge vers: 5.6.1) (pib:23)
[15 Dec 2010 1:33]
Paul DuBois
Noted in 5.5.8 changelog. During configuration, ADD_VERSION_INFO in cmake/mysql_version.cmake failed if LINK_FLAGS was modified.
[16 Dec 2010 22:30]
Bugs System
Pushed into mysql-5.5 5.5.9 (revid:jonathan.perkin@oracle.com-20101216101358-fyzr1epq95a3yett) (version source revid:jonathan.perkin@oracle.com-20101216101358-fyzr1epq95a3yett) (merge vers: 5.5.9) (pib:24)