https://github.com/Kitware/CMake
Revision e8213404cec972ba43b16ec1b49b62f43c9f48b8 authored by Brad King on 11 September 2018, 19:50:14 UTC, committed by Brad King on 11 September 2018, 19:52:43 UTC
In commit v3.9.0-rc1~55^2 (Improve Doxygen support, 2017-04-10)
use of the `IN_LIST` condition was added, but this is only supported
when policy CMP0057 is set to NEW.  Add a policy scope around the
module and enable the policy within it.  Otherwise it works only
in projects that happen to enable the policy.

Fixes: #18361
1 parent f478fa6
Raw File
Tip revision: e8213404cec972ba43b16ec1b49b62f43c9f48b8 authored by Brad King on 11 September 2018, 19:50:14 UTC
FindDoxygen: Ensure policy settings allow use of IN_LIST
Tip revision: e821340
cmTargetSourcesCommand.cxx
/* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
   file Copyright.txt or https://cmake.org/licensing for details.  */
#include "cmTargetSourcesCommand.h"

#include <sstream>

#include "cmAlgorithms.h"
#include "cmMakefile.h"
#include "cmTarget.h"
#include "cmake.h"

class cmExecutionStatus;

bool cmTargetSourcesCommand::InitialPass(std::vector<std::string> const& args,
                                         cmExecutionStatus&)
{
  return this->HandleArguments(args, "SOURCES");
}

void cmTargetSourcesCommand::HandleMissingTarget(const std::string& name)
{
  std::ostringstream e;
  e << "Cannot specify sources for target \"" << name
    << "\" "
       "which is not built by this project.";
  this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str());
}

std::string cmTargetSourcesCommand::Join(
  const std::vector<std::string>& content)
{
  return cmJoin(content, ";");
}

bool cmTargetSourcesCommand::HandleDirectContent(
  cmTarget* tgt, const std::vector<std::string>& content, bool, bool)
{
  tgt->AppendProperty("SOURCES", this->Join(content).c_str());
  return true; // Successfully handled.
}
back to top