THRIFT-2850 CMake for Apache Thrift
add test/cpp and lib/py
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3fe0f92..f20d069 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -61,6 +61,10 @@
 include(CTest)
 if(BUILD_TESTING)
   message(STATUS "Building with unittests")
+
+  enable_testing()
+  # Define "make check" as alias for "make test"
+  add_custom_target(check COMMAND ctest)
 else ()
   message(STATUS "Building without tests")
 endif ()
@@ -70,6 +74,9 @@
 
 if(WITH_CPP)
     add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/lib/cpp)
+    if(BUILD_TESTING)
+        add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/test/cpp)
+    endif()
 endif()
 
 if(WITH_C_GLIB)
@@ -80,4 +87,8 @@
     add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/lib/java)
 endif()
 
+if(WITH_PYTHON)
+    add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/lib/py)
+endif()
+
 PRINT_CONFIG_SUMMARY()