CMake/Source/cmDependsJava.cxx
Alex Neundorf e74ff7c29f cmDepends: allow multiple dependees per depender
This patch is heavily inspired by Michael Wild.

The interfaces cmDepends::Write and cmDepends::WriteDependencies where
extended to allow multiple dependees (sources) per depender (object).
cmDepends::Write first collect all dependencies into a std::set before
passing it to cmDepends::WriteDependencies.

cmDependsC::WriteDependencies also first collects all explicit and
implicit dependencies into a std::set and only then writes
depend.{internal,make}. The implementation of cmDependsFortran simply
loops over all sources and proceeds as before, whereas the cmDependsJava
implementation is as trivial as before.

This is for preventing exponential growth of depend.{internal,make} in
the next commit which fixes dependency-vector erasure in
cmDepends::CheckDependencies.

Inspired-by: Michael Wild <themiwi@users.sourceforge.net>
2012-11-06 11:54:39 -05:00

46 lines
1.5 KiB
C++

/*============================================================================
CMake - Cross Platform Makefile Generator
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
Distributed under the OSI-approved BSD License (the "License");
see accompanying file Copyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the License for more information.
============================================================================*/
#include "cmDependsJava.h"
#include "cmDependsJavaParserHelper.h"
#include "cmSystemTools.h"
//----------------------------------------------------------------------------
cmDependsJava::cmDependsJava()
{
}
//----------------------------------------------------------------------------
cmDependsJava::~cmDependsJava()
{
}
//----------------------------------------------------------------------------
bool cmDependsJava::WriteDependencies(const std::set<std::string>& sources,
const std::string&, std::ostream&, std::ostream&)
{
// Make sure this is a scanning instance.
if(sources.empty() || sources.begin()->empty())
{
cmSystemTools::Error("Cannot scan dependencies without an source file.");
return false;
}
return true;
}
bool cmDependsJava::CheckDependencies(std::istream&, const char*,
std::map<std::string, DependencyVector >&)
{
return true;
}