-
Notifications
You must be signed in to change notification settings - Fork 210
Can't set PCRE2_BUILD_TESTS and PCRE2_BUILD_PCRE2GREP in CMake when added as dependency #267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I've even tried disabling install using macro(install)
_install(${ARGN})
endmacro() Still the same thing. |
Looks like #266 is trying to address this problem. Any luck on getting this merged?? |
For others that may end up here in the future, adding set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(PCRE2_USE_STATIC_LIBS ON)
set(PCRE2_BUILD_TESTS OFF)
set(PCRE2_BUILD_PCRE2GREP OFF)
include(FetchContent)
FetchContent_Declare(pcre2
URL https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.42/pcre2-10.42.tar.gz
URL_HASH SHA256=c33b418e3b936ee3153de2c61cc638e7e4fe3156022a5c77d0711bcbb9d64f1f
)
FetchContent_MakeAvailable(pcre2)
if(NOT pcre2_POPULATED)
FetchContent_Populate(pcre2)
add_subdirectory(${pcre2_SOURCE_DIR} ${pcre2_BUILD_DIR})
endif() I'll be closing for now since there is a solution. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm using the following CMake section to build pcre2 as a project dependency on Ubuntu 20.04 and MacoOS monterey.
However,
PCRE2_BUILD_TESTS
andPCRE2_BUILD_PCRE2GREP
are still showing and behaving asON
in cmake configuration and buildI've also tried with
ubuntu-latest
andmacos-latest
on Github and I'm still getting the following errors onctest
.Same error locally. What could I be doing wrong??
The text was updated successfully, but these errors were encountered: