diff options
author | Brad King <brad.king@kitware.com> | 2010-11-12 15:47:28 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2010-11-12 15:47:28 (GMT) |
commit | 5303fbf09ebf3ca18983bf2c556767d16a4ff677 (patch) | |
tree | dff2c0396ce5c2dab01861308802e1ee08948dd5 /Source/cmFindLibraryCommand.cxx | |
parent | e6975fe82fc682a47739f3fad695610f045447ae (diff) | |
download | CMake-5303fbf09ebf3ca18983bf2c556767d16a4ff677.zip CMake-5303fbf09ebf3ca18983bf2c556767d16a4ff677.tar.gz CMake-5303fbf09ebf3ca18983bf2c556767d16a4ff677.tar.bz2 |
Speedup find_* commands (#11412)
Delay computation of the command documentation until it is needed.
It is wasteful to do it in the constructor on every call.
Inspired-By: Christian Ehrlicher <Ch.Ehrlicher@gmx.de>
Diffstat (limited to 'Source/cmFindLibraryCommand.cxx')
-rw-r--r-- | Source/cmFindLibraryCommand.cxx | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx index 9077c8e..b309376 100644 --- a/Source/cmFindLibraryCommand.cxx +++ b/Source/cmFindLibraryCommand.cxx @@ -16,6 +16,13 @@ cmFindLibraryCommand::cmFindLibraryCommand() { + this->EnvironmentPath = "LIB"; +} + +//---------------------------------------------------------------------------- +void cmFindLibraryCommand::GenerateDocumentation() +{ + this->cmFindBase::GenerateDocumentation(); cmSystemTools::ReplaceString(this->GenericDocumentation, "FIND_XXX", "find_library"); cmSystemTools::ReplaceString(this->GenericDocumentation, @@ -29,7 +36,7 @@ cmFindLibraryCommand::cmFindLibraryCommand() cmSystemTools::ReplaceString(this->GenericDocumentation, "XXX_SYSTEM", "LIB"); cmSystemTools::ReplaceString(this->GenericDocumentation, - "CMAKE_SYSTEM_XXX_PATH", + "CMAKE_SYSTEM_XXX_PATH", "CMAKE_SYSTEM_LIBRARY_PATH"); cmSystemTools::ReplaceString(this->GenericDocumentation, "SEARCH_XXX_DESC", "library"); @@ -38,11 +45,9 @@ cmFindLibraryCommand::cmFindLibraryCommand() cmSystemTools::ReplaceString(this->GenericDocumentation, "XXX_SUBDIR", "lib"); cmSystemTools::ReplaceString(this->GenericDocumentation, - "CMAKE_FIND_ROOT_PATH_MODE_XXX", + "CMAKE_FIND_ROOT_PATH_MODE_XXX", "CMAKE_FIND_ROOT_PATH_MODE_LIBRARY"); - - this->EnvironmentPath = "LIB"; - this->GenericDocumentation += + this->GenericDocumentation += "\n" "If the library found is a framework, then VAR will be set to " "the full path to the framework <fullPath>/A.framework. " |