From 3c74a2a6093eb6619d56b84fecf0cd3bc9d65d9d Mon Sep 17 00:00:00 2001 From: Marc Di Luzio Date: Tue, 16 Dec 2014 13:12:51 +0000 Subject: [PATCH] Add testing excecutable --- CMakeLists.txt | 1 + test/CMakeLists.txt | 20 ++++++++++++++++++++ test/test.cpp | 7 +++++++ 3 files changed, 28 insertions(+) create mode 100644 test/CMakeLists.txt create mode 100644 test/test.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index cdfab09..9eb2f49 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,3 +3,4 @@ cmake_minimum_required( VERSION 2.8.7 ) # Subprojects add_subdirectory( ttrts ) add_subdirectory( game ) +add_subdirectory( test ) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt new file mode 100644 index 0000000..85597f3 --- /dev/null +++ b/test/CMakeLists.txt @@ -0,0 +1,20 @@ + +# ====================== tests ======================= +# Project name +project( ttrts-test ) + +include_directories( + ../game +) + +set( SOURCES + test.cpp +) + +# Set to use c++11, because we're cool like that +set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11" ) + +# Add the executable +add_executable( ttrts-test ${SOURCES} ) + +target_link_libraries( ttrts-test game ) \ No newline at end of file diff --git a/test/test.cpp b/test/test.cpp new file mode 100644 index 0000000..671a826 --- /dev/null +++ b/test/test.cpp @@ -0,0 +1,7 @@ +#include "game.h" + +// Main program entry point +int main() +{ + tests::test_CBoardData(); +}; \ No newline at end of file