THRIFT-3245 Tutorials can't be disabled when using CMake
Client: cpp
Patch: Pascal Bach

This closes #551
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 63e003e..44f65af 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -73,7 +73,9 @@
 
 if(BUILD_CPP)
     add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/lib/cpp)
-    add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/tutorial/cpp)
+    if(BUILD_TUTORIALS)
+        add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/tutorial/cpp)
+    endif(BUILD_TUTORIALS)
     if(BUILD_TESTING)
         if(WITH_LIBEVENT AND WITH_ZLIB AND WITH_OPENSSL)
             add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/test/cpp)