diff --git a/CMakeLists.txt b/CMakeLists.txt index 3c35a225a..83d760c66 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,8 +40,9 @@ include(CheckCXXCompilerFlag) include(CheckLinkerFlag) include(CheckLibraryExists) include(CheckFunctionExists) - -cmake_policy(SET CMP0148 OLD) +if (POLICY CMP0148) + cmake_policy(SET CMP0148 OLD) # https://cmake.org/cmake/help/latest/policy/CMP0148.html +endif() include(FindPythonInterp) if (IOS)