mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-15 12:16:40 +08:00

As mentioned in the previous commit, we would like to record additional information in the find-package stack, but we don't have the information at the point a stack entry is created. This necessitates making the stack mutable. However, in order to restrict mutation, do not directly expose the mutable value, and instead arrange for it to be accessible only via cmFindPackageStackRAII (renamed and extracted from cmMakefile). This ensures that mutation can only happen while the stack is being built.
16 lines
500 B
C++
16 lines
500 B
C++
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
file LICENSE.rst or https://cmake.org/licensing for details. */
|
|
#define cmFindPackageStack_cxx
|
|
#include "cmFindPackageStack.h"
|
|
|
|
#include "cmStack.tcc" // IWYU pragma: keep
|
|
template class cmStack<cmFindPackageCall, cmFindPackageStack>;
|
|
|
|
template cmFindPackageCall&
|
|
cmStack<cmFindPackageCall, cmFindPackageStack>::Top<true>();
|
|
|
|
cmFindPackageCall const& cmFindPackageStack::Top() const
|
|
{
|
|
return this->cmStack::Top();
|
|
}
|