diff options
author | Carlos Goncalves <mail@cgoncalves.info> | 2010-03-24 23:28:38 +0000 |
---|---|---|
committer | Hugo Parente Lima <hugo.lima@openbossa.org> | 2010-04-22 17:43:52 -0300 |
commit | f149e00720e33fa625466133ad415671d09c6202 (patch) | |
tree | 87e09f7ccbb6c09238f05ef2c585e1867dcb2463 /CMakeLists.txt | |
parent | 81c7eb43c6d6990768348de63dbc9a6da5dbd976 (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>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 969b6459f..e96dd2d45 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,6 +5,8 @@ cmake_minimum_required(VERSION 2.6) find_package(Qt4 4.5.0 REQUIRED) find_package(ApiExtractor REQUIRED) +option(BUILD_TESTS "Build tests." TRUE) + if (MSVC) set(CMAKE_CXX_FLAGS "/DWIN32 /D_WINDOWS /w /EHsc- /GS- /GR- /DGENRUNNER_BUILD -D_SCL_SECURE_NO_WARNINGS") else (MSVC) @@ -89,8 +91,13 @@ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/GeneratorRunnerVersion.cmake" file(GLOB manpages "${CMAKE_CURRENT_SOURCE_DIR}/*.1") install(FILES ${manpages} DESTINATION share/man/man1) -enable_testing() +if (BUILD_TESTS) + enable_testing() +endif() add_subdirectory(generators) -add_subdirectory(tests) + +if (BUILD_TESTS) + add_subdirectory(tests) +endif() |