[llvm] r233428 - [CMake] Removing duplicates from the list of test suites to generate targets for.

Chris Bieneman beanz at apple.com
Fri Mar 27 14:45:49 PDT 2015


Author: cbieneman
Date: Fri Mar 27 16:45:49 2015
New Revision: 233428

URL: http://llvm.org/viewvc/llvm-project?rev=233428&view=rev
Log:
[CMake] Removing duplicates from the list of test suites to generate targets for.

Not doing this causes some headaches for users migrating from autoconf to CMake.

Modified:
    llvm/trunk/cmake/modules/AddLLVM.cmake

Modified: llvm/trunk/cmake/modules/AddLLVM.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/AddLLVM.cmake?rev=233428&r1=233427&r2=233428&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/AddLLVM.cmake (original)
+++ llvm/trunk/cmake/modules/AddLLVM.cmake Fri Mar 27 16:45:49 2015
@@ -803,8 +803,13 @@ function(add_lit_testsuites project dire
   if (NOT CMAKE_CONFIGURATION_TYPES)
     parse_arguments(ARG "PARAMS;DEPENDS;ARGS" "" ${ARGN})
     file(GLOB_RECURSE litCfg ${directory}/lit*.cfg)
+    set(lit_suites)
     foreach(f ${litCfg})
       get_filename_component(dir ${f} DIRECTORY)
+      set(lit_suites ${lit_suites} ${dir})
+    endforeach()
+    list(REMOVE_DUPLICATES lit_suites)
+    foreach(dir ${lit_suites})
       string(REPLACE ${directory} "" name_slash ${dir})
       if (name_slash)
         string(REPLACE "/" "-" name_slash ${name_slash})





More information about the llvm-commits mailing list