mirror of
https://github.com/json-c/json-c.git
synced 2026-03-13 18:19:06 +08:00
Problem: cmake 3.25.1 warns about CMP0042 not being set
Solution: set it explictly to OLD behavior
This commit is contained in:
@@ -19,10 +19,17 @@ endif()
|
|||||||
|
|
||||||
# If we've got 3.0 then it's good, let's provide support. Otherwise, leave it be.
|
# If we've got 3.0 then it's good, let's provide support. Otherwise, leave it be.
|
||||||
if(POLICY CMP0038)
|
if(POLICY CMP0038)
|
||||||
# Policy CMP0038 introduced was in CMake 3.0
|
# Policy CMP0038 was introduced in CMake 3.0
|
||||||
cmake_policy(SET CMP0038 NEW)
|
cmake_policy(SET CMP0038 NEW)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(POLICY CMP0042)
|
||||||
|
# Policy CMP0042 was introduced in CMake 3.0
|
||||||
|
# CMake version 3.25.1 warns when the policy is not set and uses OLD behavior
|
||||||
|
# We set it explicitly to avoid the warning
|
||||||
|
cmake_policy(SET CMP0042 OLD)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(POLICY CMP0054)
|
if(POLICY CMP0054)
|
||||||
cmake_policy(SET CMP0054 NEW)
|
cmake_policy(SET CMP0054 NEW)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
Reference in New Issue
Block a user