CMake: Use the new USES_TERMINAL option for test suite targets when available.
authorPeter Collingbourne <peter@pcc.me.uk>
Mon, 17 Nov 2014 22:16:15 +0000 (22:16 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Mon, 17 Nov 2014 22:16:15 +0000 (22:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222181 91177308-0d34-0410-b5e6-96231b3b80d8

CMakeLists.txt
cmake/modules/AddLLVM.cmake

index f2b3d32..e3ddb26 100644 (file)
@@ -16,6 +16,12 @@ else()
   endif()
 endif()
 
+if(CMAKE_VERSION VERSION_LESS 3.1.20141117)
+  set(cmake_3_2_USES_TERMINAL)
+else()
+  set(cmake_3_2_USES_TERMINAL USES_TERMINAL)
+endif()
+
 project(LLVM)
 
 # Add path for custom modules
index 15ce624..bc26f06 100644 (file)
@@ -679,6 +679,7 @@ function(add_lit_target target comment)
     add_custom_target(${target}
       COMMAND ${LIT_COMMAND} ${ARG_DEFAULT_ARGS}
       COMMENT "${comment}"
+      ${cmake_3_2_USES_TERMINAL}
       )
     add_dependencies(${target} ${ARG_DEPENDS})
   else()