https://github.com/Kitware/CMake
Revision a4fccf74af66755c2aeaa1cdba996ea48bf371b8 authored by Brad King on 10 September 2021, 13:29:22 UTC, committed by Kitware Robot on 10 September 2021, 13:29:42 UTC
ce44c2cec3 ctest_memcheck: generate `DynamicAnalysis-Test.xml` as well

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6491
2 parent s 118a0ad + ce44c2c
Raw File
Tip revision: a4fccf74af66755c2aeaa1cdba996ea48bf371b8 authored by Brad King on 10 September 2021, 13:29:22 UTC
Merge topic 'ctest-memcheck-generate-test.xml'
Tip revision: a4fccf7
cmInstalledFile.h
/* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
   file Copyright.txt or https://cmake.org/licensing for details.  */
#pragma once

#include "cmConfigure.h" // IWYU pragma: keep

#include <map>
#include <memory>
#include <string>
#include <vector>

class cmCompiledGeneratorExpression;
class cmMakefile;

/** \class cmInstalledFile
 * \brief Represents a file intended for installation.
 *
 * cmInstalledFile represents a file intended for installation.
 */
class cmInstalledFile
{
public:
  using CompiledGeneratorExpressionPtrType =
    std::unique_ptr<cmCompiledGeneratorExpression>;

  using ExpressionVectorType = std::vector<CompiledGeneratorExpressionPtrType>;

  struct Property
  {
    Property();
    ~Property();

    Property(const Property&) = delete;
    Property& operator=(const Property&) = delete;

    ExpressionVectorType ValueExpressions;
  };

  using PropertyMapType = std::map<std::string, Property>;

  cmInstalledFile();

  ~cmInstalledFile();

  cmInstalledFile(const cmInstalledFile&) = delete;
  cmInstalledFile& operator=(const cmInstalledFile&) = delete;

  void RemoveProperty(const std::string& prop);

  void SetProperty(cmMakefile const* mf, const std::string& prop,
                   const std::string& value);

  void AppendProperty(cmMakefile const* mf, const std::string& prop,
                      const std::string& value, bool asString = false);

  bool HasProperty(const std::string& prop) const;

  bool GetProperty(const std::string& prop, std::string& value) const;

  bool GetPropertyAsBool(const std::string& prop) const;

  void GetPropertyAsList(const std::string& prop,
                         std::vector<std::string>& list) const;

  void SetName(cmMakefile* mf, const std::string& name);

  std::string const& GetName() const;

  cmCompiledGeneratorExpression const& GetNameExpression() const;

  PropertyMapType const& GetProperties() const { return this->Properties; }

private:
  std::string Name;
  CompiledGeneratorExpressionPtrType NameExpression;
  PropertyMapType Properties;
};
back to top