From f772608d03c9dff032b43dcdd6eaf7c14c28bfa7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ivan=20Vagin/AI=20Tools=20Lab=20/SRR/Engineer/=EC=82=BC?= =?utf8?q?=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Mon, 9 Jul 2018 16:39:33 +0300 Subject: [PATCH] Configure a project for testing with CTest (#537) Configure a project for testing with CTest - include CTest in CMakeLists.txt Signed-off-by: Ivan Vagin --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5eff871..21e70a8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,6 +55,10 @@ if(${ENABLE_COVERAGE} AND NOT ${ENABLE_TEST}) message(FATAL_ERROR "Test should be enabled to measure test coverage") endif(${ENABLE_COVERAGE} AND NOT ${ENABLE_TEST}) +if(${ENABLE_TEST}) + include(CTest) +endif(${ENABLE_TEST}) + option(ENABLE_EXAMPLE_BUILD "Build examples" ON) option(ENABLE_CONTRIB_BUILD "Build incubating projects under contrib/" ON) option(ENABLE_STRICT_BUILD "Treat warning as error" OFF) -- 2.7.4