[doxygen] Added code for generating doxygen documentation for clang for cmake.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189508 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ab35749..6967953 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -335,13 +335,17 @@
        "Generate build targets for the Clang unit tests."
        ${LLVM_INCLUDE_TESTS})
 
-# TODO: docs.
-
 if( CLANG_INCLUDE_TESTS )
   add_subdirectory(test)
   add_subdirectory(unittests)
 endif()
 
+option(CLANG_INCLUDE_DOCS "Generate build targets for the Clang docs."
+  ${LLVM_INCLUDE_DOCS})
+if( CLANG_INCLUDE_DOCS )
+  add_subdirectory(docs)
+endif()
+
 # Workaround for MSVS10 to avoid the Dialog Hell
 # FIXME: This could be removed with future version of CMake.
 if( CLANG_BUILT_STANDALONE AND MSVC_VERSION EQUAL 1600 )