mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-23 22:58:37 -05:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user