From 71bf96ec78afef09dc0b927f6dcebeb9b3208db1 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Tue, 12 Feb 2013 12:00:31 +0100 Subject: [PATCH] Revert "find_package: Reword _NO_INTERFACES documentation" This reverts commit 179f49560286e2e322b9b0cf5d0a277b7634540f. --- Source/cmFindPackageCommand.cxx | 35 +++++++++++++++++---------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index 6e78bd7e5..e9b6ab636 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -376,25 +376,26 @@ void cmFindPackageCommand::GenerateDocumentation() "The package configuration file may set _FOUND to false " "to tell find_package that component requirements are not satisfied." "\n" - "A package configuration file may include() a Targets.cmake " - "file, created by install(EXPORT) in the upstream source, to import " - "targets into the downstream consumer. " - "When a new version of the upstream adds INTERFACE properties not " - "present in a previous version it can change behavior for existing " - "downstreams. " - "In order to remain source compatible the upstream package configuration " - "file may set _NO_INTERFACES to disable INTERFACE properties. " - "For example, code of the form:\n" - " if(_FIND_VERSION VERSION_LESS \n" - " AND NOT _INTERFACES)\n" - " set(_NO_INTERFACES 1)\n" + "Targets exported by the install() command may have additional INTERFACE " + "properties set for include directories, compile definitions etc. As " + "these may create a backward compatibility concern for consumers of " + "existing projects, it is possible to set the _NO_INTERFACES " + "variable to disable populating those interfaces. It is possible to " + "emulate a version-based policy for whether the interfaces should be " + "enabled in the config file before including the imported targets file. " + "This allows consumers to decide when to enable the new interfaces when " + "upgrading. The upstream project is responsible for adding code similar " + "to this in the version which generates the INTERFACE content:\n" + " if(${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION VERSION_LESS 2.3\n" + " AND NOT ${CMAKE_FIND_PACKAGE_NAME}_INTERFACES)\n" + " set(${CMAKE_FIND_PACKAGE_NAME}_NO_INTERFACES 1)\n" " endif()\n" " include(\"${CMAKE_CURRENT_LIST_DIR}/Targets.cmake\")\n" - "tells Targets.cmake not to provide the INTERFACE properties " - "unless the downstream requests at least or sets " - "_INTERFACES to explicitly request them. " - "This allows consumers to decide when to enable the new interfaces when " - "upgrading." + "\n" + "Downstream users may then choose to use the new interfaces by finding " + "the newer version of upstream. They can also choose to not use the new " + "interfaces by setting _INTERFACES to false before finding the " + "package.\n" "\n" "See the cmake_policy() command documentation for discussion of the " "NO_POLICY_SCOPE option."