diff options
author | Vladislav Vaintroub <wlad@sun.com> | 2010-10-06 15:15:27 +0200 |
---|---|---|
committer | Vladislav Vaintroub <wlad@sun.com> | 2010-10-06 15:15:27 +0200 |
commit | a52ea672a00d0d8b0404b33aaeaa66704d20c73e (patch) | |
tree | 6e06c18ed558acd5b478c75f709e913e028b0b82 /CMakeLists.txt | |
parent | 817f02fd5a90ce09983162b7d60f56b9b0d36868 (diff) | |
download | mariadb-git-a52ea672a00d0d8b0404b33aaeaa66704d20c73e.tar.gz |
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.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 5eddad4ad15..ea544ebcbbf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) |