]> granicus.if.org Git - libexpat/commitdiff
CMake: Move enable_testing closer to test runner code
authorSebastian Pipping <sebastian@pipping.org>
Mon, 12 Aug 2019 18:31:47 +0000 (20:31 +0200)
committerSebastian Pipping <sebastian@pipping.org>
Mon, 12 Aug 2019 19:26:08 +0000 (21:26 +0200)
expat/CMakeLists.txt

index 56c68b223c981d27e1109a5a476eb68d93153853..78f3e3d15a9c102a81560af5517be200e86f2645 100644 (file)
@@ -114,11 +114,6 @@ if(BUILD_tools AND (XML_UNICODE AND NOT XML_UNICODE_WCHAR_T))
     message(SEND_ERROR "The xmlwf tool can not be built with option XML_UNICODE_WCHAR_T=OFF and XML_UNICODE=ON. Either set XML_UNICODE_WCHAR_T=ON or BUILD_tools=OFF.")
 endif()
 
-if(BUILD_tests)
-    enable_testing()
-endif(BUILD_tests)
-
-
 include(${CMAKE_CURRENT_LIST_DIR}/ConfigureChecks.cmake)
 
 macro(evaluate_detection_results use_ref have_ref thing_lower thing_title)
@@ -285,6 +280,8 @@ endif(BUILD_examples)
 #
 if(BUILD_tests)
     ## these are unittests that can be run on any platform
+    enable_testing()
+
     set(test_SRCS
         tests/chardata.c
         tests/memcheck.c