0001-Conditionally-disable-test-and-doc-builds.patch 1.0 KB

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