]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - opencl/llvm.git/commitdiff
CMake: auto-discover project files under the projects/ subdirectory.
authorOscar Fuentes <ofv@wanadoo.es>
Fri, 6 Mar 2009 01:16:52 +0000 (01:16 +0000)
committerOscar Fuentes <ofv@wanadoo.es>
Fri, 6 Mar 2009 01:16:52 +0000 (01:16 +0000)
Patch by Viktar Zviarovich!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66230 91177308-0d34-0410-b5e6-96231b3b80d8

CMakeLists.txt
projects/CMakeLists.txt [new file with mode: 0644]

index 3dcc5e4f7ff0214e3b31ac4b2b788167993a1f78..4ee8d204007464003038419c351b6bd3f6da6e02 100644 (file)
@@ -203,6 +203,7 @@ add_subdirectory(lib/AsmParser)
 add_subdirectory(lib/Debugger)
 add_subdirectory(lib/Archive)
 
+add_subdirectory(projects)
 add_subdirectory(tools)
 
 add_subdirectory(examples)
diff --git a/projects/CMakeLists.txt b/projects/CMakeLists.txt
new file mode 100644 (file)
index 0000000..78e12fd
--- /dev/null
@@ -0,0 +1,9 @@
+# Discover the projects that use CMake in the subdirectories.
+# Note that explicit cmake invocation is required every time a new project is
+# added or removed.
+file(GLOB entries *)
+foreach(entry ${entries})
+  if(IS_DIRECTORY ${entry} AND EXISTS ${entry}/CMakeLists.txt)
+    add_subdirectory(${entry})
+  endif()
+endforeach(entry)