Merging r220117:
------------------------------------------------------------------------
r220117 | rsmith | 2014-10-17 17:56:31 -0700 (Fri, 17 Oct 2014) | 6 lines

Hardcode the list of ELF targets here rather than using a glob.

The code was making non-portable assumptions about the exact string returned by
the glob (possibly by the shell?); this is more robust and matches what is done
everywhere else.

------------------------------------------------------------------------

llvm-svn: 224364
diff --git a/lld/lib/ReaderWriter/ELF/CMakeLists.txt b/lld/lib/ReaderWriter/ELF/CMakeLists.txt
index 39bb80c..07d7580 100644
--- a/lld/lib/ReaderWriter/ELF/CMakeLists.txt
+++ b/lld/lib/ReaderWriter/ELF/CMakeLists.txt
@@ -17,11 +17,8 @@
 
 include_directories(.)
 
-file(GLOB all_valid_subdirs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*/CMakeLists.txt")
-
-foreach(dir ${all_valid_subdirs})
-    if(${dir} MATCHES "^([^/]*)//CMakeLists.txt")
-        string(REGEX REPLACE "^([^/]*)//CMakeLists.txt" "\\1" dir_trimmed ${dir})
-        add_subdirectory(${dir_trimmed})
-    endif()
-endforeach(dir)
+add_subdirectory(Hexagon)
+add_subdirectory(Mips)
+add_subdirectory(PPC)
+add_subdirectory(X86)
+add_subdirectory(X86_64)