[Gc] CMake build file...

Lloyd Sargent lloyd at s-squared-ranch.com
Sat Sep 26 10:06:54 PDT 2009


This is my quick and dirty CMake file. I haven't put any niceties into  
it yet (like building for both Windows, Linux)... but it is my start.

# The following is the CMakeLists.txt
cmake_minimum_required (VERSION 2.6)
project (GC)

# Make sure the compiler can find include files from our Hello library.
include_directories (${GC_SOURCE_DIR}/include)
include_directories (${GC_SOURCE_DIR}/libatomic_ops-1.2)

set(DEFINITIONS ${DEFINITIONS}
		ALL_INTERIOR_POINTERS
		USE_MUNMAP
		GC_THREADS
		THREAD_LOCAL_ALLOC
		PARALLEL_MARK
		NO_DEBUGGING
		NDEBUG
	)

set(SOURCES ${SOURCES}
		${GC_SOURCE_DIR}/allchblk.c
		${GC_SOURCE_DIR}/alloc.c
		${GC_SOURCE_DIR}/backgraph.c
		${GC_SOURCE_DIR}/blacklst.c
		${GC_SOURCE_DIR}/checksums.c
		${GC_SOURCE_DIR}/darwin_stop_world.c
		${GC_SOURCE_DIR}/dbg_mlc.c
		${GC_SOURCE_DIR}/dyn_load.c
		${GC_SOURCE_DIR}/finalize.c
		${GC_SOURCE_DIR}/gcj_mlc.c
		${GC_SOURCE_DIR}/gc_dlopen.c
		${GC_SOURCE_DIR}/headers.c
		${GC_SOURCE_DIR}/mach_dep.c
		${GC_SOURCE_DIR}/malloc.c
		${GC_SOURCE_DIR}/mallocx.c
		${GC_SOURCE_DIR}/mark.c
		${GC_SOURCE_DIR}/mark_rts.c
		${GC_SOURCE_DIR}/misc.c
		${GC_SOURCE_DIR}/new_hblk.c
		${GC_SOURCE_DIR}/obj_map.c
		${GC_SOURCE_DIR}/os_dep.c
		${GC_SOURCE_DIR}/pcr_interface.c
		${GC_SOURCE_DIR}/pthread_stop_world.c
		${GC_SOURCE_DIR}/pthread_support.c
		${GC_SOURCE_DIR}/ptr_chck.c
		${GC_SOURCE_DIR}/real_malloc.c
		${GC_SOURCE_DIR}/reclaim.c
		${GC_SOURCE_DIR}/specific.c
		${GC_SOURCE_DIR}/stubborn.c
		${GC_SOURCE_DIR}/thread_local_alloc.c
		${GC_SOURCE_DIR}/typd_mlc.c
		${GC_SOURCE_DIR}/win32_threads.c
		${GC_SOURCE_DIR}/gc_cpp.cpp
     )

add_library(libgc STATIC ${SOURCES})





More information about the Gc mailing list