aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlos Goncalves <mail@cgoncalves.info>2010-03-24 23:44:39 +0000
committerHugo Parente Lima <hugo.lima@openbossa.org>2010-04-22 18:38:37 -0300
commit068ac86d025006256aa1edfcccf4304bcd280779 (patch)
treefa88d1647bc3b064ac0309bbfb0f792ff2300ec2
parentb24af354ea6f05253150179467aa77e7c999611e (diff)
Do not build tests if explicitly wanted to. Default is to build.
The majority of users don't need tests built. This will reduce build time significantly, and packagers will be thanked for it. To not build tests append -DBUILD_TESTS=False to cmake parameters. Reviewer: Anderson Lizardo <anderson.lizardo@openbossa.org> Reviewer: Hugo Parente <hugo.lima@openbossa.org>
-rw-r--r--CMakeLists.txt10
1 files changed, 8 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 803bccc7f..fedc7858a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,6 +10,7 @@ find_package(GeneratorRunner REQUIRED)
add_definitions(${QT_DEFINITIONS})
option(AVOID_PROTECTED_HACK "Avoid protected hack on generated bindings." FALSE)
+option(BUILD_TESTS "Build tests." TRUE)
if (NOT CMAKE_BUILD_TYPE)
message("No build type provided. Setting to Debug by default")
@@ -71,10 +72,15 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake"
add_custom_target(uninstall "${CMAKE_COMMAND}"
-P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
-enable_testing()
+if (BUILD_TESTS)
+ enable_testing()
+endif()
add_subdirectory(libshiboken)
-add_subdirectory(tests)
+
+if (BUILD_TESTS)
+ add_subdirectory(tests)
+endif()
set(ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${shiboken_VERSION})
add_custom_target(dist