CMake: add version information into the clang executable and libclang
shared library.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126502 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a5306fc..b1ab11d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -234,6 +234,16 @@
 
 add_definitions( -D_GNU_SOURCE -DHAVE_CLANG_CONFIG_H )
 
+# Clang version information
+set(CLANG_EXECUTABLE_VERSION
+     "${CLANG_VERSION_MAJOR}.${CLANG_VERSION_MINOR}" CACHE STRING
+    "Version number that will be placed into the clang executable, in the form XX.YY")
+set(LIBCLANG_LIBRARY_VERSION
+     "${CLANG_VERSION_MAJOR}.${CLANG_VERSION_MINOR}" CACHE STRING
+    "Version number that will be placed into the libclang library , in the form XX.YY")
+mark_as_advanced(CLANG_EXECUTABLE_VERSION LIBCLANG_LIBRARY_VERSION)
+
+
 option(CLANG_BUILD_EXAMPLES "Build CLANG example programs." OFF)
 if(CLANG_BUILD_EXAMPLES)
   add_subdirectory(examples)