Commit 067b90c7 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

Fix MinSizeRel build on Windows.

do not include test suite in release zip anymore.
parent 477a1bc4
......@@ -62,7 +62,7 @@ IF(FEATURE_SET)
SET(WITH_NONE ON)
ENDIF()
IF(num GREATER FEATURE_SET_xsmall)
IF(num GREATER FEATURE_SET_xsmall AND NOT WIN32)
SET(WITH_EMBEDDED_SERVER ON CACHE BOOL "")
ENDIF()
IF(num GREATER FEATURE_SET_small)
......@@ -88,7 +88,9 @@ ENDIF()
OPTION(ENABLED_LOCAL_INFILE "" ON)
SET(WITH_INNODB_SNAPPY OFF CACHE STRING "")
IF(WIN32)
SET(WITH_LIBARCHIVE STATIC CACHE STRING "")
SET(INSTALL_MYSQLTESTDIR "" CACHE STRING "")
SET(INSTALL_SQLBENCHDIR "" CACHE STRING "")
SET(INSTALL_SUPPORTFILESDIR "" CACHE STRING "")
ELSEIF(RPM)
SET(WITH_SSL system CACHE STRING "")
SET(WITH_ZLIB system CACHE STRING "")
......
......@@ -86,8 +86,10 @@ IF(MSVC)
# Enable debug info also in Release build,
# and create PDB to be able to analyze crashes.
FOREACH(type EXE SHARED MODULE)
SET(CMAKE_{type}_LINKER_FLAGS_RELEASE
SET(CMAKE_${type}_LINKER_FLAGS_RELEASE
"${CMAKE_${type}_LINKER_FLAGS_RELEASE} /debug")
SET(CMAKE_${type}_LINKER_FLAGS_MINSIZEREL
"${CMAKE_${type}_LINKER_FLAGS_MINSIZEREL} /debug")
ENDFOREACH()
# Force static runtime libraries
......@@ -108,10 +110,15 @@ IF(MSVC)
CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELWITHDEBINFO
CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_DEBUG_INIT
CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELWITHDEBINFO
CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_DEBUG_INIT)
CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_DEBUG_INIT
CMAKE_C_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_MINSIZEREL
)
STRING(REGEX REPLACE "/M[TD][d]?" "${MSVC_CRT_TYPE}" "${flag}" "${${flag}}" )
STRING(REGEX REPLACE "/D[ ]?_DEBUG" "" "${flag}" "${${flag}}")
STRING(REPLACE "/Zi" "/Z7" "${flag}" "${${flag}}")
IF(NOT "${${flag}}" MATCHES "/Z7")
STRING(APPEND ${flag} " /Z7")
ENDIF()
ENDFOREACH()
......
......@@ -13,7 +13,16 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
IF (NOT INSTALL_MYSQLTESTDIR)
IF (WIN32)
ADD_EXECUTABLE(my_safe_process safe_process_win.cc)
ADD_EXECUTABLE(my_safe_kill safe_kill_win.cc)
TARGET_LINK_LIBRARIES(my_safe_kill dbghelp psapi)
ELSE()
ADD_EXECUTABLE(my_safe_process safe_process.cc)
ENDIF()
IF(NOT INSTALL_MYSQLTESTDIR)
RETURN()
ENDIF()
......@@ -22,14 +31,9 @@ SET(INSTALL_ARGS
COMPONENT Test
)
INSTALL(TARGETS my_safe_process ${INSTALL_ARGS})
IF (WIN32)
MYSQL_ADD_EXECUTABLE(my_safe_process safe_process_win.cc ${INSTALL_ARGS})
MYSQL_ADD_EXECUTABLE(my_safe_kill safe_kill_win.cc ${INSTALL_ARGS})
TARGET_LINK_LIBRARIES(my_safe_kill dbghelp psapi)
ELSE()
MYSQL_ADD_EXECUTABLE(my_safe_process safe_process.cc ${INSTALL_ARGS})
INSTALL(TARGETS my_safe_kill ${INSTALL_ARGS})
ENDIF()
INSTALL(FILES Base.pm
DESTINATION "${INSTALL_MYSQLTESTDIR}/lib/My/SafeProcess" COMPONENT Test
)
INSTALL(FILES Base.pm ${INSTALL_ARGS})
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment