Support compiling without PCRE (#12)

This commit is contained in:
Zed 2020-08-22 04:44:10 +02:00 committed by GitHub
parent 384264142c
commit abf45cfa27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 3 deletions

View File

@ -124,6 +124,12 @@ it comes to support.
`make USE_SYSTEM_NIM=1 test`
### LINK_PCRE
Link PCRE, defaults to 1.
`make LINK_PCRE=0`
## Make targets
### build

View File

@ -32,10 +32,13 @@ ifdef LOG_LEVEL
endif
# avoid a "libpcre.so.3: cannot open shared object file: No such file or directory" message, where possible
ifneq ($(OS), Windows_NT)
LINK_PCRE := 1
ifeq ($(LINK_PCRE), 1)
ifneq ($(OS), Windows_NT)
ifneq ($(strip $(shell uname)), Darwin)
NIM_PARAMS := $(NIM_PARAMS) -d:usePcreHeader --passL:\"-lpcre\"
endif
endif
endif
# guess who does parsing before variable expansion