blob: c69d99e2396abc6dd2c4f00cc18c5c67102b3717 [file] [log] [blame]
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
ADD_DEFINITIONS(-DTESTONLY)
AUTO_SOURCES(unit_SOURCES "*.cc" "RECURSE" ${CMAKE_CURRENT_SOURCE_DIR})
FIND_PACKAGE(GTest REQUIRED)
FIND_PACKAGE(Protobuf REQUIRED)
FIND_PACKAGE(JSON REQUIRED)
FIND_PACKAGE(Snappy REQUIRED)
FIND_PACKAGE(ZLIB REQUIRED)
INCLUDE_DIRECTORIES(${storage_ROOT_DIR}/test/unit)
INCLUDE_DIRECTORIES(${GTEST_INCLUDE_DIRS})
LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/src)
ADD_EXECUTABLE(unit EXCLUDE_FROM_ALL
${unit_SOURCES}
)
target_link_libraries(unit storage-shared gtest gmock)