]> git.pld-linux.org Git - packages/akonadi.git/blob - 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
1 From 2146519108ec66300328b7b3979477c7789795d3 Mon Sep 17 00:00:00 2001
2 From: Raphael Kubo da Costa <rakuco@FreeBSD.org>
3 Date: Wed, 13 Aug 2014 23:22:11 +0300
4 Subject: [PATCH 02/30] Do not enter the test/ directories if
5  AKONADI_BUILD_TESTS is off.
6
7 enable_testing() only determines whether a "test" target and the related
8 CTest files will be created. And in Akonadi's case it is actually
9 invoked regardless of the value of the AKONADI_BUILD_TESTS option
10 because Akonadi includes the CTest module, which calls enable_testing()
11 based on the value of another variable, BUILD_TESTING.
12
13 In any case, whether the executables and libraries that compose
14 Akonadi's unit tests will be built has nothing to do with
15 enable_testing(). To make AKONADI_BUILD_TESTS really disable the build
16 of the unit tests we now avoid entering the tests/ directories at all
17 when it is off, so that neither tests nor targets they depend on get
18 built.
19
20 REVIEW: 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
27 diff --git a/CMakeLists.txt b/CMakeLists.txt
28 index 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)
51 diff --git a/libs/CMakeLists.txt b/libs/CMakeLists.txt
52 index 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  
64 diff --git a/server/CMakeLists.txt b/server/CMakeLists.txt
65 index 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 -- 
81 2.1.0
82
This page took 0.165231 seconds and 3 git commands to generate.