[test-suite] r338624 - cmake: llvm_multisource() should never be called with an empty source list

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 1 13:22:35 PDT 2018


Author: matze
Date: Wed Aug  1 13:22:34 2018
New Revision: 338624

URL: http://llvm.org/viewvc/llvm-project?rev=338624&view=rev
Log:
cmake: llvm_multisource() should never be called with an empty source list

Modified:
    test-suite/trunk/cmake/modules/SingleMultiSource.cmake

Modified: test-suite/trunk/cmake/modules/SingleMultiSource.cmake
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/cmake/modules/SingleMultiSource.cmake?rev=338624&r1=338623&r2=338624&view=diff
==============================================================================
--- test-suite/trunk/cmake/modules/SingleMultiSource.cmake (original)
+++ test-suite/trunk/cmake/modules/SingleMultiSource.cmake Wed Aug  1 13:22:34 2018
@@ -59,15 +59,12 @@ macro(llvm_multisource)
   else()
     file(GLOB sources *.c *.cpp *.cc)
   endif()
-  list(LENGTH sources sources_len)
 
-  if(sources_len GREATER 0 AND PROG)
-    if(NOT TESTSCRIPT)
-      llvm_test_traditional(${PROG})
-    endif()
-    set(_target ${PROG})
-    llvm_test_executable(${_target} ${sources})
+  if(NOT TESTSCRIPT)
+    llvm_test_traditional(${PROG})
   endif()
+  set(_target ${PROG})
+  llvm_test_executable(${_target} ${sources})
 endmacro()
 
 # Sets Var to ${name} with directory and shortest extension removed.




More information about the llvm-commits mailing list