DefineOptions.cmake 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # Load the presets
  2. if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
  3. include(osx.preset)
  4. else(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
  5. if(NOT CMAKE_CROSSCOMPILING)
  6. include(linux.preset)
  7. endif(NOT CMAKE_CROSSCOMPILING)
  8. endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
  9. # Main Settings
  10. set(WITH_SYSTEM_CALLS "none" CACHE STRING "Choose what system calls can be used, options are: none, sbrk, mmap")
  11. set(SYS_ALLOC_SIZE 4096 CACHE INTEGER "Choose the default system allocation size")
  12. option(HAVE_LOCKS "Build with POSIX locking mechanisms" OFF)
  13. set(RAW_BLOCKS_TYPE "freelist" CACHE STRING "Choose what raw blocks can be used, options are: freelist, bitmap")
  14. # Free-list Settings
  15. set(ORDERING_POLICY "lifo" CACHE STRING "Choose the ordering policy in freelist-organized raw blocks, options are: address, fifo, lifo, size")
  16. set(FITTING_POLICY "best" CACHE STRING "Choose the fitting policy in freelist-organized raw blocks, options are: best, exact, first, good")
  17. set(GOOD_FIT_PERCENTAGE 0.8 CACHE DOUBLE "Choose the good-fit percentage")
  18. set(WITH_COALESCING "never" CACHE STRING "Build with coalescing support")
  19. set(WITH_SPLITTING "never" CACHE STRING "Build with splitting support")
  20. option(FREELIST_COALESCE_AFTER_SPLIT "Try to coalesce blocks after split" OFF)
  21. # Bitmap Settings
  22. set(BITMAP_RESOLUTION 256 CACHE INTEGER "Choose the size of cells in bitmap-organised raw blocks")
  23. # Function Implementation Settings
  24. option(WITH_REALLOC "Build with realloc() support" ON)
  25. option(WITH_CALLOC "Build with calloc() support" ON)
  26. option(WITH_MEMALIGN "Build with memalign() support" ON)
  27. # GLIBC Hooks Settings
  28. option(WITH_GLIBC_HOOKS "Place dmmlib functions on GLIBC hooks" OFF)
  29. # Knobs Settings
  30. option(WITH_KNOBS "Build with knobs support" OFF)
  31. # Statistics Settings
  32. set(STATS "none" CACHE STRING "Choose if the memory allocator keeps internally statistics per raw block or globally, options are: none, global")
  33. option(REQUEST_SIZE_INFO "Keep request size information in metadata" OFF)
  34. # Trace Settings
  35. option(WITH_MEM_TRACE "Support for memory traces" OFF)
  36. option(WITH_STATS_TRACE "Support for statistics traces" OFF)
  37. # Build Settings
  38. option(WITH_STATIC_LIB "Build a static library" OFF)
  39. option(WITH_SHARED_LIB "Build a shared library" OFF)
  40. # Misc Settings
  41. option(PARSE_ENV "Build with support to parse dmmlib environment variables" OFF)
  42. option(WITH_EXAMPLES "Build with examples" OFF)
  43. option(WITH_DOC "Build with documentation" OFF)