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)