-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
32 lines (26 loc) · 1.08 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
### make sure the user is doing an our of source build:
if ( ${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR} )
message( FATAL_ERROR "In-source builds are not allowed. use cmake -H. -Bbuild instead to build in the build folder" )
endif()
###
cmake_minimum_required (VERSION 2.6)
project (panoc C)
# set the compiler with its flags
# SET(CMAKE_C_COMPILER gcc)
SET(CMAKE_BUILD_TYPE Debug)
if(NOT MSVC)
set(CMAKE_C_FLAGS_DEBUG "-g -O0 -Wall -Wextra -fprofile-arcs -ftest-coverage")
set(LDFLAGS "-O0 -fprofile-arcs -ftest-coverage")
SET(CMAKE_EXE_LINKER_FLAGS="-fprofile-arcs -ftest-coverage")
endif()
# subdirectories with libraries
include_directories ("${PROJECT_SOURCE_DIR}/src")
add_subdirectory (src) # read out the cmakelist file
include_directories ("${PROJECT_SOURCE_DIR}/test")
add_subdirectory(test)
# Test the functionality
enable_testing()
# Tests on the matrix/vector operations
add_test(NAME indicator_box_test COMMAND test/indicator_box_test)
add_test(NAME indicator_bin_test COMMAND test/indicator_bin_test)
add_test(NAME quicksort_test COMMAND test/quicksort_test)