FindPython{Interp,Libs}: Add policy to remove these modules

The `FindPythonInterp` and `FindPythonLibs` modules have been deprecated
since CMake 3.12.  Add a policy to pretend they do not exist in order to
encourage projects to port to `FindPython` or `FindPython{2,3}`.
This commit is contained in:
Brad King
2023-03-30 10:13:07 -04:00
parent 4901fdb201
commit a4c5b91f80
38 changed files with 228 additions and 0 deletions
+2
View File
@@ -549,6 +549,8 @@ cmFindPackageCommand::cmFindPackageCommand(cmExecutionStatus& status)
this->DeprecatedFindModules["CUDA"] = cmPolicies::CMP0146;
this->DeprecatedFindModules["Dart"] = cmPolicies::CMP0145;
this->DeprecatedFindModules["PythonInterp"] = cmPolicies::CMP0148;
this->DeprecatedFindModules["PythonLibs"] = cmPolicies::CMP0148;
this->DeprecatedFindModules["Qt"] = cmPolicies::CMP0084;
}
+2
View File
@@ -24,6 +24,8 @@ bool cmIncludeCommand(std::vector<std::string> const& args,
DeprecatedModules["Documentation"] = cmPolicies::CMP0106;
DeprecatedModules["FindCUDA"] = cmPolicies::CMP0146;
DeprecatedModules["FindDart"] = cmPolicies::CMP0145;
DeprecatedModules["FindPythonInterp"] = cmPolicies::CMP0148;
DeprecatedModules["FindPythonLibs"] = cmPolicies::CMP0148;
DeprecatedModules["WriteCompilerDetectionHeader"] = cmPolicies::CMP0120;
}
+3
View File
@@ -444,6 +444,9 @@ class cmMakefile;
cmPolicies::WARN) \
SELECT(POLICY, CMP0147, \
"Visual Studio generators build custom commands in parallel.", 3, \
27, 0, cmPolicies::WARN) \
SELECT(POLICY, CMP0148, \
"The FindPythonInterp and FindPythonLibs modules are removed.", 3, \
27, 0, cmPolicies::WARN)
#define CM_SELECT_ID(F, A1, A2, A3, A4, A5, A6) F(A1)