Skip to content

Commit

Permalink
Merge pull request json-c#804 from yrashk/cmp-0042
Browse files Browse the repository at this point in the history
Problem: cmake 3.25.1 warns about CMP0042 not being set
  • Loading branch information
hawicz authored Dec 27, 2022
2 parents 6ec5e58 + 3cc0c47 commit 343f24f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,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()
Expand Down

0 comments on commit 343f24f

Please sign in to comment.