From 1d3ad6faa22a040bc6bb15727b9783ae2f547a02 Mon Sep 17 00:00:00 2001 From: Tycho Date: Sun, 27 Apr 2014 12:25:03 -0700 Subject: Added Testing capability --- CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 9a860920c..45fc8c37a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 2.8.2) # Without this, the MSVC variable isn't defined for MSVC builds ( http://www.cmake.org/pipermail/cmake/2011-November/047130.html ) enable_language(CXX C) @@ -69,3 +69,8 @@ set_exe_flags() add_subdirectory (src) +if(${SELF_TEST}) + enable_testing() + add_subdirectory (tests) +endif() + -- cgit v1.2.3 From 77395b37390ecf23218659925c61e0a9b44d8476 Mon Sep 17 00:00:00 2001 From: Tycho Date: Sat, 10 May 2014 05:03:36 -0700 Subject: Maybe coverage working? --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 45fc8c37a..56dea1a34 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,6 +14,10 @@ if(DEFINED ENV{TRAVIS_MCSERVER_FORCE32}) set(FORCE32 $ENV{TRAVIS_MCSERVER_FORCE32}) endif() +if(DEFINED ENV{TRAVIS_BUILD_WITH_COVERAGE}) + set(BUILD_WITH_COVERAGE $ENV{TRAVIS_BUILD_WITH_COVERAGE}) +endif() + # This has to be done before any flags have been set up. if(${BUILD_TOOLS}) add_subdirectory(Tools/MCADefrag/) -- cgit v1.2.3