summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
blob: 7f9af194b8a9e92e7ffe2d245c16dd12b30bb46f (plain)
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
cmake_minimum_required (VERSION 2.6)
project (NetLemmings C)

# The version number.
set (NetLemmings_VERSION_MAJOR 0)
set (NetLemmings_VERSION_MINOR 1)

set(TEST_SCRIPTS_PATH ${PROJECT_SOURCE_DIR}/src/test)
 
# Include the directory itself as a path to include directories
set(CMAKE_INCLUDE_CURRENT_DIR ON)
#set(INCLUDE_DIRECTORIES "${PROJECT_SOURCE_DIR}/include")
set(INCLUDE_DIRECTORIES src/include)
# add the binary tree to the search path for include files
# so that we will find netlem.h and netlem_ds.h
include_directories("${INCLUDE_DIRECTORIES}" "${PROJECT_BINARY_DIR}")

add_definitions(-Wall -Wextra -pedantic -Werror -std=c99 -D_POSIX_SOURCE -g)
add_definitions(-pg)
set (CMAKE_EXE_LINKER_FLAGS -pg)

add_subdirectory(src)
add_subdirectory(src/test)

set(ENV{LC_ALL} C)

enable_testing()
add_test(testfunc000_env ${TEST_SCRIPTS_PATH}/testfunc_000_env.sh)
add_test(testfunc001_lex ${TEST_SCRIPTS_PATH}/testfunc_001_lex.sh)
add_test(testfunc002_parse ${TEST_SCRIPTS_PATH}/testfunc_002_parse.sh)
add_test(testfunc003_loadress ${TEST_SCRIPTS_PATH}/testfunc_003_loadress.sh)