summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYurii Rashkovskii <yrashk@gmail.com>2022-12-23 14:59:59 -0800
committerYurii Rashkovskii <yrashk@gmail.com>2022-12-23 15:05:46 -0800
commit3cc0c47221c71c31b31d056fd226e67ab79c1234 (patch)
treed3e8118bb4fd7f69ef7efb4b10e029de82115af6
parent79c147203e2f90806fba0487fc26ab5e649c8755 (diff)
downloadjson-c-3cc0c47221c71c31b31d056fd226e67ab79c1234.tar.gz
Problem: cmake 3.25.1 warns about CMP0042 not being set
Solution: set it explictly to OLD behavior
-rw-r--r--CMakeLists.txt9
1 files changed, 8 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2be027d..f8000a6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,10 +19,17 @@ endif()
# If we've got 3.0 then it's good, let's provide support. Otherwise, leave it be.
if(POLICY CMP0038)
- # Policy CMP0038 introduced was in CMake 3.0
+ # Policy CMP0038 was introduced in CMake 3.0
cmake_policy(SET CMP0038 NEW)
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)
cmake_policy(SET CMP0054 NEW)
endif()