mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 16:32:14 -06:00
FindCABLE: Add policy to remove this module
CABLE has not been maintained in a long time.
This commit is contained in:
@@ -112,7 +112,6 @@ They are normally called through the :command:`find_package` command.
|
||||
/module/FindBLAS
|
||||
/module/FindBullet
|
||||
/module/FindBZip2
|
||||
/module/FindCABLE
|
||||
/module/FindCoin3D
|
||||
/module/FindCUDAToolkit
|
||||
/module/FindCups
|
||||
@@ -289,6 +288,7 @@ Deprecated Find Modules
|
||||
:maxdepth: 1
|
||||
|
||||
/module/FindBoost
|
||||
/module/FindCABLE
|
||||
/module/FindCUDA
|
||||
/module/FindDart
|
||||
/module/FindGCCXML
|
||||
|
||||
@@ -98,6 +98,7 @@ Policies Introduced by CMake 4.1
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
CMP0191: The FindCABLE module is removed. </policy/CMP0191>
|
||||
CMP0190: FindPython enforce consistency in cross-compiling mode. </policy/CMP0190>
|
||||
CMP0189: TARGET_PROPERTY evaluates LINK_LIBRARIES properties transitively. </policy/CMP0189>
|
||||
CMP0188: The FindGCCXML module is removed. </policy/CMP0188>
|
||||
|
||||
21
Help/policy/CMP0191.rst
Normal file
21
Help/policy/CMP0191.rst
Normal file
@@ -0,0 +1,21 @@
|
||||
CMP0191
|
||||
-------
|
||||
|
||||
.. versionadded:: 4.1
|
||||
|
||||
The :module:`FindCABLE` module is removed.
|
||||
|
||||
CMake 4.0 and below provide the :module:`FindCABLE` module, but the CABLE
|
||||
tool is no longer maintained. CMake 4.1 and above prefer to not provide
|
||||
the :module:`FindCABLE` module. This policy provides compatibility for
|
||||
projects that have not been ported away from it.
|
||||
|
||||
The ``OLD`` behavior of this policy is for ``find_package(CABLE)`` to load
|
||||
the deprecated module. The ``NEW`` behavior is for ``find_package(CABLE)``
|
||||
to fail as if the module does not exist.
|
||||
|
||||
.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 4.1
|
||||
.. |WARNS_OR_DOES_NOT_WARN| replace:: warns
|
||||
.. include:: STANDARD_ADVICE.txt
|
||||
|
||||
.. include:: DEPRECATED.txt
|
||||
5
Help/release/dev/remove-FindCABLE.rst
Normal file
5
Help/release/dev/remove-FindCABLE.rst
Normal file
@@ -0,0 +1,5 @@
|
||||
remove-FindCABLE
|
||||
-----------------
|
||||
|
||||
* The :module:`FindCABLE` module has been deprecated via policy
|
||||
:policy:`CMP0191`.
|
||||
@@ -5,6 +5,9 @@
|
||||
FindCABLE
|
||||
---------
|
||||
|
||||
.. versionchanged:: 4.1
|
||||
This module is available only if policy :policy:`CMP0191` is not set to ``NEW``.
|
||||
|
||||
Finds the CABLE installation and determines its include paths and libraries.
|
||||
|
||||
Package called CABLE (CABLE Automates Bindings for Language Extension) was
|
||||
@@ -44,6 +47,16 @@ directories:
|
||||
target_include_directories(tcl_wrapper_target PRIVATE ${CABLE_INCLUDE_DIR})
|
||||
#]=======================================================================]
|
||||
|
||||
cmake_policy(GET CMP0191 _FindCABLE_CMP0191)
|
||||
if(_FindCABLE_CMP0191 STREQUAL "NEW")
|
||||
message(FATAL_ERROR "The FindCABLE module has been removed by policy CMP0191.")
|
||||
endif()
|
||||
|
||||
if(_FindCABLE_testing)
|
||||
set(_FindCABLE_included TRUE)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(NOT CABLE)
|
||||
find_path(CABLE_BUILD_DIR cableVersion.h)
|
||||
endif()
|
||||
|
||||
@@ -530,6 +530,7 @@ cmFindPackageCommand::cmFindPackageCommand(cmExecutionStatus& status)
|
||||
this->AppendSearchPathGroups();
|
||||
|
||||
this->DeprecatedFindModules["Boost"] = cmPolicies::CMP0167;
|
||||
this->DeprecatedFindModules["CABLE"] = cmPolicies::CMP0191;
|
||||
this->DeprecatedFindModules["CUDA"] = cmPolicies::CMP0146;
|
||||
this->DeprecatedFindModules["Dart"] = cmPolicies::CMP0145;
|
||||
this->DeprecatedFindModules["GCCXML"] = cmPolicies::CMP0188;
|
||||
|
||||
@@ -23,6 +23,7 @@ bool cmIncludeCommand(std::vector<std::string> const& args,
|
||||
DeprecatedModules["Dart"] = cmPolicies::CMP0145;
|
||||
DeprecatedModules["Documentation"] = cmPolicies::CMP0106;
|
||||
DeprecatedModules["FindBoost"] = cmPolicies::CMP0167;
|
||||
DeprecatedModules["FindCABLE"] = cmPolicies::CMP0191;
|
||||
DeprecatedModules["FindCUDA"] = cmPolicies::CMP0146;
|
||||
DeprecatedModules["FindDart"] = cmPolicies::CMP0145;
|
||||
DeprecatedModules["FindGCCXML"] = cmPolicies::CMP0188;
|
||||
|
||||
@@ -569,7 +569,8 @@ class cmMakefile;
|
||||
4, 1, 0, WARN) \
|
||||
SELECT(POLICY, CMP0190, \
|
||||
"FindPython enforce consistency in cross-compiling mode.", 4, 1, 0, \
|
||||
WARN)
|
||||
WARN) \
|
||||
SELECT(POLICY, CMP0191, "The FindCABLE module is removed.", 4, 1, 0, WARN)
|
||||
|
||||
#define CM_SELECT_ID(F, A1, A2, A3, A4, A5, A6) F(A1)
|
||||
#define CM_FOR_EACH_POLICY_ID(POLICY) \
|
||||
|
||||
4
Tests/RunCMake/find_package/CMP0191-NEW-stderr.txt
Normal file
4
Tests/RunCMake/find_package/CMP0191-NEW-stderr.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
^CMake Warning at CMP0191-NEW\.cmake:[0-9]+ \(find_package\):
|
||||
No "FindCABLE\.cmake" found in CMAKE_MODULE_PATH\.
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists\.txt:[0-9]+ \(include\)
|
||||
7
Tests/RunCMake/find_package/CMP0191-NEW.cmake
Normal file
7
Tests/RunCMake/find_package/CMP0191-NEW.cmake
Normal file
@@ -0,0 +1,7 @@
|
||||
cmake_policy(SET CMP0191 NEW)
|
||||
set(_FindCABLE_testing TRUE)
|
||||
find_package(CABLE MODULE)
|
||||
|
||||
if(_FindCABLE_included)
|
||||
message(FATAL_ERROR "FindCABLE.cmake erroneously included")
|
||||
endif()
|
||||
7
Tests/RunCMake/find_package/CMP0191-OLD.cmake
Normal file
7
Tests/RunCMake/find_package/CMP0191-OLD.cmake
Normal file
@@ -0,0 +1,7 @@
|
||||
cmake_policy(SET CMP0191 OLD)
|
||||
set(_FindCABLE_testing TRUE)
|
||||
find_package(CABLE MODULE)
|
||||
|
||||
if(NOT _FindCABLE_included)
|
||||
message(FATAL_ERROR "FindCABLE.cmake not included")
|
||||
endif()
|
||||
8
Tests/RunCMake/find_package/CMP0191-WARN-stderr.txt
Normal file
8
Tests/RunCMake/find_package/CMP0191-WARN-stderr.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
CMake Warning \(dev\) at CMP0191-WARN\.cmake:[0-9]+ \(find_package\):
|
||||
Policy CMP0191 is not set: The FindCABLE module is removed\. Run "cmake
|
||||
--help-policy CMP0191" for policy details\. Use the cmake_policy command to
|
||||
set the policy and suppress this warning\.
|
||||
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists\.txt:[0-9]+ \(include\)
|
||||
This warning is for project developers\. Use -Wno-dev to suppress it\.$
|
||||
6
Tests/RunCMake/find_package/CMP0191-WARN.cmake
Normal file
6
Tests/RunCMake/find_package/CMP0191-WARN.cmake
Normal file
@@ -0,0 +1,6 @@
|
||||
set(_FindCABLE_testing TRUE)
|
||||
find_package(CABLE MODULE)
|
||||
|
||||
if(NOT _FindCABLE_included)
|
||||
message(FATAL_ERROR "FindCABLE.cmake not included")
|
||||
endif()
|
||||
@@ -64,6 +64,9 @@ run_cmake(CMP0167-NEW)
|
||||
run_cmake(CMP0188-OLD)
|
||||
run_cmake(CMP0188-WARN)
|
||||
run_cmake(CMP0188-NEW)
|
||||
run_cmake(CMP0191-OLD)
|
||||
run_cmake(CMP0191-WARN)
|
||||
run_cmake(CMP0191-NEW)
|
||||
run_cmake(WrongVersionRange)
|
||||
run_cmake(EmptyVersionRange)
|
||||
run_cmake(VersionRangeWithEXACT)
|
||||
|
||||
1
Tests/RunCMake/include/CMP0191-NEW-name-result.txt
Normal file
1
Tests/RunCMake/include/CMP0191-NEW-name-result.txt
Normal file
@@ -0,0 +1 @@
|
||||
1
|
||||
6
Tests/RunCMake/include/CMP0191-NEW-name-stderr.txt
Normal file
6
Tests/RunCMake/include/CMP0191-NEW-name-stderr.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
^CMake Error at CMP0191-NEW-name\.cmake:[0-9]+ \(include\):
|
||||
include could not find requested file:
|
||||
|
||||
FindCABLE
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists\.txt:[0-9]+ \(include\)$
|
||||
2
Tests/RunCMake/include/CMP0191-NEW-name.cmake
Normal file
2
Tests/RunCMake/include/CMP0191-NEW-name.cmake
Normal file
@@ -0,0 +1,2 @@
|
||||
cmake_policy(SET CMP0191 NEW)
|
||||
include(FindCABLE)
|
||||
1
Tests/RunCMake/include/CMP0191-NEW-path-result.txt
Normal file
1
Tests/RunCMake/include/CMP0191-NEW-path-result.txt
Normal file
@@ -0,0 +1 @@
|
||||
1
|
||||
6
Tests/RunCMake/include/CMP0191-NEW-path-stderr.txt
Normal file
6
Tests/RunCMake/include/CMP0191-NEW-path-stderr.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
^CMake Error at [^
|
||||
]*/Modules/FindCABLE.cmake:[0-9]+ \(message\):
|
||||
The FindCABLE module has been removed by policy CMP0191\.
|
||||
Call Stack \(most recent call first\):
|
||||
CMP0191-NEW-path\.cmake:[0-9]+ \(include\)
|
||||
CMakeLists\.txt:[0-9]+ \(include\)$
|
||||
2
Tests/RunCMake/include/CMP0191-NEW-path.cmake
Normal file
2
Tests/RunCMake/include/CMP0191-NEW-path.cmake
Normal file
@@ -0,0 +1,2 @@
|
||||
cmake_policy(SET CMP0191 NEW)
|
||||
include(${CMAKE_ROOT}/Modules/FindCABLE.cmake)
|
||||
7
Tests/RunCMake/include/CMP0191-OLD.cmake
Normal file
7
Tests/RunCMake/include/CMP0191-OLD.cmake
Normal file
@@ -0,0 +1,7 @@
|
||||
cmake_policy(SET CMP0191 OLD)
|
||||
set(_FindCABLE_testing 1)
|
||||
include(FindCABLE)
|
||||
|
||||
if(NOT _FindCABLE_included)
|
||||
message(FATAL_ERROR "FindCABLE.cmake not included")
|
||||
endif()
|
||||
8
Tests/RunCMake/include/CMP0191-WARN-stderr.txt
Normal file
8
Tests/RunCMake/include/CMP0191-WARN-stderr.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
^CMake Warning \(dev\) at CMP0191-WARN\.cmake:[0-9]+ \(include\):
|
||||
Policy CMP0191 is not set: The FindCABLE module is removed\. Run "cmake
|
||||
--help-policy CMP0191" for policy details\. Use the cmake_policy command to
|
||||
set the policy and suppress this warning\.
|
||||
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists\.txt:[0-9]+ \(include\)
|
||||
This warning is for project developers\. Use -Wno-dev to suppress it\.$
|
||||
7
Tests/RunCMake/include/CMP0191-WARN.cmake
Normal file
7
Tests/RunCMake/include/CMP0191-WARN.cmake
Normal file
@@ -0,0 +1,7 @@
|
||||
# Do not set CMP0191.
|
||||
set(_FindCABLE_testing 1)
|
||||
include(FindCABLE)
|
||||
|
||||
if(NOT _FindCABLE_included)
|
||||
message(FATAL_ERROR "FindCABLE.cmake not included")
|
||||
endif()
|
||||
@@ -30,3 +30,8 @@ run_cmake(CMP0188-OLD)
|
||||
run_cmake(CMP0188-WARN)
|
||||
run_cmake(CMP0188-NEW-name)
|
||||
run_cmake(CMP0188-NEW-path)
|
||||
|
||||
run_cmake(CMP0191-OLD)
|
||||
run_cmake(CMP0191-WARN)
|
||||
run_cmake(CMP0191-NEW-name)
|
||||
run_cmake(CMP0191-NEW-path)
|
||||
|
||||
Reference in New Issue
Block a user