Preliminary cmake build system (just enough for unit testing; misses lots of old code and benchmarks...)

This commit is contained in:
Sears Russell 2008-03-02 23:25:31 +00:00
parent e49d51cb7e
commit 034343737b
8 changed files with 132 additions and 0 deletions

44
CMakeLists.txt Normal file
View file

@ -0,0 +1,44 @@
Project(Stasis)
SET(PACKAGE_VERSION 1)
SUBDIRS(src test utilities benchmarks examples)
# Main decisions
SET(BUILD_SHARED_LIBS ON)
#ENABLE_TESTING()
INCLUDE(CTest)
# Look for include files
INCLUDE (CheckIncludeFiles)
FIND_LIBRARY(CHECK_LIBRARY NAMES check)
if(!CHECK_LIBRARY)
message("warning: libcheck not found; unit tests will not be built.")
endif(!CHECK_LIBRARY)
#CHECK_INCLUDE_FILES(check.h HAVE_LIBCHECK)
CHECK_INCLUDE_FILES(confuse.h HAVE_LIBCONFUSE)
MACRO(CREATE_CHECK NAME)
ADD_EXECUTABLE(${NAME} ${NAME})
TARGET_LINK_LIBRARIES(${NAME} -lcheck ${COMMON_LIBRARIES})
ADD_TEST(${NAME} ${NAME})
ENDMACRO(CREATE_CHECK)
MACRO(CREATE_CHECK_OPT NAME OPT)
ADD_EXECUTABLE(${NAME} ${NAME})
TARGET_LINK_LIBRARIES(${NAME} -lcheck ${COMMON_LIBRARIES})
ADD_TEST(${NAME} ${NAME} ${OPT})
ENDMACRO(CREATE_CHECK_OPT)
# Output the config.h file
#CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/src
/usr/include)
# set linker path for this and all subdirs
LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/src/stasis ${CMAKE_CURRENT_BINARY_DIR}/src/libdfa)
SET(COMMON_LIBRARIES stasis rw m pthread)
SET(CMAKE_C_FLAGS "-g -Wall -pedantic -std=gnu99 -DPBL_COMPAT ${CMAKE_C_FLAGS}")

22
CTestConfig.cmake Normal file
View file

@ -0,0 +1,22 @@
## DON'T SUBMIT TO KITWARE DASHBOARD SERVER!!!
# Dashboard is opened for submissions for a 24 hour period starting at
# the specified NIGHLY_START_TIME. Time is specified in 24 hour format.
SET (CTEST_NIGHTLY_START_TIME "23:00:00 EDT")
# Dart server to submit results (used by client)
IF(CTEST_DROP_METHOD MATCHES http)
# SET (CTEST_DROP_SITE "public.kitware.com")
SET (CTEST_DROP_SITE "localhost")
SET (CTEST_DROP_LOCATION "/cgi-bin/HTTPUploadDartFile.cgi")
ELSE(CTEST_DROP_METHOD MATCHES http)
# SET (CTEST_DROP_SITE "public.kitware.com")
SET (CTEST_DROP_SITE "localhost")
SET (CTEST_DROP_LOCATION "/incoming")
SET (CTEST_DROP_SITE_USER "ftpuser")
SET (CTEST_DROP_SITE_PASSWORD "public")
ENDIF(CTEST_DROP_METHOD MATCHES http)
SET (CTEST_TRIGGER_SITE
"http://${DROP_SITE}/cgi-bin/Submit-vtk-TestingResults.pl")

1
src/CMakeLists.txt Normal file
View file

@ -0,0 +1 @@
SUBDIRS(stasis libdfa 2pc timing apps)

1
src/apps/CMakeLists.txt Normal file
View file

@ -0,0 +1 @@
SUBDIRS(referential)

View file

@ -0,0 +1 @@
ADD_LIBRARY(rw rw.c)

29
src/stasis/CMakeLists.txt Normal file
View file

@ -0,0 +1,29 @@
ADD_LIBRARY(stasis crc32.c redblack.c lhtable.c doubleLinkedList.c
common.c flags.c stats.c io.c bufferManager.c
linkedlist.c operations.c pageHandle.c pageFile.c
pageCache.c page.c bufferPool.c blobManager.c
recovery2.c truncation.c transactional2.c
allocationPolicy.c lockManager.c iterator.c
consumer.c arrayCollection.c ringbuffer.c fifo.c
multiplexer.c graph.c logger/logEntry.c
logger/logWriter.c logger/inMemoryLog.c
logger/logHandle.c logger/logger2.c
logger/logMemory.c page/raw.c page/slotted.c
page/fixed.c compensations.c
operations/pageOperations.c page/indirect.c
operations/decrement.c operations/increment.c
operations/prepare.c operations/set.c
operations/alloc.c operations/noop.c
operations/instantSet.c operations/arrayList.c
hash.c operations/linearHash.c
operations/naiveLinearHash.c
operations/nestedTopActions.c
operations/linearHashNTA.c
operations/linkedListNTA.c
operations/pageOrientedListNTA.c operations/bTree.c
operations/regions.c operations/lsmTree.c
io/rangeTracker.c io/memory.c io/file.c io/pfile.c
io/non_blocking.c io/debug.c
bufferManager/pageArray.c
bufferManager/bufferHash.c replacementPolicy/lru.c
replacementPolicy/lruFast.c)

1
test/CMakeLists.txt Normal file
View file

@ -0,0 +1 @@
SUBDIRS(stasis)

View file

@ -0,0 +1,33 @@
IF(CHECK_LIBRARY)
CREATE_CHECK(check_lhtable)
CREATE_CHECK(check_logEntry)
CREATE_CHECK(check_logWriter)
CREATE_CHECK(check_page)
CREATE_CHECK(check_operations)
CREATE_CHECK(check_transactional2)
CREATE_CHECK(check_recovery)
CREATE_CHECK(check_blobRecovery)
CREATE_CHECK(check_bufferManager)
CREATE_CHECK(check_indirect)
CREATE_CHECK(check_pageOperations)
CREATE_CHECK(check_linearHash)
CREATE_CHECK(check_logicalLinearHash)
CREATE_CHECK(check_header)
CREATE_CHECK(check_linkedListNTA)
CREATE_CHECK(check_linearHashNTA)
CREATE_CHECK(check_pageOrientedList)
CREATE_CHECK(check_lockManager)
CREATE_CHECK(check_compensations)
CREATE_CHECK(check_errorHandling)
CREATE_CHECK(check_ringbuffer)
CREATE_CHECK(check_iterator)
CREATE_CHECK(check_multiplexer)
CREATE_CHECK(check_bTree)
CREATE_CHECK(check_regions)
CREATE_CHECK(check_allocationPolicy)
CREATE_CHECK(check_io)
CREATE_CHECK(check_rangeTracker)
CREATE_CHECK(check_replacementPolicy)
CREATE_CHECK(check_lsmTree)
ENDIF(CHECK_LIBRARY)
# check_logEntry check_logWriter check_page check_operations check_transactional2 check_recovery check_blobRecovery check_bufferManager check_indirect check_pageOperations check_linearHash check_logicalLinearHash check_header check_linkedListNTA check_linearHashNTA check_pageOrientedList check_lockManager check_compensations check_errorHandling check_ringbuffer check_iterator check_multiplexer check_bTree check_regions check_allocationPolicy check_io check_rangeTracker check_replacementPolicy check_lsmTree)