-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
CMake ≥ 3.13 - Policy CMP0077 (option() behavior) #817
Comments
TheRaf974
added a commit
to TheRaf974/cJSON
that referenced
this issue
Dec 31, 2023
Fix for [Issue 817](DaveGamble#817)
TheRaf974
added a commit
to TheRaf974/cJSON
that referenced
this issue
Dec 31, 2023
Fix for [Issue 817](DaveGamble#817)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I'm adding cJSON to a project using CMake version 3.25.2
My project is on a Raspberry Pico microcontroller and I need a static library. In my original CMakeLists.txt, I added
set(BUILD_SHARED_LIBS OFF)
thenadd_subdirectory(cJSON)
.At building, cmake awared me of an old behavior of
option
which clearedBUILD_SHARED_LIBS
. (cf. CMake CMP0077)I fixed this issue by adding
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
to my parent CMakeLists.txt. However, there is a fix possible directly in cJSON's CMakeLists.txt withcmake_policy(SET CMP0077 NEW)
.I'll make a PR, you'll see if it is relevant or not
The text was updated successfully, but these errors were encountered: