Merge topic 'cmAlgorithms-cleanup'

95dd238f cmRemoveDuplicates: Fix iterator -> const_iterator.
4448f175 cmInstalledFile: Move Property implementation out of line.
7916d7ba Include cmAlgorithms where it is used.
This commit is contained in:
Brad King 2015-03-12 15:26:35 -04:00 committed by CMake Topic Stage
commit 15b06bc012
47 changed files with 62 additions and 11 deletions

View File

@ -20,6 +20,7 @@
#include "cmGeneratedFileStream.h"
#include "cmXMLSafe.h"
#include "cmFileTimeComparison.h"
#include "cmAlgorithms.h"
//#include <cmsys/RegularExpression.hxx>
#include <cmsys/Process.h>

View File

@ -22,6 +22,7 @@
#include "cmCursesDummyWidget.h"
#include "cmCursesCacheEntryComposite.h"
#include "cmCursesLongMessageForm.h"
#include "cmAlgorithms.h"
inline int ctrl(int z)

View File

@ -273,7 +273,7 @@ typename Range::const_iterator cmRemoveDuplicates(Range& r)
unique.reserve(r.size());
std::vector<size_t> indices;
size_t count = 0;
const typename Range::iterator end = r.end();
const typename Range::const_iterator end = r.end();
for(typename Range::const_iterator it = r.begin();
it != end; ++it, ++count)
{

View File

@ -26,6 +26,7 @@
#include "cmVersionMacros.h"
#include "cmCTestCommand.h"
#include "cmCTestStartCommand.h"
#include "cmAlgorithms.h"
#include "cmCTestBuildHandler.h"
#include "cmCTestBuildAndTestHandler.h"

View File

@ -17,6 +17,7 @@
#include "cmMakefile.h"
#include "cmTarget.h"
#include "cmake.h"
#include "cmAlgorithms.h"
#include <cmsys/stl/algorithm>

View File

@ -19,6 +19,7 @@
#include "cmMakefile.h"
#include "cmTarget.h"
#include "cmake.h"
#include "cmAlgorithms.h"
#include <ctype.h>

View File

@ -14,6 +14,7 @@
#include "cmCacheManager.h"
#include "cmLocalGenerator.h"
#include "cmGlobalGenerator.h"
#include "cmAlgorithms.h"
#include "cmExportTryCompileFileGenerator.h"
#include <cmsys/Directory.hxx>

View File

@ -15,6 +15,7 @@
#include "cmLocalGenerator.h"
#include "cmMakefile.h"
#include "cmSystemTools.h"
#include "cmAlgorithms.h"
#include <cmsys/FStream.hxx>
#include <ctype.h> // isspace

View File

@ -14,6 +14,7 @@
#include "cmSystemTools.h"
#include "cmVersion.h"
#include "cmRST.h"
#include "cmAlgorithms.h"
#include <cmsys/Directory.hxx>
#include <cmsys/Glob.hxx>

View File

@ -22,6 +22,7 @@
#include "cmTargetExport.h"
#include "cmVersion.h"
#include "cmComputeLinkInformation.h"
#include "cmAlgorithms.h"
#include <cmsys/auto_ptr.hxx>
#include <cmsys/FStream.hxx>

View File

@ -19,6 +19,7 @@
#include "cmInstallExportGenerator.h"
#include "cmInstallTargetGenerator.h"
#include "cmTargetExport.h"
#include "cmAlgorithms.h"
//----------------------------------------------------------------------------
cmExportInstallFileGenerator

View File

@ -16,6 +16,7 @@
#include "cmInstallType.h"
#include "cmFileTimeComparison.h"
#include "cmCryptoHash.h"
#include "cmAlgorithms.h"
#include "cmTimestamp.h"

View File

@ -11,6 +11,8 @@
============================================================================*/
#include "cmFindBase.h"
#include "cmAlgorithms.h"
cmFindBase::cmFindBase()
{
this->AlreadyInCache = false;

View File

@ -14,6 +14,7 @@
#include <cmsys/Directory.hxx>
#include <cmsys/RegularExpression.hxx>
#include <cmsys/Encoding.hxx>
#include "cmAlgorithms.h"
#ifdef CMAKE_BUILD_WITH_CMAKE
#include "cmVariableWatch.h"

View File

@ -14,6 +14,7 @@
#include "cmMakefile.h"
#include "cmTarget.h"
#include "assert.h"
#include "cmAlgorithms.h"
#include "cmGeneratorExpressionEvaluator.h"
#include "cmGeneratorExpressionLexer.h"

View File

@ -13,6 +13,7 @@
#include "cmGeneratorExpressionDAGChecker.h"
#include "cmMakefile.h"
#include "cmAlgorithms.h"
//----------------------------------------------------------------------------
cmGeneratorExpressionDAGChecker::cmGeneratorExpressionDAGChecker(

View File

@ -18,6 +18,7 @@
#include "cmLocalGenerator.h"
#include "cmGlobalGenerator.h"
#include "cmSourceFile.h"
#include "cmAlgorithms.h"
#include <cmsys/String.h>

View File

@ -20,6 +20,7 @@
#include "cmGeneratorExpressionDAGChecker.h"
#include "cmComputeLinkInformation.h"
#include "cmCustomCommandGenerator.h"
#include "cmAlgorithms.h"
#include <queue>

View File

@ -14,6 +14,7 @@
#include "cmGlobalGenerator.h"
#include "cmLocalGenerator.h"
#include "cmake.h"
#include "cmAlgorithms.h"
// cmGetCMakePropertyCommand
bool cmGetCMakePropertyCommand

View File

@ -32,6 +32,7 @@
#include "cmGeneratorExpressionEvaluationFile.h"
#include "cmExportBuildFileGenerator.h"
#include "cmCPackPropertiesGenerator.h"
#include "cmAlgorithms.h"
#include <cmsys/Directory.hxx>
#include <cmsys/FStream.hxx>

View File

@ -18,6 +18,7 @@
#include "cmSourceFile.h"
#include "cmTarget.h"
#include "cmGeneratorTarget.h"
#include "cmAlgorithms.h"
cmGlobalUnixMakefileGenerator3::cmGlobalUnixMakefileGenerator3()
{

View File

@ -17,6 +17,7 @@
#include "cmVisualStudioSlnData.h"
#include "cmVisualStudioSlnParser.h"
#include "cmake.h"
#include "cmAlgorithms.h"
static const char vs10generatorName[] = "Visual Studio 10 2010";

View File

@ -12,6 +12,7 @@
#include "cmGlobalVisualStudio11Generator.h"
#include "cmLocalVisualStudio10Generator.h"
#include "cmMakefile.h"
#include "cmAlgorithms.h"
static const char vs11generatorName[] = "Visual Studio 11 2012";

View File

@ -12,6 +12,7 @@
#include "cmGlobalVisualStudio12Generator.h"
#include "cmLocalVisualStudio10Generator.h"
#include "cmMakefile.h"
#include "cmAlgorithms.h"
static const char vs12generatorName[] = "Visual Studio 12 2013";

View File

@ -12,6 +12,7 @@
#include "cmGlobalVisualStudio14Generator.h"
#include "cmLocalVisualStudio10Generator.h"
#include "cmMakefile.h"
#include "cmAlgorithms.h"
static const char vs14generatorName[] = "Visual Studio 14 2015";

View File

@ -12,6 +12,7 @@
#include "cmInstalledFile.h"
#include "cmSystemTools.h"
#include "cmMakefile.h"
#include "cmAlgorithms.h"
//----------------------------------------------------------------------------
cmInstalledFile::cmInstalledFile():
@ -29,6 +30,16 @@ cmInstalledFile::~cmInstalledFile()
}
}
cmInstalledFile::Property::Property()
{
}
cmInstalledFile::Property::~Property()
{
cmDeleteAll(this->ValueExpressions);
}
//----------------------------------------------------------------------------
void cmInstalledFile::SetName(cmMakefile* mf, const std::string& name)
{

View File

@ -13,7 +13,6 @@
#define cmInstalledFile_h
#include "cmGeneratorExpression.h"
#include "cmAlgorithms.h"
/** \class cmInstalledFile
* \brief Represents a file intended for installation.
@ -32,15 +31,8 @@ public:
struct Property
{
Property()
{
}
~Property()
{
cmDeleteAll(this->ValueExpressions);
}
Property();
~Property();
ExpressionVectorType ValueExpressions;
};

View File

@ -12,6 +12,7 @@
#include "cmListCommand.h"
#include <cmsys/RegularExpression.hxx>
#include <cmsys/SystemTools.hxx>
#include "cmAlgorithms.h"
#include <stdlib.h> // required for atoi
#include <ctype.h>

View File

@ -25,6 +25,7 @@
#include "cmCustomCommandGenerator.h"
#include "cmVersion.h"
#include "cmake.h"
#include "cmAlgorithms.h"
#if defined(CMAKE_BUILD_WITH_CMAKE)
# define CM_LG_ENCODE_OBJECT_NAMES

View File

@ -20,6 +20,7 @@
#include "cmVersion.h"
#include "cmFileTimeComparison.h"
#include "cmCustomCommandGenerator.h"
#include "cmAlgorithms.h"
// Include dependency scanners for supported languages. Only the
// C/C++ scanner is needed for bootstrapping CMake.

View File

@ -12,6 +12,7 @@
#include "cmMacroCommand.h"
#include "cmake.h"
#include "cmAlgorithms.h"
// define the class for macro commands
class cmMacroHelperCommand : public cmCommand

View File

@ -12,6 +12,7 @@
#include "cmMakeDepend.h"
#include "cmSystemTools.h"
#include "cmGeneratorExpression.h"
#include "cmAlgorithms.h"
#include <cmsys/RegularExpression.hxx>
#include <cmsys/FStream.hxx>

View File

@ -30,6 +30,7 @@
#include "cmInstallGenerator.h"
#include "cmTestGenerator.h"
#include "cmDefinitions.h"
#include "cmAlgorithms.h"
#include "cmake.h"
#include <stdlib.h> // required for atoi

View File

@ -19,6 +19,7 @@
#include "cmOSXBundleGenerator.h"
#include "cmGeneratorTarget.h"
#include "cmCustomCommandGenerator.h"
#include "cmAlgorithms.h"
#include <assert.h>
#include <algorithm>

View File

@ -14,6 +14,7 @@
#include "cmGlobalGenerator.h"
#include "cmSystemTools.h"
#include "cmake.h"
#include "cmAlgorithms.h"
#include <assert.h>

View File

@ -11,6 +11,7 @@
============================================================================*/
#include "cmOutputRequiredFilesCommand.h"
#include "cmMakeDepend.h"
#include "cmAlgorithms.h"
#include <cmsys/FStream.hxx>
class cmLBDepend : public cmMakeDepend

View File

@ -4,6 +4,7 @@
#include "cmSourceFile.h"
#include "cmVersion.h"
#include "cmVersionMacros.h"
#include "cmAlgorithms.h"
#include <map>
#include <set>
#include <queue>

View File

@ -16,6 +16,7 @@
#include "cmMakefile.h"
#include "cmSourceFile.h"
#include "cmSystemTools.h"
#include "cmAlgorithms.h"
#if defined(_WIN32) && !defined(__CYGWIN__)
# include "cmLocalVisualStudioGenerator.h"

View File

@ -12,6 +12,7 @@
#include "cmSearchPath.h"
#include "cmFindCommon.h"
#include "cmAlgorithms.h"
//----------------------------------------------------------------------------
cmSearchPath::cmSearchPath(cmFindCommon* findCmd)

View File

@ -15,6 +15,7 @@
#include "cmLocalGenerator.h"
#include "cmGlobalGenerator.h"
#include "cmSystemTools.h"
#include "cmAlgorithms.h"
#include "assert.h"

View File

@ -19,6 +19,7 @@
#include "cmListFileCache.h"
#include "cmGeneratorExpression.h"
#include "cmGeneratorExpressionDAGChecker.h"
#include "cmAlgorithms.h"
#include <cmsys/RegularExpression.hxx>
#include <map>
#include <set>

View File

@ -11,6 +11,8 @@
============================================================================*/
#include "cmTargetCompileDefinitionsCommand.h"
#include "cmAlgorithms.h"
bool cmTargetCompileDefinitionsCommand
::InitialPass(std::vector<std::string> const& args, cmExecutionStatus &)
{

View File

@ -11,6 +11,8 @@
============================================================================*/
#include "cmTargetCompileFeaturesCommand.h"
#include "cmAlgorithms.h"
bool cmTargetCompileFeaturesCommand::InitialPass(
std::vector<std::string> const& args,
cmExecutionStatus &)

View File

@ -11,6 +11,8 @@
============================================================================*/
#include "cmTargetCompileOptionsCommand.h"
#include "cmAlgorithms.h"
bool cmTargetCompileOptionsCommand
::InitialPass(std::vector<std::string> const& args, cmExecutionStatus &)
{

View File

@ -20,6 +20,7 @@
#include "cmSourceFile.h"
#include "cmTest.h"
#include "cmDocumentationFormatter.h"
#include "cmAlgorithms.h"
#if defined(CMAKE_BUILD_WITH_CMAKE)
# include "cmGraphVizWriter.h"

View File

@ -24,6 +24,7 @@
#include "cmGlobalGenerator.h"
#include "cmLocalGenerator.h"
#include "cmMakefile.h"
#include "cmAlgorithms.h"
#include <cmsys/Encoding.hxx>
#ifdef CMAKE_BUILD_WITH_CMAKE

View File

@ -15,6 +15,7 @@
#include "cmGlobalGenerator.h"
#include "cmQtAutoGenerators.h"
#include "cmVersion.h"
#include "cmAlgorithms.h"
#if defined(CMAKE_BUILD_WITH_CMAKE)
# include "cmDependsFortran.h" // For -E cmake_copy_f90_mod callback.