summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorben-craig <ben.craig@gmail.com>2015-07-15 08:11:57 -0500
committerben-craig <ben.craig@gmail.com>2015-07-15 08:11:57 -0500
commit1f64ea95995c6a2d35aa9e8a52aed49bf13dfb3c (patch)
tree72485e54fac3a95b1db3f611c4f98812dc8ddfd5
parent5af2d99c5e9de2e3af63732a7ee20e1fe49dd564 (diff)
downloadthrift-1f64ea95995c6a2d35aa9e8a52aed49bf13dfb3c.tar.gz
THRIFT-3245 Tutorials can't be disabled when using CMake
Client: cpp Patch: Pascal Bach This closes #551
-rw-r--r--CMakeLists.txt4
-rw-r--r--build/cmake/DefineOptions.cmake1
2 files changed, 4 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 63e003e8f..44f65afbf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -73,7 +73,9 @@ endif()
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)
diff --git a/build/cmake/DefineOptions.cmake b/build/cmake/DefineOptions.cmake
index adedcc807..d336c5019 100644
--- a/build/cmake/DefineOptions.cmake
+++ b/build/cmake/DefineOptions.cmake
@@ -24,6 +24,7 @@ include(CMakeDependentOption)
option(BUILD_COMPILER "Build Thrift compiler" ON)
option(BUILD_TESTING "Build with unit tests" ON)
option(BUILD_EXAMPLES "Build examples" ON)
+option(BUILD_TUTORIALS "Build Thrift tutorials" ON)
option(BUILD_LIBRARIES "Build Thrift libraries" ON)
# Libraries to build