forked from lamerman/cpp-lru-cache
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
43 lines (31 loc) · 960 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
cmake_minimum_required(VERSION 2.8)
project(CPP-LRU_CACHE)
find_package(Threads REQUIRED)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
set(EXT_PROJECTS_DIR ${PROJECT_SOURCE_DIR}/ext)
add_subdirectory(${EXT_PROJECTS_DIR}/gtest)
enable_testing()
include_directories(
${GTEST_INCLUDE_DIRS}
${PROJECT_SOURCE_DIR}/include)
add_executable(
cpp-lru-cache-test
src/test)
add_dependencies(cpp-lru-cache-test googletest)
target_link_libraries(
cpp-lru-cache-test
${GTEST_LIBS_DIR}/libgtest.a
${GTEST_LIBS_DIR}/libgtest_main.a
${CMAKE_THREAD_LIBS_INIT})
set_target_properties(cpp-lru-cache-test PROPERTIES
PREFIX ""
SUFFIX ""
COMPILE_FLAGS "-std=c++0x -W -Wall -pedantic")
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g3")
set(CMAKE_CSS_FLAGS_RELEASE "-03 -g")
add_test(
NAME cpp-lru-cache-test
COMMAND cpp-lru-cache-test
)
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --verbose
DEPENDS cpp-lru-cache-test)