CMakeLists.txt 903 Bytes
Newer Older
1 2 3
cmake_minimum_required (VERSION 2.8.11)
project (PRRT)

4 5
option(PRRT_TESTS "Build tests" OFF)

6 7
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/build)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/build)
8 9
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

Stefan Reif's avatar
Stefan Reif committed
10 11
set(CMAKE_C_FLAGS "-O2 -Wall -std=gnu11 -D_GNU_SOURCE" )
set(CMAKE_CXX_FLAGS "-fstack-protector -fstack-protector-all -Wall -std=gnu++11 -D_GNU_SOURCE" )
Andreas Schmidt's avatar
Andreas Schmidt committed
12 13 14
set(CMAKE_CXX_FLAGS_DEBUG "-O2 -Wall -ggdb" )
set(CMAKE_CXX_FLAGS_RELEASE "-Os -Wall" )

15

16
find_package (Threads)
17 18
find_library(M_LIB m)

19

20
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
21

22
add_subdirectory(prrt)
23 24 25 26 27

if(PRRT_TESTS)
    enable_testing()

    add_subdirectory(tests)
28 29

    add_custom_target(funtest COMMAND ./bin/prrtTests)
30
endif()
31

32
add_custom_target(perftest COMMAND python3 eval.py)
33
add_custom_target(memtest COMMAND bash ./memtest.sh DEPENDS sender receiver)