/simpletypesystem/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/simpletypesystem/trunk

« back to all changes in this revision

Viewing changes to CMakeLists.txt

  • Committer: Gustav Hartvigsson
  • Date: 2016-02-01 14:11:35 UTC
  • mto: This revision was merged to the branch mainline in revision 122.
  • Revision ID: gustav.hartvigsson@gmail.com-20160201141135-pcl4m4gcf8r7t11e
* Made the GC switchable at rutime (once) when compiled with S_USE_GC set.
* replaced:
  * malloc ->   s_malloc
  * free ->     s_free
  * realloc ->  s_realloc
  * calloc ->   s_calloc

* Made s_[malloc, calloc, free, realloc] functions and moved them to their own file.
  This can be used os basis for other memory stuffs in the future, if we want to use
  a Slab allocator or something else.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
# Set so it finds the cmake directory.
5
5
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
6
6
 
7
 
option (DEBUG "Enable debug flags and macros in project." TRUE)
8
 
option (USE_GC "Enable/disable the LibGC garbage colletor." FALSE)
 
7
option (DEBUG "Enable debug flags and macros in project." ON)
 
8
option (S_USE_GC "Enable/disable the LibGC garbage colletor." ON)
9
9
 
10
10
find_package (Threads REQUIRED)
11
 
if (USE_GC)
 
11
if (S_USE_GC)
12
12
  find_package (GC REQUIRED)
13
13
endif ()
14
14
 
78
78
set_target_properties (ssts PROPERTIES COMPILE_DEFINITIONS "SSTS_BUILDING=1")
79
79
 
80
80
# If we found the GC...
81
 
if (USE_GC)
 
81
if (S_USE_GC)
82
82
  if (BOEHM_GC_FOUND)
83
83
    target_include_directories (ssts PUBLIC ${BOEHM_GC_INCLUDE_DIR})
84
 
    target_link_libraries (ssts ${BOEHM_GC_LIBRARIES})
 
84
    target_link_libraries (ssts PUBLIC ${BOEHM_GC_LIBRARIES})
85
85
  endif ()
86
86
endif ()
87
87