Skip to content

Commit 5e4add3

Browse files
CMake: Set policy CMP0102 to NEW
Fixes warning: CMake Warning (dev) at /usr/share/cmake-3.22/Modules/FindJPEG.cmake:142 (mark_as_advanced): Policy CMP0102 is not set: The variable named "JPEG_LIBRARY" is not in the cache. This results in an empty cache entry which is no longer created when policy CMP0102 is set to NEW. Run "cmake --help-policy CMP0102" for policy details. Use the cmake_policy command to set the policy and suppress this warning.
1 parent 7e7533b commit 5e4add3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ message("##################################################################")
2323

2424
if(CMAKE_VERSION VERSION_GREATER 3.12 OR CMAKE_VERSION VERSION_EQUAL 3.12)
2525
cmake_policy(SET CMP0075 NEW)
26+
27+
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.17)
28+
cmake_policy(SET CMP0102 NEW)
29+
endif()
2630
endif()
2731

2832
# Fortran is optional, so don't include it in LANGUAGES here

0 commit comments

Comments
 (0)