You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.2 KiB

  1. From: =?utf-8?q?Ond=C5=99ej_Sur=C3=BD?= <ondrej@debian.org>
  2. Date: Wed, 22 Nov 2017 06:05:45 +0000
  3. Subject: Revert to using system pcre library
  4. ---
  5. cmake/pcre.cmake | 16 ++--------------
  6. 1 file changed, 2 insertions(+), 14 deletions(-)
  7. --- a/cmake/pcre.cmake
  8. +++ b/cmake/pcre.cmake
  9. @@ -1,23 +1,11 @@
  10. -INCLUDE (CheckCSourceRuns)
  11. -
  12. SET(WITH_PCRE "auto" CACHE STRING
  13. "Which pcre to use (possible values are 'bundled', 'system', or 'auto')")
  14. MACRO (CHECK_PCRE)
  15. IF(WITH_PCRE STREQUAL "system" OR WITH_PCRE STREQUAL "auto")
  16. - CHECK_LIBRARY_EXISTS(pcre pcre_stack_guard "" HAVE_PCRE_STACK_GUARD)
  17. - IF(NOT CMAKE_CROSSCOMPILING)
  18. - SET(CMAKE_REQUIRED_LIBRARIES "pcre")
  19. - CHECK_C_SOURCE_RUNS("
  20. - #include <pcre.h>
  21. - int main() {
  22. - return -pcre_exec(NULL, NULL, NULL, -999, -999, 0, NULL, 0) < 256;
  23. - }" PCRE_STACK_SIZE_OK)
  24. - SET(CMAKE_REQUIRED_LIBRARIES)
  25. - ENDIF()
  26. + CHECK_LIBRARY_EXISTS(pcre pcre_stack_guard "" HAVE_PCRE)
  27. ENDIF()
  28. - IF(NOT HAVE_PCRE_STACK_GUARD OR NOT PCRE_STACK_SIZE_OK OR
  29. - WITH_PCRE STREQUAL "bundled")
  30. + IF(NOT HAVE_PCRE OR WITH_PCRE STREQUAL "bundled")
  31. IF (WITH_PCRE STREQUAL "system")
  32. MESSAGE(FATAL_ERROR "system pcre is not found or unusable")
  33. ENDIF()