Configure a project for testing with CTest (#537)
authorIvan Vagin/AI Tools Lab /SRR/Engineer/삼성전자 <ivan.vagin@samsung.com>
Mon, 9 Jul 2018 13:39:33 +0000 (16:39 +0300)
committerSergey Vostokov/AI Tools Lab /SRR/Staff Engineer/삼성전자 <s.vostokov@samsung.com>
Mon, 9 Jul 2018 13:39:33 +0000 (22:39 +0900)
Configure a project for testing with CTest - include CTest in CMakeLists.txt

Signed-off-by: Ivan Vagin <ivan.vagin@samsung.com>
CMakeLists.txt

index 5eff871..21e70a8 100644 (file)
@@ -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)