[llvm-commits] [llvm] r66230 - in /llvm/trunk: CMakeLists.txt projects/CMakeLists.txt

Oscar Fuentes ofv at wanadoo.es
Thu Mar 5 17:16:52 PST 2009


Author: ofv
Date: Thu Mar  5 19:16:52 2009
New Revision: 66230

URL: http://llvm.org/viewvc/llvm-project?rev=66230&view=rev
Log:
CMake: auto-discover project files under the projects/ subdirectory.

Patch by Viktar Zviarovich!

Added:
    llvm/trunk/projects/CMakeLists.txt
Modified:
    llvm/trunk/CMakeLists.txt

Modified: llvm/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=66230&r1=66229&r2=66230&view=diff

==============================================================================
--- llvm/trunk/CMakeLists.txt (original)
+++ llvm/trunk/CMakeLists.txt Thu Mar  5 19:16:52 2009
@@ -203,6 +203,7 @@
 add_subdirectory(lib/Debugger)
 add_subdirectory(lib/Archive)
 
+add_subdirectory(projects)
 add_subdirectory(tools)
 
 add_subdirectory(examples)

Added: llvm/trunk/projects/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/projects/CMakeLists.txt?rev=66230&view=auto

==============================================================================
--- llvm/trunk/projects/CMakeLists.txt (added)
+++ llvm/trunk/projects/CMakeLists.txt Thu Mar  5 19:16:52 2009
@@ -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)





More information about the llvm-commits mailing list