cmake_minimum_required (VERSION 2.6) project (MyHttpd C) # The version number. set (MYHTTPD_VERSION_MAJOR 0) set (MYHTTPD_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(-DDEBUG) 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)