12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- project (dmmlib C)
- cmake_minimum_required (VERSION 2.6)
- set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
- include(DefineOptions.cmake)
- include(MacroEnsureOutOfSourceBuild)
- macro_ensure_out_of_source_build("${PROJECT_NAME} requires an out of source build. Please create a separate build directory and run 'cmake /path/to/${PROJECT_NAME} [options]' there.")
- if(CMAKE_COMPILER_IS_GNUCC AND LINUXTEST)
- add_definitions(-std=c99)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline -Wno-long-long -Wuninitialized -Wconversion -Wstrict-prototypes")
- endif(CMAKE_COMPILER_IS_GNUCC AND LINUXTEST)
- configure_file (
- "${PROJECT_SOURCE_DIR}/dmm_config.h.in"
- "${PROJECT_BINARY_DIR}/dmm_config.h"
- )
- include_directories("${PROJECT_BINARY_DIR}")
- add_subdirectory(include)
- add_subdirectory(src)
- if (WITH_EXAMPLES)
- add_subdirectory(examples)
- endif (WITH_EXAMPLES)
- if (WITH_DOC)
- add_subdirectory(doc)
- endif (WITH_DOC)
- message(STATUS "********************************************")
- message(STATUS "********** ${PROJECT_NAME} build options : **********")
- message(STATUS "Memory space awareness: " ${WITH_MEMORY_SPACE_AWARENESS})
- message(STATUS "OS call for memory requests: " ${WITH_SYSTEM_CALLS})
- message(STATUS "POSIX locking mechanisms: " ${HAVE_LOCKS})
- if(BLOCKS_ORGANIZATION STREQUAL "dll")
- message(STATUS "Block organization: Doubly-Linked Lists")
- else(BLOCKS_ORGANIZATION STREQUAL "dll")
- message(STATUS "Block organization: Singly-Linked Lists")
- endif(BLOCKS_ORGANIZATION STREQUAL "dll")
- message(STATUS "Predefined lists of fixed-sized blocks: " ${WITH_FIXED_LISTS})
- message(STATUS "Heap Ownership per Block: " ${WITH_OWNERSHIP})
- message(STATUS "Have statistics: " ${WITH_STATS})
- message(STATUS "Have knobs: " ${WITH_KNOBS})
- message(STATUS "Search policy: " ${SEARCH_POLICY})
- if(ALLOC_VAR_FIT OR HEAP_VAR_FIT)
- message(STATUS "Initial search policy: " ${INITIAL_SEARCH_POLICY})
- endif(ALLOC_VAR_FIT OR HEAP_VAR_FIT)
- if(GOOD_FIT)
- message(STATUS "Acceptable fit percentage: " ${FIT_PERCENTAGE})
- endif(GOOD_FIT)
- message(STATUS "Coalescing: " ${WITH_COALESCING})
- if(MAX_COALESCE_SIZE)
- if(WITH_COALESCING STREQUAL "fixed")
- message(STATUS " with max. coalescing size: " ${MAX_COALESCE_SIZE} " bytes")
- elseif(WITH_COALESCING STREQUAL "variable")
- message(STATUS " with initial max. coalescing size: " ${MAX_COALESCE_SIZE}
- " bytes")
- endif(WITH_COALESCING STREQUAL "fixed")
- endif(MAX_COALESCE_SIZE)
- message(STATUS "Splitting: " ${WITH_SPLITTING})
- if(MIN_SPLITTING_SIZE)
- if(WITH_SPLITTING STREQUAL "fixed")
- message(STATUS " with min. spliting size: " ${MIN_SPLITTING_SIZE} " bytes")
- elseif(WITH_SPLITTING STREQUAL "variable")
- message(STATUS " with initial min. spliting size: "
- ${MIN_SPLITTING_SIZE} " bytes")
- endif(WITH_SPLITTING STREQUAL "fixed")
- endif(MIN_SPLITTING_SIZE)
- message(STATUS "Adaptivity: " ${WITH_ADAPTIVITY})
- message(STATUS "Support for realloc(): " ${WITH_REALLOC})
- message(STATUS "Replace function calls: " ${REPLACE_MALLOC})
- message(STATUS "********************************************")
|