-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
34 lines (32 loc) · 1.01 KB
/
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
cmake_minimum_required(VERSION 3.5)
project(triangle_counting)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
option(VERBOSE "verbose std::cout" OFF)
option(TIMECOUNTING "counting the time used" OFF)
option(ENABLETESTING "enable unit test" OFF)
option(OPENMP "use OPENMP" OFF)
option(CODE_COVERAGE "Enable coverage reporting" OFF)
if(VERBOSE)
add_definitions("-DVERBOSE=1")
endif()
if(TIMECOUNTING)
add_definitions("-DTIMECOUNTING=1")
endif()
if(OPENMP)
find_package(OpenMP REQUIRED)
add_definitions("-DOPENMP=1")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
endif()
include_directories(${CMAKE_SOURCE_DIR})
find_package(lemon REQUIRED)
include_directories(${LEMON_INCLUDE_DIR})
add_subdirectory(lemontc)
if(ENABLE_TESTING)
include(CTest)
find_package(GTest REQUIRED)
find_package(Threads REQUIRED)
add_executable(test_alg test.cpp)
target_link_libraries(test_alg lemontc GTest::GTest GTest::Main Threads::Threads)
add_test(NAME test_alg COMMAND test_alg)
endif()