Skip to content
This repository has been archived by the owner on Sep 27, 2019. It is now read-only.

Commit

Permalink
Add support for turning on Unicode properties
Browse files Browse the repository at this point in the history
  • Loading branch information
datalogics-kam committed Mar 5, 2019
1 parent 1045fbb commit 78edb80
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ class PCREConan(ConanFile):
"with_jit": [True, False],
"build_pcrecpp": [True, False],
"build_pcregrep": [True, False],
"with_utf": [True, False]
"with_utf": [True, False],
"with_unicode_properties": [True, False]
}
default_options = ("shared=False", "fPIC=True", "with_bzip2=True",
"with_zlib=True", "with_jit=False", "build_pcrecpp=False",
"build_pcregrep=False", "with_utf=False")
"build_pcregrep=False", "with_utf=False",
"with_unicode_properties=False")
source_subfolder = "source_subfolder"
build_subfolder = "build_subfolder"

Expand All @@ -41,6 +43,8 @@ def config_options(self):
def configure(self):
if not self.options.build_pcrecpp:
del self.settings.compiler.libcxx
if self.options.with_unicode_properties:
self.options.with_utf = True

def patch_cmake(self):
"""Patch CMake file to avoid man and share during install stage
Expand Down Expand Up @@ -72,6 +76,7 @@ def configure_cmake(self):
cmake.definitions["PCRE_SUPPORT_LIBBZ2"] = self.options.with_bzip2
cmake.definitions["PCRE_SUPPORT_JIT"] = self.options.with_jit
cmake.definitions["PCRE_SUPPORT_UTF"] = self.options.with_utf
cmake.definitions["PCRE_SUPPORT_UNICODE_PROPERTIES"] = self.options.with_unicode_properties
cmake.definitions["PCRE_SUPPORT_LIBREADLINE"] = False
cmake.definitions["PCRE_SUPPORT_LIBEDIT"] = False
if self.settings.os == "Windows" and self.settings.compiler == "Visual Studio":
Expand Down

0 comments on commit 78edb80

Please sign in to comment.