mirror of
https://github.com/MariaDB/server.git
synced 2025-07-24 19:42:23 +03:00
Backport from trunk:
Bug#18187290 ISSUE WITH BUILDING MYSQL USING CMAKE 2.8.12 We want to upgrade to VS2013 on Windows. In order to do this, we need to upgrade to cmake 2.8.12 This has introduced some incompatibilities for .pdb files, and "make install" no longer works. To reproduce: cmake --build . --target package --config debug The fix: Rather than installing .pdb files for static libraries, we use the /Z7 flag to store symbolic debugging information in the .obj files.
This commit is contained in:
@ -21,26 +21,35 @@ MACRO (INSTALL_DEBUG_SYMBOLS targets)
|
||||
GET_TARGET_PROPERTY(location ${target} LOCATION)
|
||||
GET_TARGET_PROPERTY(type ${target} TYPE)
|
||||
IF(NOT INSTALL_LOCATION)
|
||||
IF(type MATCHES "STATIC_LIBRARY" OR type MATCHES "MODULE_LIBRARY" OR type MATCHES "SHARED_LIBRARY")
|
||||
IF(type MATCHES "STATIC_LIBRARY"
|
||||
OR type MATCHES "MODULE_LIBRARY"
|
||||
OR type MATCHES "SHARED_LIBRARY")
|
||||
SET(INSTALL_LOCATION "lib")
|
||||
ELSEIF(type MATCHES "EXECUTABLE")
|
||||
SET(INSTALL_LOCATION "bin")
|
||||
ELSE()
|
||||
MESSAGE(FATAL_ERROR "cannot determine type of ${target}. Don't now where to install")
|
||||
MESSAGE(FATAL_ERROR
|
||||
"cannot determine type of ${target}. Don't now where to install")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
STRING(REPLACE ".exe" ".pdb" pdb_location ${location})
|
||||
STRING(REPLACE ".dll" ".pdb" pdb_location ${pdb_location})
|
||||
STRING(REPLACE ".lib" ".pdb" pdb_location ${pdb_location})
|
||||
IF(CMAKE_GENERATOR MATCHES "Visual Studio")
|
||||
STRING(REPLACE "${CMAKE_CFG_INTDIR}" "\${CMAKE_INSTALL_CONFIG_NAME}" pdb_location ${pdb_location})
|
||||
STRING(REPLACE
|
||||
"${CMAKE_CFG_INTDIR}" "\${CMAKE_INSTALL_CONFIG_NAME}"
|
||||
pdb_location ${pdb_location})
|
||||
ENDIF()
|
||||
IF(target STREQUAL "mysqld")
|
||||
SET(comp Server)
|
||||
ELSE()
|
||||
SET(comp Debuginfo)
|
||||
ENDIF()
|
||||
INSTALL(FILES ${pdb_location} DESTINATION ${INSTALL_LOCATION} COMPONENT ${comp})
|
||||
# No .pdb file for static libraries.
|
||||
IF(NOT type MATCHES "STATIC_LIBRARY")
|
||||
INSTALL(FILES ${pdb_location}
|
||||
DESTINATION ${INSTALL_LOCATION} COMPONENT ${comp})
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
ENDIF()
|
||||
ENDMACRO()
|
||||
|
Reference in New Issue
Block a user