summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorRoger Meier <roger@apache.org>2015-04-12 16:10:35 +0200
committerRoger Meier <roger@apache.org>2015-04-12 16:10:35 +0200
commit2659381e7f94b825c0b1ff6e80a119035a4a0de5 (patch)
tree6b2ed66fbace72dbac5d1026dc176bc763234f0f /CMakeLists.txt
parent79e971e7de6bfe586872323e548e8c23f79c5f08 (diff)
downloadthrift-2659381e7f94b825c0b1ff6e80a119035a4a0de5.tar.gz
THRIFT-2850 CMake for Apache Thrift
add test/cpp and lib/py
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3fe0f92c1..f20d06990 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -61,6 +61,10 @@ find_package(Threads)
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 @@ endif()
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 @@ if(WITH_JAVA)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/lib/java)
endif()
+if(WITH_PYTHON)
+ add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/lib/py)
+endif()
+
PRINT_CONFIG_SUMMARY()