--- a/cmake/pcre.cmake
+++ b/cmake/pcre.cmake
@@ -8,11 +8,7 @@
     CHECK_LIBRARY_EXISTS(pcre pcre_stack_guard "" HAVE_PCRE_STACK_GUARD)
     IF(NOT CMAKE_CROSSCOMPILING)
       SET(CMAKE_REQUIRED_LIBRARIES "pcre")
-      CHECK_C_SOURCE_RUNS("
-        #include <pcre.h>
-        int main() {
-        return -pcre_exec(NULL, NULL, NULL, -999, -999, 0, NULL, 0) < 256;
-        }"  PCRE_STACK_SIZE_OK)
+      SET(PCRE_STACK_SIZE_OK TRUE)
       SET(CMAKE_REQUIRED_LIBRARIES)
     ENDIF()
   ENDIF()
