summaryrefslogtreecommitdiff
path: root/cmake/install_macros.cmake
diff options
context:
space:
mode:
authorTor Didriksen <tor.didriksen@oracle.com>2014-05-07 17:09:14 +0200
committerTor Didriksen <tor.didriksen@oracle.com>2014-05-07 17:09:14 +0200
commit3e96ec0ef9ccdf24f7ede62464f3eefed6ae624c (patch)
tree0869707eee4b3beb9041706315c754e1763fb42c /cmake/install_macros.cmake
parent32ae29df83a88103f3026a97005890b2ead72b97 (diff)
downloadmariadb-git-3e96ec0ef9ccdf24f7ede62464f3eefed6ae624c.tar.gz
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.
Diffstat (limited to 'cmake/install_macros.cmake')
-rw-r--r--cmake/install_macros.cmake17
1 files changed, 13 insertions, 4 deletions
diff --git a/cmake/install_macros.cmake b/cmake/install_macros.cmake
index 54f3225ed7e..be243a42924 100644
--- a/cmake/install_macros.cmake
+++ b/cmake/install_macros.cmake
@@ -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()