[cmake] enable jit for libpcre

pull/672/head
Timothy Stack 5 years ago
parent 76ea0abcd9
commit 91dd8a84ec

@ -3,8 +3,9 @@ cmake_minimum_required(VERSION 3.2)
include("cmake/HunterGate.cmake")
HunterGate(
URL "https://github.com/ruslo/hunter/archive/v0.23.202.tar.gz"
SHA1 "931b1cb6b36a7a96948d2cfc8ec5e553bf3160f3"
URL "https://github.com/ruslo/hunter/archive/v0.23.204.tar.gz"
SHA1 "32cfed254da901f6f184027d530d8da47e035b85"
LOCAL
)
set(CMAKE_CXX_STANDARD 14)
@ -39,8 +40,8 @@ set(lnav_LIBS
ZLIB::zlib
BZip2::bz2
sqlite3::sqlite3
PkgConfig::libpcre
PkgConfig::libpcrecpp
PkgConfig::libpcre
CURL::libcurl
readline::readline
readline::history

@ -0,0 +1,7 @@
hunter_config(
libpcre
VERSION 8.41
CMAKE_ARGS
EXTRA_FLAGS=--enable-unicode-properties --enable-jit --enable-utf
)

@ -57,6 +57,14 @@
#include <thread>
#ifdef HAVE_PCRE_H
#include <pcre.h>
#elif HAVE_PCRE_PCRE_H
#include <pcre/pcre.h>
#else
#error "pcre.h not found?"
#endif
#if defined HAVE_NCURSESW_CURSES_H
# include <ncursesw/termcap.h>
# include <ncursesw/curses.h>
@ -167,16 +175,24 @@ void log_argv(int argc, char *argv[])
void log_host_info()
{
char cwd[MAXPATHLEN];
const char *jittarget;
struct utsname un;
struct rusage ru;
int pcre_jit;
uname(&un);
pcre_config(PCRE_CONFIG_JIT, &pcre_jit);
pcre_config(PCRE_CONFIG_JITTARGET, &jittarget);
log_info("uname:");
log_info(" sysname=%s", un.sysname);
log_info(" nodename=%s", un.nodename);
log_info(" machine=%s", un.machine);
log_info(" release=%s", un.release);
log_info(" version=%s", un.version);
log_info("PCRE:");
log_info(" jit=%d", pcre_jit);
log_info(" jittarget=%s", jittarget);
log_info("Environment:");
log_info(" HOME=%s", getenv("HOME"));
log_info(" LANG=%s", getenv("LANG"));

Loading…
Cancel
Save