mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-04 05:10:10 -05:00
Fix typos identified using codespell
See https://github.com/codespell-project/codespell#readme The following command was used: ``` codespell -q6 --skip="\ .git,\ *.json,\ ./Copyright.txt,\ ./Help/command/foreach.rst,\ ./Help/prop_test/REQUIRED_FILES.rst,\ ./Help/variable/CTEST_COVERAGE_COMMAND.rst,\ ./Modules/CMakeCheckCompilerFlagCommonPatterns.cmake,\ ./Modules/CMakeRCInformation.cmake,\ ./Modules/Internal/CPack/NSIS.template.in,\ ./Modules/FindMatlab.cmake,\ ./Modules/MatlabTestsRedirect.cmake,\ ./Modules/Platform/Windows-Clang.cmake,\ ./Modules/Platform/Windows-Intel-Fortran.cmake,\ ./Modules/Platform/Windows-MSVC.cmake,\ ./Source/CMakeVersion.cmake,\ ./Source/cmConvertMSBuildXMLToJSON.py,\ ./Source/cmCreateTestSourceList.cxx,\ ./Source/cmGlobalVisualStudio10Generator.cxx,\ ./Source/cmExportBuildFileGenerator.cxx,\ ./Source/cmExportInstallAndroidMKGenerator.cxx,\ ./Source/cmExportInstallFileGenerator.cxx,\ ./Source/cmExportSet.cxx,\ ./Source/cmExportTryCompileFileGenerator.cxx,\ ./Source/cmFindPackageCommand.cxx,\ ./Source/cmInstallCommand.cxx,\ ./Source/cmGeneratorExpressionLexer.cxx,\ ./Source/cmLocalVisualStudio7Generator.cxx,\ ./Source/cmOrderDirectories.cxx,\ ./Source/cmTarget.cxx,\ ./Source/kwsys/*,\ ./Source/QtDialog/CMakeSetupDialog.ui,\ ./Source/CPack/WiX/cmWIXRichTextFormatWriter.cxx,\ ./Source/CTest/cmParseCoberturaCoverage.h,\ ./Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in,\ ./Tests/RunCMake/CPack/tests/DMG_SLA/English.license.rtf,\ ./Tests/RunCMake/CPack/tests/DMG_SLA/German.license.txt,\ ./Tests/RunCMake/CPack/tests/DMG_SLA/German.menu.txt,\ ./Tests/RunCMake/GoogleTest/xml_output.cpp,\ ./Tests/RunCMake/Make/TargetMessages*,\ ./Utilities/*,\ " \ -L "\ dependees,\ endwhile,\ fo,\ filetest,\ helpfull,\ nd,\ objext,\ stoll,\ supercedes,\ superceded,\ vas,\ varn,\ " ```
This commit is contained in:
committed by
Brad King
parent
c8706cf165
commit
207373802e
@@ -2983,7 +2983,7 @@ INLINE static FIELD *Right_Neighbour_Field(FIELD * field)
|
||||
| Function : static FIELD *Upper_Neighbour_Field(FIELD * field)
|
||||
|
|
||||
| Description : Because of the row-major nature of sorting the fields,
|
||||
| its more difficult to define whats the upper neighbour
|
||||
| its more difficult to define what's the upper neighbour
|
||||
| field really means. We define that it must be on a
|
||||
| 'previous' line (cyclic order!) and is the rightmost
|
||||
| field laying on the left side of the given field. If
|
||||
@@ -3030,7 +3030,7 @@ static FIELD *Upper_Neighbour_Field(FIELD * field)
|
||||
| Function : static FIELD *Down_Neighbour_Field(FIELD * field)
|
||||
|
|
||||
| Description : Because of the row-major nature of sorting the fields,
|
||||
| its more difficult to define whats the down neighbour
|
||||
| its more difficult to define what's the down neighbour
|
||||
| field really means. We define that it must be on a
|
||||
| 'next' line (cyclic order!) and is the leftmost
|
||||
| field laying on the right side of the given field. If
|
||||
|
||||
@@ -11,7 +11,7 @@ class cmExecutionStatus;
|
||||
struct cmListFileArgument;
|
||||
|
||||
/**
|
||||
* \brief Calls a scripted or build-in command
|
||||
* \brief Calls a scripted or built-in command
|
||||
*
|
||||
*/
|
||||
bool cmCMakeLanguageCommand(std::vector<cmListFileArgument> const& args,
|
||||
|
||||
@@ -253,13 +253,13 @@ cmComputeLinkDepends::Compute()
|
||||
// Compute the final set of link entries.
|
||||
// Iterate in reverse order so we can keep only the last occurrence
|
||||
// of a shared library.
|
||||
std::set<int> emmitted;
|
||||
std::set<int> emitted;
|
||||
for (int i : cmReverseRange(this->FinalLinkOrder)) {
|
||||
LinkEntry const& e = this->EntryList[i];
|
||||
cmGeneratorTarget const* t = e.Target;
|
||||
// Entries that we know the linker will re-use do not need to be repeated.
|
||||
bool uniquify = t && t->GetType() == cmStateEnums::SHARED_LIBRARY;
|
||||
if (!uniquify || emmitted.insert(i).second) {
|
||||
if (!uniquify || emitted.insert(i).second) {
|
||||
this->FinalLinkEntries.push_back(e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ struct Tree
|
||||
std::string path; // only one component of the path
|
||||
std::vector<Tree> folders;
|
||||
std::set<std::string> files;
|
||||
void InsertPath(const std::vector<std::string>& splitted,
|
||||
void InsertPath(const std::vector<std::string>& split,
|
||||
std::vector<std::string>::size_type start,
|
||||
const std::string& fileName);
|
||||
void BuildVirtualFolder(cmXMLWriter& xml) const;
|
||||
@@ -106,34 +106,34 @@ struct Tree
|
||||
const std::string& fsPath) const;
|
||||
};
|
||||
|
||||
void Tree::InsertPath(const std::vector<std::string>& splitted,
|
||||
void Tree::InsertPath(const std::vector<std::string>& split,
|
||||
std::vector<std::string>::size_type start,
|
||||
const std::string& fileName)
|
||||
{
|
||||
if (start == splitted.size()) {
|
||||
if (start == split.size()) {
|
||||
files.insert(fileName);
|
||||
return;
|
||||
}
|
||||
for (Tree& folder : folders) {
|
||||
if (folder.path == splitted[start]) {
|
||||
if (start + 1 < splitted.size()) {
|
||||
folder.InsertPath(splitted, start + 1, fileName);
|
||||
if (folder.path == split[start]) {
|
||||
if (start + 1 < split.size()) {
|
||||
folder.InsertPath(split, start + 1, fileName);
|
||||
return;
|
||||
}
|
||||
// last part of splitted
|
||||
// last part of split
|
||||
folder.files.insert(fileName);
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Not found in folders, thus insert
|
||||
Tree newFolder;
|
||||
newFolder.path = splitted[start];
|
||||
if (start + 1 < splitted.size()) {
|
||||
newFolder.InsertPath(splitted, start + 1, fileName);
|
||||
newFolder.path = split[start];
|
||||
if (start + 1 < split.size()) {
|
||||
newFolder.InsertPath(split, start + 1, fileName);
|
||||
folders.push_back(newFolder);
|
||||
return;
|
||||
}
|
||||
// last part of splitted
|
||||
// last part of split
|
||||
newFolder.files.insert(fileName);
|
||||
folders.push_back(newFolder);
|
||||
}
|
||||
@@ -224,11 +224,11 @@ void cmExtraCodeBlocksGenerator::CreateNewProjectFile(
|
||||
|
||||
const std::string& relative = cmSystemTools::RelativePath(
|
||||
it.second[0]->GetSourceDirectory(), listFile);
|
||||
std::vector<std::string> splitted;
|
||||
cmSystemTools::SplitPath(relative, splitted, false);
|
||||
std::vector<std::string> split;
|
||||
cmSystemTools::SplitPath(relative, split, false);
|
||||
// Split filename from path
|
||||
std::string fileName = *(splitted.end() - 1);
|
||||
splitted.erase(splitted.end() - 1, splitted.end());
|
||||
std::string fileName = *(split.end() - 1);
|
||||
split.erase(split.end() - 1, split.end());
|
||||
|
||||
// We don't want paths with CMakeFiles in them
|
||||
// or do we?
|
||||
@@ -238,10 +238,10 @@ void cmExtraCodeBlocksGenerator::CreateNewProjectFile(
|
||||
// CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES variable.
|
||||
const bool excludeExternal = it.second[0]->GetMakefile()->IsOn(
|
||||
"CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES");
|
||||
if (!splitted.empty() &&
|
||||
if (!split.empty() &&
|
||||
(!excludeExternal || (relative.find("..") == std::string::npos)) &&
|
||||
relative.find("CMakeFiles") == std::string::npos) {
|
||||
tree.InsertPath(splitted, 1, fileName);
|
||||
tree.InsertPath(split, 1, fileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -604,7 +604,7 @@ void cmExtraEclipseCDT4Generator::AppendIncludeDirectories(
|
||||
|
||||
void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
|
||||
{
|
||||
std::set<std::string> emmited;
|
||||
std::set<std::string> emitted;
|
||||
|
||||
const auto& lg = this->GlobalGenerator->GetLocalGenerators()[0];
|
||||
const cmMakefile* mf = lg->GetMakefile();
|
||||
@@ -751,7 +751,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
|
||||
xml.EndElement();
|
||||
|
||||
// add pre-processor definitions to allow eclipse to gray out sections
|
||||
emmited.clear();
|
||||
emitted.clear();
|
||||
for (const auto& lgen : this->GlobalGenerator->GetLocalGenerators()) {
|
||||
|
||||
if (cmProp cdefs =
|
||||
@@ -780,8 +780,8 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
|
||||
}
|
||||
|
||||
// insert the definition if not already added.
|
||||
if (emmited.find(def) == emmited.end()) {
|
||||
emmited.insert(def);
|
||||
if (emitted.find(def) == emitted.end()) {
|
||||
emitted.insert(def);
|
||||
xml.StartElement("pathentry");
|
||||
xml.Attribute("kind", "mac");
|
||||
xml.Attribute("name", def);
|
||||
@@ -812,8 +812,8 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
|
||||
}
|
||||
|
||||
// insert the definition if not already added.
|
||||
if (emmited.find(def) == emmited.end()) {
|
||||
emmited.insert(def);
|
||||
if (emitted.find(def) == emitted.end()) {
|
||||
emitted.insert(def);
|
||||
xml.StartElement("pathentry");
|
||||
xml.Attribute("kind", "mac");
|
||||
xml.Attribute("name", def);
|
||||
@@ -844,8 +844,8 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
|
||||
}
|
||||
|
||||
// insert the definition if not already added.
|
||||
if (emmited.find(def) == emmited.end()) {
|
||||
emmited.insert(def);
|
||||
if (emitted.find(def) == emitted.end()) {
|
||||
emitted.insert(def);
|
||||
xml.StartElement("pathentry");
|
||||
xml.Attribute("kind", "mac");
|
||||
xml.Attribute("name", def);
|
||||
@@ -858,7 +858,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
|
||||
}
|
||||
|
||||
// include dirs
|
||||
emmited.clear();
|
||||
emitted.clear();
|
||||
for (const auto& lgen : this->GlobalGenerator->GetLocalGenerators()) {
|
||||
const auto& targets = lgen->GetGeneratorTargets();
|
||||
for (const auto& target : targets) {
|
||||
@@ -868,7 +868,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
|
||||
std::vector<std::string> includeDirs;
|
||||
std::string config = mf->GetSafeDefinition("CMAKE_BUILD_TYPE");
|
||||
lgen->GetIncludeDirectories(includeDirs, target.get(), "C", config);
|
||||
this->AppendIncludeDirectories(xml, includeDirs, emmited);
|
||||
this->AppendIncludeDirectories(xml, includeDirs, emitted);
|
||||
}
|
||||
}
|
||||
// now also the system include directories, in case we found them in
|
||||
@@ -879,14 +879,14 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
|
||||
std::string systemIncludeDirs =
|
||||
mf->GetSafeDefinition("CMAKE_EXTRA_GENERATOR_C_SYSTEM_INCLUDE_DIRS");
|
||||
std::vector<std::string> dirs = cmExpandedList(systemIncludeDirs);
|
||||
this->AppendIncludeDirectories(xml, dirs, emmited);
|
||||
this->AppendIncludeDirectories(xml, dirs, emitted);
|
||||
}
|
||||
compiler = mf->GetSafeDefinition("CMAKE_CXX_COMPILER");
|
||||
if (this->CXXEnabled && !compiler.empty()) {
|
||||
std::string systemIncludeDirs =
|
||||
mf->GetSafeDefinition("CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_INCLUDE_DIRS");
|
||||
std::vector<std::string> dirs = cmExpandedList(systemIncludeDirs);
|
||||
this->AppendIncludeDirectories(xml, dirs, emmited);
|
||||
this->AppendIncludeDirectories(xml, dirs, emitted);
|
||||
}
|
||||
|
||||
xml.EndElement(); // storageModule
|
||||
@@ -895,7 +895,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
|
||||
xml.StartElement("storageModule");
|
||||
xml.Attribute("moduleId", "org.eclipse.cdt.make.core.buildtargets");
|
||||
xml.StartElement("buildTargets");
|
||||
emmited.clear();
|
||||
emitted.clear();
|
||||
const std::string& make = mf->GetRequiredDefinition("CMAKE_MAKE_PROGRAM");
|
||||
const std::string& makeArgs =
|
||||
mf->GetSafeDefinition("CMAKE_ECLIPSE_MAKE_ARGUMENTS");
|
||||
|
||||
@@ -3164,7 +3164,7 @@ void cmGeneratorTarget::AddCUDAArchitectureFlags(std::string& flags) const
|
||||
} else {
|
||||
this->Makefile->IssueMessage(
|
||||
MessageType::FATAL_ERROR,
|
||||
"Uknown CUDA architecture specifier \"" + std::string(specifier) +
|
||||
"Unknown CUDA architecture specifier \"" + std::string(specifier) +
|
||||
"\".");
|
||||
}
|
||||
}
|
||||
@@ -3880,7 +3880,7 @@ std::string cmGeneratorTarget::GetPchSource(const std::string& config,
|
||||
cmStrCat(generatorTarget->LocalGenerator->GetCurrentBinaryDirectory(),
|
||||
"/CMakeFiles/", generatorTarget->GetName(), ".dir/cmake_pch");
|
||||
|
||||
// For GCC the source extension will be tranformed into .h[xx].gch
|
||||
// For GCC the source extension will be transformed into .h[xx].gch
|
||||
if (!this->Makefile->IsOn("CMAKE_LINK_PCH")) {
|
||||
const std::map<std::string, std::string> languageToExtension = {
|
||||
{ "C", ".h.c" },
|
||||
|
||||
@@ -43,7 +43,7 @@ private:
|
||||
void SetCompilerFlags(std::string const& config,
|
||||
const std::string& language);
|
||||
|
||||
std::string GetDefines(const std::string& langugae,
|
||||
std::string GetDefines(const std::string& language,
|
||||
std::string const& config);
|
||||
|
||||
void WriteIncludes(std::ostream& fout, const std::string& config,
|
||||
|
||||
@@ -44,7 +44,7 @@ public:
|
||||
/** Get the list of supported platforms name for this generator */
|
||||
virtual std::vector<std::string> GetKnownPlatforms() const = 0;
|
||||
|
||||
/** If the generator suports platforms, get its default. */
|
||||
/** If the generator supports platforms, get its default. */
|
||||
virtual std::string GetDefaultPlatformName() const = 0;
|
||||
};
|
||||
|
||||
|
||||
@@ -143,7 +143,7 @@ void cmGlobalUnixMakefileGenerator3::Generate()
|
||||
total += pmi.second.NumberOfActions;
|
||||
}
|
||||
|
||||
// write each target's progress.make this loop is done twice. Bascially the
|
||||
// write each target's progress.make this loop is done twice. Basically the
|
||||
// Generate pass counts all the actions, the first loop below determines
|
||||
// how many actions have progress updates for each target and writes to
|
||||
// corrrect variable values for everything except the all targets. The
|
||||
|
||||
@@ -1273,7 +1273,7 @@ std::vector<BT<std::string>> cmLocalGenerator::GetIncludeDirectoriesImplicit(
|
||||
}
|
||||
}
|
||||
|
||||
// Emit remaining non implicit user direcories.
|
||||
// Emit remaining non implicit user directories.
|
||||
for (BT<std::string> const& udr : userDirs) {
|
||||
if (notExcluded(udr.Value)) {
|
||||
emitBT(udr);
|
||||
|
||||
@@ -1744,7 +1744,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
// If it's an absolute path, check if it starts with the source
|
||||
// direcotory:
|
||||
// directory:
|
||||
return (
|
||||
!(IsInDirectory(SourceDir, path) || IsInDirectory(BinaryDir, path)));
|
||||
}
|
||||
|
||||
@@ -862,7 +862,7 @@ bool cmQtAutoGenInitializer::InitScanFiles()
|
||||
|
||||
if (sf != nullptr) {
|
||||
auto eMuf = makeMUFile(sf, fullPath, true);
|
||||
// Ony process moc/uic when the parent is processed as well
|
||||
// Only process moc/uic when the parent is processed as well
|
||||
if (!muf.MocIt) {
|
||||
eMuf->MocIt = false;
|
||||
}
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ static std::string const empty_string_;
|
||||
void String::internally_mutate_to_stable_string()
|
||||
{
|
||||
// We assume that only one thread mutates this instance at
|
||||
// a time even if we point to a shared string buffer refernced
|
||||
// a time even if we point to a shared string buffer referenced
|
||||
// by other threads.
|
||||
*this = String(data(), size());
|
||||
}
|
||||
|
||||
+1
-1
@@ -383,7 +383,7 @@ public:
|
||||
instance is mutated or destroyed. */
|
||||
std::string const* str_if_stable() const;
|
||||
|
||||
/** Get a refernce to a normal std::string. The reference
|
||||
/** Get a reference to a normal std::string. The reference
|
||||
is valid until this instance is mutated or destroyed. */
|
||||
std::string const& str();
|
||||
|
||||
|
||||
@@ -164,7 +164,7 @@ std::string cmTimestamp::AddTimestampComponent(char flag,
|
||||
break;
|
||||
case 's': // Seconds since UNIX epoch (midnight 1-jan-1970)
|
||||
{
|
||||
// Build a time_t for UNIX epoch and substract from the input "timeT":
|
||||
// Build a time_t for UNIX epoch and subtract from the input "timeT":
|
||||
struct tm tmUnixEpoch;
|
||||
memset(&tmUnixEpoch, 0, sizeof(tmUnixEpoch));
|
||||
tmUnixEpoch.tm_mday = 1;
|
||||
|
||||
@@ -2293,7 +2293,7 @@ void cmVisualStudio10TargetGenerator::WriteAllSources(Elem& e0)
|
||||
e2.Attribute("UnityFilesDirectory", unityDir);
|
||||
} else {
|
||||
// Visual Studio versions prior to 2017 15.8 do not know about unity
|
||||
// builds, thus we exclude the files alredy part of unity sources.
|
||||
// builds, thus we exclude the files already part of unity sources.
|
||||
if (!si.Source->GetPropertyAsBool("SKIP_UNITY_BUILD_INCLUSION")) {
|
||||
exclude_configs = si.Configs;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user