[libcxx] Add new Sphinx documentation

Summary:
This patch adds Sphinx based documentation to libc++. The goal is to make it easier to write documentation for libc++ since writing new documentation in HTML is cumbersome. This patch rewrites the main page for libc++ along with the instructions for using, building and testing libc++. 

The built documentation can be found and reviewed here: http://efcs.ca/libcxx-docs

In order to build the sphinx documentation you need to specify the cmake options `-DLLVM_ENABLE_SPHINX=ON -DLIBCXX_INCLUDE_DOCS=ON`. This will add the makefile rule `docs-libcxx-html`.

Reviewers: chandlerc, mclow.lists, danalbert, jroelofs

Subscribers: silvas, cfe-commits

Differential Revision: http://reviews.llvm.org/D12129

llvm-svn: 245788
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: b17bb06914abe652c5aa30cb94382907f3f78962
diff --git a/cmake/Modules/HandleOutOfTreeLLVM.cmake b/cmake/Modules/HandleOutOfTreeLLVM.cmake
index 53adb06..3bf5d60 100644
--- a/cmake/Modules/HandleOutOfTreeLLVM.cmake
+++ b/cmake/Modules/HandleOutOfTreeLLVM.cmake
@@ -77,6 +77,9 @@
   if (NOT DEFINED LLVM_INCLUDE_TESTS)
     set(LLVM_INCLUDE_TESTS ${LLVM_FOUND})
   endif()
+  if (NOT DEFINED LLVM_ENABLE_SPHINX)
+    set(LLVM_ENABLE_SPHINX OFF)
+  endif()
 
   # Required LIT Configuration ------------------------------------------------
   # Define the default arguments to use with 'lit', and an option for the user
@@ -95,6 +98,14 @@
     set(cmake_3_2_USES_TERMINAL USES_TERMINAL)
   endif()
 
+  # Required doc configuration
+  if (LLVM_ENABLE_SPHINX)
+    message(STATUS "Sphinx enabled.")
+    find_package(Sphinx REQUIRED)
+  else()
+    message(STATUS "Sphinx disabled.")
+  endif()
+
   # Add LLVM Functions --------------------------------------------------------
   include(AddLLVM OPTIONAL)
 endif()