build the client library even if stasis is not present
git-svn-id: svn+ssh://svn.corp.yahoo.com/yahoo/yrl/labs/pnuts/code/logstore@604 8dad8b1f-cf64-0410-95b6-bcf113ffbcfe
This commit is contained in:
parent
63a14d8509
commit
6bc4bc1f82
2 changed files with 21 additions and 11 deletions
|
@ -21,6 +21,7 @@ INCLUDE(CTest)
|
|||
INCLUDE(CheckFunctionExists)
|
||||
INCLUDE(CheckCSourceCompiles)
|
||||
|
||||
|
||||
SET(CMAKE_REQUIRED_FLAGS "-lm -lstasis -lpthread")
|
||||
|
||||
MACRO(CREATE_CHECK NAME)
|
||||
|
@ -37,7 +38,7 @@ ENDMACRO(CREATE_EXECUTABLE)
|
|||
MACRO(CREATE_CLIENT_EXECUTABLE NAME)
|
||||
ADD_EXECUTABLE(${NAME} ${NAME}.cpp)
|
||||
TARGET_LINK_LIBRARIES(${NAME} ${CLIENT_LIBRARIES})
|
||||
ENDMACRO(CREATE_EXECUTABLE)
|
||||
ENDMACRO(CREATE_CLIENT_EXECUTABLE NAME)
|
||||
|
||||
|
||||
# Output the config.h file
|
||||
|
@ -49,6 +50,11 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../stasis/
|
|||
# set linker path for this and all subdirs
|
||||
LINK_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../stasis/build/src/stasis ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
FIND_LIBRARY(HAVE_STASIS NAMES stasis PATHS ${CMAKE_CURRENT_SOURCE_DIR}/../stasis/build/src/stasis)
|
||||
if(NOT HAVE_STASIS)
|
||||
message(STATUS "stasis not found; only building client library")
|
||||
endif(NOT HAVE_STASIS)
|
||||
|
||||
SET(CLIENT_LIBRARIES logstore_client)
|
||||
|
||||
IF ( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" )
|
||||
|
@ -69,6 +75,8 @@ ENDIF ( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" )
|
|||
|
||||
#CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||
|
||||
IF ( HAVE_STASIS )
|
||||
ADD_LIBRARY(logstore logserver.cpp logstore.cpp diskTreeComponent.cpp logiterators.cpp datapage.cpp merger.cpp tuplemerger.cpp)
|
||||
ADD_LIBRARY(logstore_client tcpclient.cpp)
|
||||
CREATE_EXECUTABLE(server)
|
||||
ENDIF ( HAVE_STASIS )
|
||||
ADD_LIBRARY(logstore_client tcpclient.cpp)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
IF( HAVE_STASIS )
|
||||
CREATE_CHECK(check_gen)
|
||||
CREATE_CHECK(check_logtree)
|
||||
CREATE_CHECK(check_datapage)
|
||||
|
@ -6,4 +7,5 @@ CREATE_CHECK(check_merge)
|
|||
CREATE_CHECK(check_mergelarge)
|
||||
CREATE_CHECK(check_mergetuple)
|
||||
CREATE_CHECK(check_rbtree)
|
||||
ENDIF( HAVE_STASIS )
|
||||
CREATE_CLIENT_EXECUTABLE(check_tcpclient)
|
||||
|
|
Loading…
Reference in a new issue