From 9a28f926ce73576fa02005a0a70605aadf1a27d2 Mon Sep 17 00:00:00 2001 From: Alex 'AdUser' Z Date: Thu, 18 Feb 2016 23:38:52 +1000 Subject: [PATCH] * add t/ subdirectory --- CMakeLists.txt | 2 ++ t/CMakeLists.txt | 7 +++++++ t/t_logfile.c | 8 ++++++++ 3 files changed, 17 insertions(+) create mode 100644 t/CMakeLists.txt create mode 100644 t/t_logfile.c diff --git a/CMakeLists.txt b/CMakeLists.txt index 41b4385..0e36efe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,3 +7,5 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6) SET(CMAKE_INSTALL_PREFIX "/usr/local") ADD_SUBDIRECTORY (src) +ADD_SUBDIRECTORY (t) +SET_PROPERTY(DIRECTORY "t" PROPERTY COMPILE_FLAGS "-g;-ggdb;-Wall;-Wextra;-pedantic;-O0") diff --git a/t/CMakeLists.txt b/t/CMakeLists.txt new file mode 100644 index 0000000..ad2e4ce --- /dev/null +++ b/t/CMakeLists.txt @@ -0,0 +1,7 @@ +enable_testing() + +set(SRC_DIR "../src") + +add_executable("t_logfile" "t_logfile.c" "${SRC_DIR}/logfile.c") + +add_test("tests/f2b_logfile_*" "t_logfile") diff --git a/t/t_logfile.c b/t/t_logfile.c new file mode 100644 index 0000000..11852bb --- /dev/null +++ b/t/t_logfile.c @@ -0,0 +1,8 @@ +#include + +#include "../src/common.h" +#include "../src/logfile.h" + +int main() { + exit(0); +}