DefineOptions.cmake 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. set(WITH_SYSTEM_CALLS "none" CACHE STRING "Choose what system calls can be used, options are: none, sbrk, mmap")
  2. set(RAW_BLOCKS_TYPE "freelist" CACHE STRING "Choose what raw blocks can be used, options are: freelist, bitmap")
  3. option(HAVE_LOCKS "Build with POSIX locking mechanisms" ON)
  4. option(WITH_REALLOC "Build with realloc" OFF)
  5. set(TRACE_LEVEL 2 CACHE INTEGER "Choose the trace level, options are: 0, 1, 2 and 3")
  6. set(STATS "global" CACHE STRING "Choose if the memory allocator keeps internally statistics per raw block or globally, options are: none, rawblock, global")
  7. option(WITH_DEBUG "Build with debugging functions" ON)
  8. option(WITH_EXAMPLES "Build with examples" OFF)
  9. option(WITH_ADAPTIVITY "Build with adaptivity" OFF)
  10. option(WITH_STATIC_LIB "Build a static library" OFF)
  11. option(WITH_SHARED_LIB "Build a shared library" OFF)
  12. option(WITH_DOC "Build with documentation" OFF)
  13. set(REQUEST_SIZE_INFO ON)
  14. # Free-list Settings
  15. set(FITTING_POLICY "best" CACHE STRING "Choose the fitting policy in freelist-organized raw blocks, options are: best, exact, first, good")
  16. set(ORDERING_POLICY "lifo" CACHE STRING "Choose the ordering policy in freelist-organized raw blocks, options are: address, fifo, lifo, size")
  17. set(WITH_COALESCING "never" "Build with coalescing support")
  18. set(WITH_SPLITTING "never" "Build with splitting support")
  19. option(FREELIST_COALESCE_AFTER_SPLIT "Try to coalesce blocks after split" OFF)
  20. # Bitmap Settings
  21. set(BITMAP_RESOLUTION 256 CACHE INTEGER "Choose the size of cells in bitmap-organised raw blocks")
  22. # Presets
  23. option(P2012 "Build for P2012 runtime" OFF)
  24. option(LEON3 "Build for Leon3" OFF)
  25. option(LINUX "Build for Linux" OFF)
  26. if(P2012)
  27. set(WITH_SYSTEM_CALLS "none")
  28. set(HAVE_LOCKS OFF)
  29. set(WITH_STATIC_LIB ON)
  30. set(SORT_POLICY "lifo")
  31. set(LINUXTEST OFF)
  32. set(WITH_COALESCING "never")
  33. set(WITH_SPLITTING "never")
  34. set(BLOCKS_ORGANIZATION "sll")
  35. set(STATS "none")
  36. set(TRACE_LEVEL 0)
  37. set(WITH_DEBUG OFF)
  38. set(WITH_REALLOC OFF)
  39. endif(P2012)
  40. if(LEON3)
  41. set(WITH_SYSTEM_CALLS "none")
  42. set(HAVE_LOCKS OFF)
  43. set(WITH_STATIC_LIB ON)
  44. set(NUM_POOLS 1)
  45. set(LINUXTEST OFF)
  46. set(COUNT_HOPS ON)
  47. set(WITH_COALESCING "never")
  48. set(WITH_SPLITTING "never")
  49. set(BLOCKS_ORGANIZATION "sll")
  50. endif(LEON3)
  51. if(LINUX)
  52. set(WITH_SYSTEM_CALLS "mmap")
  53. set(SYS_ALLOC_SIZE 4194304)
  54. set(FITTING_POLICY "first")
  55. set(ORDERING_POLICY "lifo")
  56. set(GOOD_FIT_PERCENTAGE 0.6f)
  57. set(HAVE_LOCKS ON)
  58. set(WITH_EXAMPLES ON)
  59. set(WITH_COALESCING "fixed")
  60. set(MAX_COALESCE_SIZE 60000)
  61. set(WITH_SPLITTING "fixed")
  62. set(MIN_SPLITTING_SIZE 300)
  63. set(COALESCE_AFTER_SPLIT OFF)
  64. set(WITH_SHARED_LIB ON)
  65. set(WITH_STATIC_LIB OFF)
  66. set(WITH_REALLOC ON)
  67. set(WITH_DOC ON)
  68. endif(LINUX)