Merge topic 'find_package-no-cmake-gui-paths'
1506f9ca find_package: Drop search in recent cmake-gui locations 8d484463 FindFLTK: Drop search in recent cmake-gui locations
This commit is contained in:
commit
ffd5d09225
@ -68,7 +68,7 @@ The complete Config mode command signature is::
|
|||||||
[NO_CMAKE_PATH]
|
[NO_CMAKE_PATH]
|
||||||
[NO_SYSTEM_ENVIRONMENT_PATH]
|
[NO_SYSTEM_ENVIRONMENT_PATH]
|
||||||
[NO_CMAKE_PACKAGE_REGISTRY]
|
[NO_CMAKE_PACKAGE_REGISTRY]
|
||||||
[NO_CMAKE_BUILDS_PATH]
|
[NO_CMAKE_BUILDS_PATH] # Deprecated; does nothing.
|
||||||
[NO_CMAKE_SYSTEM_PATH]
|
[NO_CMAKE_SYSTEM_PATH]
|
||||||
[NO_CMAKE_SYSTEM_PACKAGE_REGISTRY]
|
[NO_CMAKE_SYSTEM_PACKAGE_REGISTRY]
|
||||||
[CMAKE_FIND_ROOT_PATH_BOTH |
|
[CMAKE_FIND_ROOT_PATH_BOTH |
|
||||||
@ -265,20 +265,14 @@ enabled.
|
|||||||
|
|
||||||
PATH
|
PATH
|
||||||
|
|
||||||
5. Search project build trees recently configured in a :manual:`cmake-gui(1)`.
|
5. Search paths stored in the CMake :ref:`User Package Registry`.
|
||||||
This can be skipped if ``NO_CMAKE_BUILDS_PATH`` is passed. It is intended
|
|
||||||
for the case when a user is building multiple dependent projects one
|
|
||||||
after another.
|
|
||||||
(This step is implemented only on Windows.)
|
|
||||||
|
|
||||||
6. Search paths stored in the CMake :ref:`User Package Registry`.
|
|
||||||
This can be skipped if ``NO_CMAKE_PACKAGE_REGISTRY`` is passed or by
|
This can be skipped if ``NO_CMAKE_PACKAGE_REGISTRY`` is passed or by
|
||||||
setting the :variable:`CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY`
|
setting the :variable:`CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY`
|
||||||
to ``TRUE``.
|
to ``TRUE``.
|
||||||
See the :manual:`cmake-packages(7)` manual for details on the user
|
See the :manual:`cmake-packages(7)` manual for details on the user
|
||||||
package registry.
|
package registry.
|
||||||
|
|
||||||
7. Search cmake variables defined in the Platform files for the
|
6. Search cmake variables defined in the Platform files for the
|
||||||
current system. This can be skipped if ``NO_CMAKE_SYSTEM_PATH`` is
|
current system. This can be skipped if ``NO_CMAKE_SYSTEM_PATH`` is
|
||||||
passed::
|
passed::
|
||||||
|
|
||||||
@ -286,14 +280,14 @@ enabled.
|
|||||||
CMAKE_SYSTEM_FRAMEWORK_PATH
|
CMAKE_SYSTEM_FRAMEWORK_PATH
|
||||||
CMAKE_SYSTEM_APPBUNDLE_PATH
|
CMAKE_SYSTEM_APPBUNDLE_PATH
|
||||||
|
|
||||||
8. Search paths stored in the CMake :ref:`System Package Registry`.
|
7. Search paths stored in the CMake :ref:`System Package Registry`.
|
||||||
This can be skipped if ``NO_CMAKE_SYSTEM_PACKAGE_REGISTRY`` is passed
|
This can be skipped if ``NO_CMAKE_SYSTEM_PACKAGE_REGISTRY`` is passed
|
||||||
or by setting the
|
or by setting the
|
||||||
:variable:`CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY` to ``TRUE``.
|
:variable:`CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY` to ``TRUE``.
|
||||||
See the :manual:`cmake-packages(7)` manual for details on the system
|
See the :manual:`cmake-packages(7)` manual for details on the system
|
||||||
package registry.
|
package registry.
|
||||||
|
|
||||||
9. Search paths specified by the ``PATHS`` option. These are typically
|
8. Search paths specified by the ``PATHS`` option. These are typically
|
||||||
hard-coded guesses.
|
hard-coded guesses.
|
||||||
|
|
||||||
.. |FIND_XXX| replace:: find_package
|
.. |FIND_XXX| replace:: find_package
|
||||||
|
10
Help/release/dev/find_package-no-cmake-gui-paths.rst
Normal file
10
Help/release/dev/find_package-no-cmake-gui-paths.rst
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
find_package-no-cmake-gui-paths
|
||||||
|
-------------------------------
|
||||||
|
|
||||||
|
* The :command:`find_package` command no longer considers project
|
||||||
|
build trees recently configured in a :manual:`cmake-gui(1)`.
|
||||||
|
This was previously done only on Windows and is now never done.
|
||||||
|
The ``NO_CMAKE_BUILDS_PATH`` option is now ignored if given
|
||||||
|
and effectively always on.
|
||||||
|
Projects may populate the :ref:`User Package Registry` to aid
|
||||||
|
users building multiple dependent projects one after another.
|
@ -131,21 +131,6 @@ if(NOT FLTK_DIR)
|
|||||||
/usr/local/fltk
|
/usr/local/fltk
|
||||||
/usr/X11R6/include
|
/usr/X11R6/include
|
||||||
|
|
||||||
# Read from the CMakeSetup registry entries. It is likely that
|
|
||||||
# FLTK will have been recently built.
|
|
||||||
# TODO: Is this really a good idea? I can already hear the user screaming, "But
|
|
||||||
# it worked when I configured the build LAST week!"
|
|
||||||
[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild1]
|
|
||||||
[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild2]
|
|
||||||
[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild3]
|
|
||||||
[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild4]
|
|
||||||
[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild5]
|
|
||||||
[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild6]
|
|
||||||
[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild7]
|
|
||||||
[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild8]
|
|
||||||
[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild9]
|
|
||||||
[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild10]
|
|
||||||
|
|
||||||
# Help the user find it if we cannot.
|
# Help the user find it if we cannot.
|
||||||
DOC "The ${FLTK_DIR_STRING}"
|
DOC "The ${FLTK_DIR_STRING}"
|
||||||
)
|
)
|
||||||
|
@ -96,19 +96,6 @@ if(NOT FLTK2_DIR)
|
|||||||
/usr/local/fltk2
|
/usr/local/fltk2
|
||||||
/usr/X11R6/include
|
/usr/X11R6/include
|
||||||
|
|
||||||
# Read from the CMakeSetup registry entries. It is likely that
|
|
||||||
# FLTK2 will have been recently built.
|
|
||||||
[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild1]
|
|
||||||
[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild2]
|
|
||||||
[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild3]
|
|
||||||
[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild4]
|
|
||||||
[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild5]
|
|
||||||
[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild6]
|
|
||||||
[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild7]
|
|
||||||
[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild8]
|
|
||||||
[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild9]
|
|
||||||
[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild10]
|
|
||||||
|
|
||||||
# Help the user find it if we cannot.
|
# Help the user find it if we cannot.
|
||||||
DOC "The ${FLTK2_DIR_STRING}"
|
DOC "The ${FLTK2_DIR_STRING}"
|
||||||
)
|
)
|
||||||
|
@ -42,7 +42,6 @@ cmFindPackageCommand::cmFindPackageCommand()
|
|||||||
this->Required = false;
|
this->Required = false;
|
||||||
this->NoUserRegistry = false;
|
this->NoUserRegistry = false;
|
||||||
this->NoSystemRegistry = false;
|
this->NoSystemRegistry = false;
|
||||||
this->NoBuilds = false;
|
|
||||||
this->UseConfigFiles = true;
|
this->UseConfigFiles = true;
|
||||||
this->UseFindModules = true;
|
this->UseFindModules = true;
|
||||||
this->DebugMode = false;
|
this->DebugMode = false;
|
||||||
@ -246,7 +245,7 @@ bool cmFindPackageCommand
|
|||||||
}
|
}
|
||||||
else if(args[i] == "NO_CMAKE_BUILDS_PATH")
|
else if(args[i] == "NO_CMAKE_BUILDS_PATH")
|
||||||
{
|
{
|
||||||
this->NoBuilds = true;
|
// Ignore legacy option.
|
||||||
configArgs.insert(i);
|
configArgs.insert(i);
|
||||||
doing = DoingNone;
|
doing = DoingNone;
|
||||||
}
|
}
|
||||||
@ -1142,10 +1141,6 @@ void cmFindPackageCommand::ComputePrefixes()
|
|||||||
{
|
{
|
||||||
this->FillPrefixesUserRegistry();
|
this->FillPrefixesUserRegistry();
|
||||||
}
|
}
|
||||||
if(!this->NoBuilds)
|
|
||||||
{
|
|
||||||
this->FillPrefixesBuilds();
|
|
||||||
}
|
|
||||||
if(!this->NoCMakeSystemPath)
|
if(!this->NoCMakeSystemPath)
|
||||||
{
|
{
|
||||||
this->FillPrefixesCMakeSystemVariable();
|
this->FillPrefixesCMakeSystemVariable();
|
||||||
@ -1437,29 +1432,6 @@ bool cmFindPackageCommand::CheckPackageRegistryEntry(const std::string& fname,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
|
||||||
void cmFindPackageCommand::FillPrefixesBuilds()
|
|
||||||
{
|
|
||||||
cmSearchPath &paths = this->LabeledPaths[PathLabel::Builds];
|
|
||||||
|
|
||||||
// It is likely that CMake will have recently built the project.
|
|
||||||
for(int i=0; i <= 10; ++i)
|
|
||||||
{
|
|
||||||
std::ostringstream r;
|
|
||||||
r <<
|
|
||||||
"[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\"
|
|
||||||
"Settings\\StartPath;WhereBuild" << i << "]";
|
|
||||||
std::string f = r.str();
|
|
||||||
cmSystemTools::ExpandRegistryValues(f);
|
|
||||||
cmSystemTools::ConvertToUnixSlashes(f);
|
|
||||||
if(cmSystemTools::FileIsFullPath(f.c_str()) &&
|
|
||||||
cmSystemTools::FileIsDirectory(f))
|
|
||||||
{
|
|
||||||
paths.AddPath(f);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void cmFindPackageCommand::FillPrefixesCMakeSystemVariable()
|
void cmFindPackageCommand::FillPrefixesCMakeSystemVariable()
|
||||||
{
|
{
|
||||||
|
@ -89,7 +89,6 @@ private:
|
|||||||
void FillPrefixesSystemEnvironment();
|
void FillPrefixesSystemEnvironment();
|
||||||
void FillPrefixesUserRegistry();
|
void FillPrefixesUserRegistry();
|
||||||
void FillPrefixesSystemRegistry();
|
void FillPrefixesSystemRegistry();
|
||||||
void FillPrefixesBuilds();
|
|
||||||
void FillPrefixesCMakeSystemVariable();
|
void FillPrefixesCMakeSystemVariable();
|
||||||
void FillPrefixesUserGuess();
|
void FillPrefixesUserGuess();
|
||||||
void FillPrefixesUserHints();
|
void FillPrefixesUserHints();
|
||||||
@ -138,7 +137,6 @@ private:
|
|||||||
bool UseFindModules;
|
bool UseFindModules;
|
||||||
bool NoUserRegistry;
|
bool NoUserRegistry;
|
||||||
bool NoSystemRegistry;
|
bool NoSystemRegistry;
|
||||||
bool NoBuilds;
|
|
||||||
bool DebugMode;
|
bool DebugMode;
|
||||||
bool UseLib64Paths;
|
bool UseLib64Paths;
|
||||||
bool PolicyScope;
|
bool PolicyScope;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user