Commit 84662b98 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

Bug#55647:CMake build rebuilds some libraries twice for embedded

A  simple version of the patch : add WITH_PIC to debug compilation.

Engines that are not dependent on internal stuff (like THD structure) 
will not be recompiled for embedded in debug mode.

Examples of such engines are : archive, federated, innodb. Engines
with dependencies on internals (myisam,heap,myisammrg) will still be 
fully recompiled.
parent 48b46075
......@@ -61,6 +61,11 @@ SET(BUILDTYPE_DOCSTRING
IF(WITH_DEBUG)
SET(CMAKE_BUILD_TYPE "Debug" CACHE STRING ${BUILDTYPE_DOCSTRING} FORCE)
IF(UNIX AND NOT APPLE)
# Compiling with PIC speeds up embedded build, on PIC sensitive systems
# Predefine it to ON, in case user chooses to build embedded.
SET(WITH_PIC ON CACHE BOOL "Compile with PIC")
ENDIF()
SET(OLD_WITH_DEBUG 1 CACHE INTERNAL "" FORCE)
ELSEIF(NOT HAVE_CMAKE_BUILD_TYPE OR OLD_WITH_DEBUG)
IF(CUSTOM_C_FLAGS)
......
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