summaryrefslogtreecommitdiffstats
path: root/Source/cmFindPackageCommand.cxx
Commit message (Collapse)AuthorAgeFilesLines
* find_package: Drop search in recent cmake-gui locationsBrad King2015-05-081-29/+1
| | | | | | | | | | | | | | | | | | | | | | The find_package command, on Windows, has always searched build trees recently visited by cmake-gui (or CMakeSetup at one time). This was done when the command was created with the intention of simplifying workflows involving building multiple dependent projects. However, this behavior depends on recent developer interaction and therefore can create different find results based on transient system states. It can lead to surprising results and user confusion. Since this behavior was first added CMake has gained many more search options, better error messages when a package is not found, and a package registry. The latter in particular allows projects to make their build trees available for dependent projects to find without user intervention. Therefore the originally intended workflow can be achieved in other, more stable ways. After the above evoluion of find_package we have now decided that the magic search-where-cmake-gui-was behavior does more harm than good. Drop it. We do not need a policy for this behavior change because it only affects interactive use.
* cmMakefile: Rename GetCurrent{,Source}Directory.Stephen Kelly2015-04-201-1/+1
| | | | Match the names used in cmake code.
* cmMakefile: Add wrapper for reading listfiles which have an origin.Stephen Kelly2015-04-181-2/+2
| | | | | | Such files are delegates from other files, and so they set the CMAKE_PARENT_LIST_FILE to the originator. They also may set a policy scope.
* cmMakefile: Remove fullPath parameter from ReadListFile.Stephen Kelly2015-04-181-1/+1
| | | | | | There is no reason for this to be a responsibility of ReadListFile. Additionally, the only user of it already computes it itself.
* Port Global property interaction to cmState.Stephen Kelly2015-04-151-17/+18
|
* cmState: Move CacheEntryType enum from cmCacheManager.Stephen Kelly2015-04-131-1/+1
|
* Fix warnings from clang scanbuild.Bill Hoffman2015-03-251-2/+0
|
* Include cmAlgorithms where it is used.Stephen Kelly2015-03-101-0/+1
|
* Convert some raw loops to cmWrap.Stephen Kelly2015-02-201-11/+3
|
* Replace common loop pattern with cmJoinStephen Kelly2015-02-111-17/+2
|
* Replace foo.size() pattern with !foo.empty().Stephen Kelly2015-01-181-1/+1
|
* Replace 'foo.size() > 0' pattern with !foo.empty().Stephen Kelly2015-01-181-1/+1
|
* Merge topic 'drop-ancient-workarounds'Brad King2015-01-121-9/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0f7bdd61 Remove VS 6 special case. 5e92c826 Remove some obsolete stuff. 15e42bb2 cmStandardIncludes: Remove obsolete cmOStringStream. 931e055d Port all cmOStringStream to std::ostringstream. f194a009 Remove unused cmIStringStream class. 3ec1bb15 cmStandardIncludes: Remove std namespace hack. bb3bce70 cmStandardIncludes: Remove ANSI_FOR_SCOPE hack. 28fa4923 cmStandardIncludes: Remove iostreams workaround for obsolete Compaq compiler. 837a8a63 cmStandardIncludes: Drop Comeau-related workaround. 4030ddfd Remove Borland-related undef. 17d6a6fd cmStandardIncludes: Remove comment about Borland. 26fb5011 Drop SGI as a CMake host compiler.
| * Port all cmOStringStream to std::ostringstream.Stephen Kelly2015-01-111-9/+9
| | | | | | | | All compilers hosting CMake support the std class.
* | Revert "Misc. fixes for the Oracle / Sun compiler."Stephen Kelly2015-01-111-9/+6
|/ | | | This reverts commit 97b65f8156734db2adc367b27c822a5fe332d740.
* Misc. fixes for the Oracle / Sun compiler.Chuck Atkins2014-12-121-6/+9
| | | | | | A few pieces of code have some ambiguous type deduction that seems to resolve correctly for most compilers but not for the Oracle compiler. This makes those few instances more explicit.
* Remove some unneeded c_str calls.Stephen Kelly2014-11-231-1/+1
|
* Use containers of labeled search paths instead of individual membersChuck Atkins2014-11-121-27/+76
| | | | | | | Manage classes of search paths in labeled containers. This removes the need to have a seperate member variable for each type of search path, but also allows path types to be grouped togethor in various different ways and manipulated as subsets of the full set of search paths.
* Encapsulate search path manipulation functions into a seperate class.Chuck Atkins2014-11-111-40/+32
| | | | | | The functions for adding the various different types of paths have been factored out into a new class, cmSearchPath. It is to be used as a helper container class for the various find_* commands.
* Refactor and seperate search path construction for find commandsChuck Atkins2014-11-111-111/+134
| | | | | | | Prior to this commit, the set of search paths to traverse for find commands was incrementally constructed. This change allows each group of paths, i.e. CMakeVariablePaths, UserHintsPaths, SystemEnvironmentPaths, etc. to be constructed and manipulated independently, and then all combined togethor.
* strings: Remove redundant calls to std::string::c_str()Nils Gladitz2014-10-151-9/+9
| | | | | Replacements were detected and performed by the clang tool remove-cstr-calls on a linux build.
* Allow the Package Registry to be disabled (#14849)Daniele E. Domenichelli2014-05-121-0/+12
| | | | | | | | | | | | | | | | When a project is packaged for redistribution the local package registries should not be updated or consulted. They are for developers. Add variables to disable use of package registries globally: * CMAKE_EXPORT_NO_PACKAGE_REGISTRY that disables the export(PACKAGE) command * CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY that disables the User Package Registry in all the find_package calls. * CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY that disables the System Package Registry in all the find_package calls. Update documentation and unit tests.
* Remove c_str calls when using stream APIs.Stephen Kelly2014-03-111-1/+1
| | | | | Use an ad-hoc clang tool for matching the calls which should be ported.
* Remove some c_str() calls.Stephen Kelly2014-03-111-55/+55
| | | | | | Use the clang RemoveCStrCalls tool to automatically migrate the code. This was only run on linux, so does not have any positive or negative effect on other platforms.
* strings: Remove cmStdString referencesBen Boeckel2014-03-081-1/+1
| | | | | | | | | | | Casts from std::string -> cmStdString were high on the list of things taking up time. Avoid such implicit casts across function calls by just using std::string everywhere. The comment that the symbol name is too long is no longer relevant since modern debuggers alias the templates anyways and the size is a non-issue since the underlying methods are generated since it's inherited.
* stringapi: Use strings for variable namesBen Boeckel2014-03-081-1/+2
| | | | Variable names are always generated by CMake and should never be NULL.
* FeatureSummary: Don't list transitive package dependenciesStephen Kelly2014-02-031-0/+6
| | | | | | | | | | | | | | Set a global property in the find_package implementation. Track and reset that property in the find_dependency macro. Read the property in FeatureSummary when determining whether to print output. This means that packages which are found only as dependencies are not listed by FeatureSummary, but if a project uses find_package elsewhere directly, then it will be listed by FeatureSummary. Suggested-by: Alex Merry http://thread.gmane.org/gmane.comp.kde.devel.frameworks/10640
* Merge topic 'minor-cleanups'Brad King2014-01-071-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3917d86 Genex: Add a nullary form for CONFIG 5169130 Help: Document the target properties exported to IMPORTED targets. ee21f1c CompatibleInterface: Test debugging of not-set property. 80e9fe9 Help: Note that language-specific 'built-ins' are set by the project command. 0b5bf8a Help: Mention CMAKE_DISABLE_FIND_PACKAGE_<PackageName> in package docs. 28c865b Tests: simplify Qt4 target usage 6cfe6b8 Help: Fix typo: 'target' -> 'target property' b7deca4 Test: Remove obsolete commented code. 9c9f69f Genex: Make EQUAL support upper case binary literals 6eb3218 Genex: Fix case of methods in the dag checker. 646c6ec Genex: Use a preprocessor loop to implement transitive DAG check. 711fb38 Genex: List transitive properties and methods as a table, not two lists. 802a28f Add cmHasLiteralSuffix API.
| * Add cmHasLiteralSuffix API.Stephen Kelly2014-01-061-2/+2
| |
* | Use cmsys::[io]fstream instead of cmsys_ios::[io]fstream.Clinton Stimpson2014-01-071-1/+1
|/ | | | | Also use SystemTools::Fopen() instead of fopen(). This is to eventually support utf-8 filenames.
* Windows: Use wide-character system APIsClinton Stimpson2013-12-091-14/+15
| | | | | Make CMake compile with -DUNICODE. Make it possible for the 8 bit encoding to eventually be UTF-8 instead ANSI.
* Drop compatibility with CMake < 2.4Brad King2013-10-231-96/+0
| | | | | | | | | | | | Drop all behavior activated by setting CMAKE_BACKWARDS_COMPATIBILITY to a value lower than 2.4, and generate an error when projects or the user attempt to do so. In the error suggest using a CMake 2.8.x release. Teach cmake_minimum_required to warn about projects that do not require at least CMake 2.4. They are not supported by CMake >= 3.0. Replace the documentation of CMAKE_BACKWARDS_COMPATIBILITY with a reference to policy CMP0001.
* Drop builtin command documentationBrad King2013-10-161-316/+0
| | | | | Drop all GetTerseDocumentation and GetFullDocumentation methods from commands. The command documentation is now in Help/command/*.rst files.
* Haiku: Remove use of B_COMMON_DIRECTORYAdrien Destugues2013-10-081-7/+11
| | | | | | | The common directory was removed in Haiku. Applications are now installed in the system directory. Applied-by: Rolf Eike Beer <eike@sf-mail.de>
* Mention that IMPORTED targets may be created by a find_package call.Stephen Kelly2013-03-061-1/+2
|
* Revert "Add a way to exclude INTERFACE properties from exported targets."Stephen Kelly2013-02-131-21/+0
| | | | | | | | This reverts commit 2c3654c3de718fe822f8960063373774fc019494. The removal of some tests added in commit 77cecb77 (Add includes and compile definitions with target_link_libraries., 2012-11-05) are also squashed into this commit.
* Revert "find_package: Reword <package>_NO_INTERFACES documentation"Stephen Kelly2013-02-131-17/+18
| | | | This reverts commit 179f49560286e2e322b9b0cf5d0a277b7634540f.
* find_package: Reword <package>_NO_INTERFACES documentationBrad King2013-02-011-18/+17
|
* Add a way to exclude INTERFACE properties from exported targets.Stephen Kelly2013-01-311-0/+21
| | | | | | | | | | | | Projects set interface requirements upstream, and existing downstreams use of target_link_libraries will consume those interfaces. This can create a backward compatibility concern as the result may be changing the order of include directories of downstreams, or another side-effect of using the INTERFACE properties. Provide a way for them to emulate the behavior of a version-based policy in the config file.
* exports: define a CMAKE_FIND_PACKAGE_NAME var set by find_package()Alex Neundorf2012-09-301-0/+2
| | | | | | | | | This way the name of the searched package can be accessed in find-modules, config-files and more importantly in generated target export files. This is now used when a target export file detects that a required target does not exist. Alex
* find_package: add support for a <package>_NOT_FOUND_MESSAGE variableAlex Neundorf2012-09-281-0/+10
| | | | | | | | If a config-file sets <package>_FOUND to FALSE, it can now give a reason using the variable <package>_NOT_FOUND_MESSAGE, which is used by cmFindPackage and FPHSA. Alex
* fix #13195: avoid multiple mentions of found packagesAlex Neundorf2012-05-061-32/+60
| | | | | | | Now before adding a package to the list of found or not-found packages, the package is remvoed from both lists before. Alex
* find_package: Fix components signature documentation (#13142)Brad King2012-04-191-3/+3
| | | | | Update the signature notation to show that "REQUIRED COMPONENTS ..." is allowed and that REQUIRED is an option on its own.
* find_package: Document <package>_FIND_* variables (#13142)Brad King2012-04-181-0/+23
| | | | | | | | When loading a find module or package config file the find_package command defines several variables to provide information about the caller's request. Previously this was documented only in the Modules/readme.txt file which is not distributed. Document the behavior explicitly in the main find_package documentation.
* find_package: add documentation for OPTIONAL_COMPONENTSAlex Neundorf2012-03-191-4/+9
| | | | | | | | This patch adds documentation for OPTIONAL_COMPONENTS to cmFindPackage.cxx, and also extends Modules/readme.txt significantly with regard to how components should be handled. Alex
* find_package: add OPTIONAL_COMPONENTS keywordAlex Neundorf2012-03-191-5/+39
| | | | | | | | Add an OPTIONAL_COMPONENTS keyword to find_package() so we can have a clear distinction between required and optional components. Don't allow a component to be both required and optional. Alex
* find_package: allow <pkg>Config.cmake to set <pkg>_FOUND to FALSEAlex Neundorf2012-03-131-4/+34
| | | | | | | | | | | Before, find_package in Config mode always set Foo_FOUND to true if the Config file has been found and could be executed. If the Config file itself detected some problem, like a missing dependency, it did not have a way to signal to the outside that the package is not working. With this patch, if a Config file sets Foo_FOUND to FALSE, this is taken into account and not overridden. Alex
* Merge topic 'find_package_fatal_error_if_required_and_config_not_found'David Cole2012-03-081-0/+4
|\ | | | | | | | | | | c5ae733 find_package: Test that REQUIRED aborts processing correctly c91a54d find_package: error out if REQUIRED Config has not been found
| * find_package: error out if REQUIRED Config has not been foundAlex Neundorf2012-03-061-0/+4
| | | | | | | | | | | | | | | | If in Config mode a configuration file could not be found, cmake printed an error, but did not actually stop processing. With SetFatalErrorOccured it does. Alex
* | Merge topic 'MakingConfigFilesEasier_ConfigureMacro'David Cole2012-03-081-1/+1
|\ \ | |/ |/| | | | | | | 6973e2d wrap write_basic_config_version_file as write_basic_package_version_file() 204f5d4 add CMakePackageConfigHelpers: configure_package_config_file()