xref: /OK3568_Linux_fs/buildroot/package/azmq/0001-Conditionally-disable-test-and-doc-builds.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1From d960f93fb52e373f76cfedbee5f4fb0c5276856a Mon Sep 17 00:00:00 2001
2From: RJ Ascani <rj.ascani@gmail.com>
3Date: Thu, 20 Jul 2017 15:53:40 -0700
4Subject: [PATCH] Conditionally disable test and doc builds
5
6Signed-off-by: RJ Ascani <rj.ascani@gmail.com>
7---
8 CMakeLists.txt | 12 +++++++++---
9 1 file changed, 9 insertions(+), 3 deletions(-)
10
11diff --git a/CMakeLists.txt b/CMakeLists.txt
12index 5b5b9cc..97006a4 100644
13--- a/CMakeLists.txt
14+++ b/CMakeLists.txt
15@@ -49,7 +49,9 @@ include_directories(${Boost_INCLUDE_DIRS}
16                     ${ZeroMQ_INCLUDE_DIRS}
17                     ${PROJECT_SOURCE_DIR})
18
19-enable_testing()
20+if (BUILD_TESTING)
21+    enable_testing()
22+endif()
23
24 macro(add_catch_test name)
25     if (TEST_REPORT_FORMAT)
26@@ -59,8 +61,12 @@ macro(add_catch_test name)
27     endif()
28 endmacro()
29
30-add_subdirectory(test)
31-add_subdirectory(doc)
32+if (BUILD_TESTING)
33+    add_subdirectory(test)
34+endif()
35+if (BUILD_DOC)
36+    add_subdirectory(doc)
37+endif()
38
39 install(DIRECTORY ${PROJECT_SOURCE_DIR}/azmq
40         DESTINATION include)
41--
422.13.3
43
44