From f12bcfd20439751df24d77e66ba92c44f1e2e4f5 Mon Sep 17 00:00:00 2001
From: Russell Taylor <taylorrj@ornl.gov>
Date: Tue, 4 Jan 2011 16:35:00 +0000
Subject: [PATCH] Add custom targets to build everything in the Framework or in
 MantidQt. Re #1881.

---
 Code/Mantid/Framework/CMakeLists.txt | 16 +++++++++++++++-
 Code/Mantid/MantidQt/CMakeLists.txt  | 11 +++++++++++
 2 files changed, 26 insertions(+), 1 deletion(-)

diff --git a/Code/Mantid/Framework/CMakeLists.txt b/Code/Mantid/Framework/CMakeLists.txt
index 1a7b6d6ded6..d4883b507e3 100644
--- a/Code/Mantid/Framework/CMakeLists.txt
+++ b/Code/Mantid/Framework/CMakeLists.txt
@@ -101,4 +101,18 @@ add_subdirectory (ICat)
 if ( ${MAKE_VATES} )
   add_subdirectory (MDDataObjects)
   add_subdirectory (MDAlgorithms)
-endif ()
\ No newline at end of file
+endif ()
+
+###########################################################################
+# Add a custom target to build all of the Framework
+###########################################################################
+
+set ( FRAMEWORK_LIBS Kernel Geometry API PythonAPI DataObjects
+                     DataHandling Nexus Algorithms CurveFitting ICat
+)
+
+if ( ${MAKE_VATES} )
+  set ( FRAMEWORK_LIBS ${FRAMEWORK_LIBS} MDDataObjects MDAlgorithms )
+endif ()
+
+add_custom_target ( Framework DEPENDS ${FRAMEWORK_LIBS} )
\ No newline at end of file
diff --git a/Code/Mantid/MantidQt/CMakeLists.txt b/Code/Mantid/MantidQt/CMakeLists.txt
index 4960069f701..cdc4a6b569c 100644
--- a/Code/Mantid/MantidQt/CMakeLists.txt
+++ b/Code/Mantid/MantidQt/CMakeLists.txt
@@ -1,6 +1,17 @@
+###########################################################################
+# Now add the packages one-by-one, building up the dependencies as we go
+###########################################################################
 
 include_directories ( API/inc )
 add_subdirectory ( API )
 add_subdirectory ( MantidWidgets )
 add_subdirectory ( CustomDialogs )
 add_subdirectory ( CustomInterfaces )
+
+###########################################################################
+# Add a custom target to build all of the MantidQt packages
+###########################################################################
+
+add_custom_target ( MantidQt DEPENDS MantidQtAPI MantidWidgets 
+                                     CustomDialogs CustomInterfaces
+) 
\ No newline at end of file
-- 
GitLab