Revert "find_package: Reword <package>_NO_INTERFACES documentation"

This reverts commit 179f495602.
This commit is contained in:
Stephen Kelly 2013-02-12 12:00:31 +01:00
parent 3df36b5954
commit 71bf96ec78
1 changed files with 18 additions and 17 deletions

View File

@ -376,25 +376,26 @@ void cmFindPackageCommand::GenerateDocumentation()
"The package configuration file may set <package>_FOUND to false " "The package configuration file may set <package>_FOUND to false "
"to tell find_package that component requirements are not satisfied." "to tell find_package that component requirements are not satisfied."
"\n" "\n"
"A package configuration file may include() a <package>Targets.cmake " "Targets exported by the install() command may have additional INTERFACE "
"file, created by install(EXPORT) in the upstream source, to import " "properties set for include directories, compile definitions etc. As "
"targets into the downstream consumer. " "these may create a backward compatibility concern for consumers of "
"When a new version of the upstream adds INTERFACE properties not " "existing projects, it is possible to set the <package>_NO_INTERFACES "
"present in a previous version it can change behavior for existing " "variable to disable populating those interfaces. It is possible to "
"downstreams. " "emulate a version-based policy for whether the interfaces should be "
"In order to remain source compatible the upstream package configuration " "enabled in the config file before including the imported targets file. "
"file may set <package>_NO_INTERFACES to disable INTERFACE properties. " "This allows consumers to decide when to enable the new interfaces when "
"For example, code of the form:\n" "upgrading. The upstream project is responsible for adding code similar "
" if(<package>_FIND_VERSION VERSION_LESS <new-version>\n" "to this in the version which generates the INTERFACE content:\n"
" AND NOT <package>_INTERFACES)\n" " if(${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION VERSION_LESS 2.3\n"
" set(<package>_NO_INTERFACES 1)\n" " AND NOT ${CMAKE_FIND_PACKAGE_NAME}_INTERFACES)\n"
" set(${CMAKE_FIND_PACKAGE_NAME}_NO_INTERFACES 1)\n"
" endif()\n" " endif()\n"
" include(\"${CMAKE_CURRENT_LIST_DIR}/<package>Targets.cmake\")\n" " include(\"${CMAKE_CURRENT_LIST_DIR}/<package>Targets.cmake\")\n"
"tells <package>Targets.cmake not to provide the INTERFACE properties " "\n"
"unless the downstream requests at least <new-version> or sets " "Downstream users may then choose to use the new interfaces by finding "
"<package>_INTERFACES to explicitly request them. " "the newer version of upstream. They can also choose to not use the new "
"This allows consumers to decide when to enable the new interfaces when " "interfaces by setting <package>_INTERFACES to false before finding the "
"upgrading." "package.\n"
"\n" "\n"
"See the cmake_policy() command documentation for discussion of the " "See the cmake_policy() command documentation for discussion of the "
"NO_POLICY_SCOPE option." "NO_POLICY_SCOPE option."