From de8504dc9884f520138da15dab0296cc45782e3a Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Sat, 17 Mar 2018 15:13:43 +0100 Subject: make jemalloc optional at compile time --- CMakeLists.txt | 2 ++ CMakeScripts/DefineDependsandFlags.cmake | 10 +++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e175b374e..af0562079 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -109,6 +109,7 @@ option(WITH_LIBVISIO "Compile with support of libvisio for Microsoft Visio Diagr option(WITH_LIBWPG "Compile with support of libwpg for WordPerfect Graphics" ON) option(WITH_NLS "Compile with Native Language Support (using gettext)" ON) option(WITH_YAML "Compile with YAML support (enables xverbs)" ON) +option(WITH_JEMALLOC "Compile with JEMALLOC support" ON) option(WITH_FUZZ "Compile for fuzzing purpose (use 'make fuzz' only)" OFF) mark_as_advanced(WITH_FUZZ) @@ -298,6 +299,7 @@ message("WITH_NLS: ${WITH_NLS}") message("WITH_OPENMP: ${WITH_OPENMP}") message("WITH_PROFILING: ${WITH_PROFILING}") message("WITH_YAML: ${WITH_YAML}") +message("WITH_JEMALLOC: ${WITH_JEMALLOC}") if(WIN32) message("") diff --git a/CMakeScripts/DefineDependsandFlags.cmake b/CMakeScripts/DefineDependsandFlags.cmake index a1ce9c16a..05de34db4 100644 --- a/CMakeScripts/DefineDependsandFlags.cmake +++ b/CMakeScripts/DefineDependsandFlags.cmake @@ -68,9 +68,13 @@ if(APPLE AND DEFINED ENV{CMAKE_PREFIX_PATH}) endif() -find_package(JeMalloc) -if (JEMALLOC_FOUND) - list(APPEND INKSCAPE_LIBS ${JEMALLOC_LIBRARIES}) +if(WITH_JEMALLOC) + find_package(JeMalloc) + if (JEMALLOC_FOUND) + list(APPEND INKSCAPE_LIBS ${JEMALLOC_LIBRARIES}) + else() + set(WITH_JEMALLOC OFF) + endif() endif() if(ENABLE_LCMS) -- cgit v1.2.3