diff --git a/CHANGES.current b/CHANGES.current index a118132f8..3492e6df6 100644 --- a/CHANGES.current +++ b/CHANGES.current @@ -7,6 +7,9 @@ the issue number to the end of the URL: https://github.com/swig/swig/issues/ Version 4.1.0 (in progress) =========================== +2021-10-03: jschueller + [CMake] #2065: Add option to enable or disable PCRE support. + 2021-09-16: ianlancetaylor [Go] Improved _cgo_panic implementation. diff --git a/CMakeLists.txt b/CMakeLists.txt index 0b6743471..8a195de54 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -73,9 +73,9 @@ if (MSVC) set (CMAKE_CXX_FLAGS "/EHsc ${CMAKE_CXX_FLAGS}") endif () -set (PCRE_REQUIRED_ARG "REQUIRED" CACHE STRING "required arg") -find_package (PCRE ${PCRE_REQUIRED_ARG}) -if (PCRE_FOUND) +option (WITH_PCRE "Enable pcre" ON) +if (WITH_PCRE) + find_package (PCRE REQUIRED) set (HAVE_PCRE 1) include_directories (${PCRE_INCLUDE_DIRS}) endif() diff --git a/Doc/Manual/Windows.html b/Doc/Manual/Windows.html index 9365070e9..eae9ffb84 100644 --- a/Doc/Manual/Windows.html +++ b/Doc/Manual/Windows.html @@ -251,7 +251,8 @@ For fully working build steps always check the Continuous Integration setups cur and save to a folder e.g. C:\Tools\Bison
C:\Tools\nuget install pcre -Version 8.33.0.1 -OutputDirectory C:\Tools\pcre+ Install PCRE using Nuget using the following command:
C:\Tools\nuget install pcre -Version 8.33.0.1 -OutputDirectory C:\Tools\pcre. + Alternatively, use WITH_PCRE option to disable PCRE support if you are sure not to need it.