working on a cmake environment
[umurmur.git] / CMakeLists.txt
1 project(umurmurd)
2
3 cmake_minimum_required(VERSION 2.8)
4
5 add_definitions()
6
7 include(FindPkgConfig)
8 include(CheckFunctionExists)
9 include(CheckLibraryExists)
10
11 pkg_check_modules(BASELIBS libconfig)
12 check_function_exists(clock_gettime GAVE_CLOCK_GETTIME)
13 check_library_exists(rt clock_gettime "time.h" HAVE_CLOCK_GETTIME_RT)
14
15 set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g")
16 set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")
17
18 set(SOURCE "")
19
20 add_subdirectory(src)
21 include_directories(include)
22
23 add_executable(umurmurd ${SOURCE})
24 target_link_libraries(umurmurd pthread)