]> git.pld-linux.org Git - packages/akonadi.git/blame - 0002-Do-not-enter-the-test-directories-if-AKONADI_BUILD_T.patch
boost rebuild
[packages/akonadi.git] / 0002-Do-not-enter-the-test-directories-if-AKONADI_BUILD_T.patch
CommitLineData
8a8f9fb3
AM
1From 2146519108ec66300328b7b3979477c7789795d3 Mon Sep 17 00:00:00 2001
2From: Raphael Kubo da Costa <rakuco@FreeBSD.org>
3Date: Wed, 13 Aug 2014 23:22:11 +0300
4Subject: [PATCH 02/30] Do not enter the test/ directories if
5 AKONADI_BUILD_TESTS is off.
6
7enable_testing() only determines whether a "test" target and the related
8CTest files will be created. And in Akonadi's case it is actually
9invoked regardless of the value of the AKONADI_BUILD_TESTS option
10because Akonadi includes the CTest module, which calls enable_testing()
11based on the value of another variable, BUILD_TESTING.
12
13In any case, whether the executables and libraries that compose
14Akonadi's unit tests will be built has nothing to do with
15enable_testing(). To make AKONADI_BUILD_TESTS really disable the build
16of the unit tests we now avoid entering the tests/ directories at all
17when it is off, so that neither tests nor targets they depend on get
18built.
19
20REVIEW: 119776
21---
22 CMakeLists.txt | 6 +-----
23 libs/CMakeLists.txt | 4 +++-
24 server/CMakeLists.txt | 5 ++++-
25 3 files changed, 8 insertions(+), 7 deletions(-)
26
27diff --git a/CMakeLists.txt b/CMakeLists.txt
28index 0c52009..e081d23 100644
29--- a/CMakeLists.txt
30+++ b/CMakeLists.txt
31@@ -14,7 +14,7 @@ include(FeatureSummary)
32
33 ############### Build Options ###############
34
35-include(CTest)
36+include(CTest) # Calls enable_testing().
37 include(CTestConfig.cmake)
38 option(AKONADI_BUILD_TESTS "Build the Akonadi unit tests." TRUE)
39 option(AKONADI_BUILD_QSQLITE "Build the Sqlite backend." TRUE)
40@@ -27,10 +27,6 @@ if(NOT DEFINED DATABASE_BACKEND)
41 set(DATABASE_BACKEND "MYSQL" CACHE STRING "The default database backend to use for Akonadi. Can be either MYSQL, POSTGRES or SQLITE")
42 endif()
43
44-if(AKONADI_BUILD_TESTS)
45- enable_testing()
46-endif()
47-
48 ############### CMake Macros ###############
49
50 include(InstallSettings)
51diff --git a/libs/CMakeLists.txt b/libs/CMakeLists.txt
52index de6ab0d..74de6b2 100644
53--- a/libs/CMakeLists.txt
54+++ b/libs/CMakeLists.txt
55@@ -36,5 +36,7 @@ install(FILES
56 DESTINATION ${INCLUDE_INSTALL_DIR}/akonadi/private
57 )
58
59-add_subdirectory(tests)
60+if(AKONADI_BUILD_TESTS)
61+ add_subdirectory(tests)
62+endif()
63
64diff --git a/server/CMakeLists.txt b/server/CMakeLists.txt
65index e4829f3..275938d 100644
66--- a/server/CMakeLists.txt
67+++ b/server/CMakeLists.txt
68@@ -64,7 +64,10 @@ endmacro()
69 add_subdirectory(akonadictl)
70 add_subdirectory(control)
71 add_subdirectory(src)
72-add_subdirectory(tests)
73+
74+if(AKONADI_BUILD_TESTS)
75+ add_subdirectory(tests)
76+endif()
77
78 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${_ENABLE_EXCEPTIONS}")
79 if(MYSQLD_EXECUTABLE)
80--
812.1.0
82
This page took 0.192403 seconds and 4 git commands to generate.