/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file LICENSE.rst or https://cmake.org/licensing for details. */ #pragma once #include "cmConfigure.h" // IWYU pragma: keep #include #include class cmExecutionStatus; class cmValue; namespace GetPropertyCommand { // Per-entity property lookups used by the get_property command. Each preserves // the script command's error semantics for its scope (status.SetError on // missing entity / empty name where applicable). On success, returns true and // fills `out`; `out` is null iff the property is unset. On hard error returns // false with status.SetError already set. bool LookupTargetProperty(cmExecutionStatus& status, std::string const& name, std::string const& propertyName, cmValue& out); bool LookupDirectoryProperty(cmExecutionStatus& status, std::string const& name, std::string const& propertyName, cmValue& out); bool LookupSourceProperty( cmExecutionStatus& status, std::string const& name, std::string const& propertyName, bool sourceFileDirectoryOptionEnabled, bool sourceFileTargetOptionEnabled, std::vector& sourceFileDirectories, std::vector& sourceFileTargetDirectories, cmValue& out); // Convenience overload: no DIRECTORY / TARGET_DIRECTORY scoping. bool LookupSourceProperty(cmExecutionStatus& status, std::string const& name, std::string const& propertyName, cmValue& out); bool LookupTestProperty(cmExecutionStatus& status, std::string const& name, std::string const& propertyName, bool testDirectoryOptionEnabled, std::string& testDirectory, cmValue& out); // Convenience overload: no DIRECTORY scoping. bool LookupTestProperty(cmExecutionStatus& status, std::string const& name, std::string const& propertyName, cmValue& out); bool LookupCacheProperty(cmExecutionStatus& status, std::string const& name, std::string const& propertyName, cmValue& out); } bool cmGetPropertyCommand(std::vector const& args, cmExecutionStatus& status);