https://github.com/Kitware/CMake
Revision c111d440cef08f744f910ebdca063f1c63586e84 authored by Brad King on 08 June 2022, 16:37:48 UTC, committed by Brad King on 08 June 2022, 19:13:27 UTC
The ExternalProject module has long used the generator-specific
placeholder in the `${CMAKE_CFG_INTDIR}` variable to express per-config
stamp file paths in multi-config generators.  Now that most generators
support generator expressions in custom command outputs, we can use
the `$<CONFIG>` genex instead.

In particular, this fixes cross-config `BUILD_BYPRODUCTS` with the Ninja
Multi-Config generator.

Fixes: #23595
1 parent aaf5353
Raw File
Tip revision: c111d440cef08f744f910ebdca063f1c63586e84 authored by Brad King on 08 June 2022, 16:37:48 UTC
ExternalProject: Express per-config step stamp file paths using CONFIG genex
Tip revision: c111d44
cmNinjaLinkLineDeviceComputer.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 <string>

#include "cmLinkLineDeviceComputer.h"

class cmGlobalNinjaGenerator;
class cmOutputConverter;
class cmStateDirectory;

class cmNinjaLinkLineDeviceComputer : public cmLinkLineDeviceComputer
{
public:
  cmNinjaLinkLineDeviceComputer(cmOutputConverter* outputConverter,
                                cmStateDirectory const& stateDir,
                                cmGlobalNinjaGenerator const* gg);

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

  std::string ConvertToLinkReference(std::string const& input) const override;

private:
  cmGlobalNinjaGenerator const* GG;
};
back to top