[Cmake-commits] CMake branch, master, updated. v3.15.0-rc3-245-g80d9836
Kitware Robot
kwrobot at kitware.com
Mon Jul 8 13:03:07 EDT 2019
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, master has been updated
via 80d9836a35cc72618cc79b27108d42c016b93a34 (commit)
via f8a310c9d141c750fd7747f8d7eecf1142231d6e (commit)
via 90b5289c55c29f0c183e878944924203bf1832db (commit)
via e50fa44a351cb4ea10267f98868d5a54efaa1a1d (commit)
via 8214ad442fd7dabf8d8aafa8a50ccb99e5b28b8d (commit)
via 4a9154537c12e5f47e71018a7d485530a376c6da (commit)
from 09fe6664afd2270d1d3b851adb4125b86bd59202 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=80d9836a35cc72618cc79b27108d42c016b93a34
commit 80d9836a35cc72618cc79b27108d42c016b93a34
Merge: 09fe666 f8a310c
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon Jul 8 17:00:33 2019 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Mon Jul 8 13:00:45 2019 -0400
Merge topic 'autogen_header_extension'
f8a310c9d1 cmSystemTools: Remove cmSystemTools::FileFormat method
90b5289c55 cmExtraCodeLiteGenerator: Use cmake::Is*Extension for file type detection
e50fa44a35 cmake: Refactor file extension list setup
8214ad442f Tests: Autogen: Extend SameName test with additional header extensions
4a9154537c Autogen: Use cmake::IsHeader/SourceExtension for file type detection
Acked-by: Kitware Robot <kwrobot at kitware.com>
Merge-request: !3511
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f8a310c9d141c750fd7747f8d7eecf1142231d6e
commit f8a310c9d141c750fd7747f8d7eecf1142231d6e
Author: Sebastian Holtermann <sebholt at xwmw.org>
AuthorDate: Thu Jul 4 13:11:39 2019 +0200
Commit: Sebastian Holtermann <sebholt at xwmw.org>
CommitDate: Thu Jul 4 13:46:19 2019 +0200
cmSystemTools: Remove cmSystemTools::FileFormat method
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 1501481..723f280 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1264,65 +1264,6 @@ bool cmSystemTools::SimpleGlob(const std::string& glob,
return res;
}
-cmSystemTools::FileFormat cmSystemTools::GetFileFormat(std::string const& ext)
-{
- if (ext.empty()) {
- return cmSystemTools::NO_FILE_FORMAT;
- }
- if (ext == "c" || ext == ".c" || ext == "m" || ext == ".m") {
- return cmSystemTools::C_FILE_FORMAT;
- }
- if (ext == "C" || ext == ".C" || ext == "M" || ext == ".M" || ext == "c++" ||
- ext == ".c++" || ext == "cc" || ext == ".cc" || ext == "cpp" ||
- ext == ".cpp" || ext == "cxx" || ext == ".cxx" || ext == "mm" ||
- ext == ".mm") {
- return cmSystemTools::CXX_FILE_FORMAT;
- }
- if (ext == "f" || ext == ".f" || ext == "F" || ext == ".F" || ext == "f77" ||
- ext == ".f77" || ext == "f90" || ext == ".f90" || ext == "for" ||
- ext == ".for" || ext == "f95" || ext == ".f95") {
- return cmSystemTools::FORTRAN_FILE_FORMAT;
- }
- if (ext == "java" || ext == ".java") {
- return cmSystemTools::JAVA_FILE_FORMAT;
- }
- if (ext == "cu" || ext == ".cu") {
- return cmSystemTools::CUDA_FILE_FORMAT;
- }
- if (ext == "H" || ext == ".H" || ext == "h" || ext == ".h" || ext == "h++" ||
- ext == ".h++" || ext == "hm" || ext == ".hm" || ext == "hpp" ||
- ext == ".hpp" || ext == "hxx" || ext == ".hxx" || ext == "in" ||
- ext == ".in" || ext == "txx" || ext == ".txx") {
- return cmSystemTools::HEADER_FILE_FORMAT;
- }
- if (ext == "rc" || ext == ".rc") {
- return cmSystemTools::RESOURCE_FILE_FORMAT;
- }
- if (ext == "def" || ext == ".def") {
- return cmSystemTools::DEFINITION_FILE_FORMAT;
- }
- if (ext == "lib" || ext == ".lib" || ext == "a" || ext == ".a") {
- return cmSystemTools::STATIC_LIBRARY_FILE_FORMAT;
- }
- if (ext == "o" || ext == ".o" || ext == "obj" || ext == ".obj") {
- return cmSystemTools::OBJECT_FILE_FORMAT;
- }
-#ifdef __APPLE__
- if (ext == "dylib" || ext == ".dylib") {
- return cmSystemTools::SHARED_LIBRARY_FILE_FORMAT;
- }
- if (ext == "so" || ext == ".so" || ext == "bundle" || ext == ".bundle") {
- return cmSystemTools::MODULE_FILE_FORMAT;
- }
-#else // __APPLE__
- if (ext == "so" || ext == ".so" || ext == "sl" || ext == ".sl" ||
- ext == "dll" || ext == ".dll") {
- return cmSystemTools::SHARED_LIBRARY_FILE_FORMAT;
- }
-#endif // __APPLE__
- return cmSystemTools::UNKNOWN_FILE_FORMAT;
-}
-
std::string cmSystemTools::ConvertToOutputPath(std::string const& path)
{
#if defined(_WIN32) && !defined(__CYGWIN__)
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h
index 016c266..a9c03bd 100644
--- a/Source/cmSystemTools.h
+++ b/Source/cmSystemTools.h
@@ -299,27 +299,6 @@ public:
static void EnableRunCommandOutput() { s_DisableRunCommandOutput = false; }
static bool GetRunCommandOutput() { return s_DisableRunCommandOutput; }
- /**
- * Some constants for different file formats.
- */
- enum FileFormat
- {
- NO_FILE_FORMAT = 0,
- C_FILE_FORMAT,
- CXX_FILE_FORMAT,
- FORTRAN_FILE_FORMAT,
- JAVA_FILE_FORMAT,
- CUDA_FILE_FORMAT,
- HEADER_FILE_FORMAT,
- RESOURCE_FILE_FORMAT,
- DEFINITION_FILE_FORMAT,
- STATIC_LIBRARY_FILE_FORMAT,
- SHARED_LIBRARY_FILE_FORMAT,
- MODULE_FILE_FORMAT,
- OBJECT_FILE_FORMAT,
- UNKNOWN_FILE_FORMAT
- };
-
enum CompareOp
{
OP_EQUAL = 1,
@@ -350,11 +329,6 @@ public:
*/
static int strverscmp(std::string const& lhs, std::string const& rhs);
- /**
- * Determine the file type based on the extension
- */
- static FileFormat GetFileFormat(std::string const& ext);
-
/** Windows if this is true, the CreateProcess in RunCommand will
* not show new console windows when running programs.
*/
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=90b5289c55c29f0c183e878944924203bf1832db
commit 90b5289c55c29f0c183e878944924203bf1832db
Author: Sebastian Holtermann <sebholt at xwmw.org>
AuthorDate: Thu Jul 4 12:59:55 2019 +0200
Commit: Sebastian Holtermann <sebholt at xwmw.org>
CommitDate: Thu Jul 4 13:46:19 2019 +0200
cmExtraCodeLiteGenerator: Use cmake::Is*Extension for file type detection
In cmExtraCodeLiteGenerator.cxx use `cmake::Is*Extension` methods instead of
`cmSystemTools::GetFileFormat` for file type detection.
diff --git a/Source/cmExtraCodeLiteGenerator.cxx b/Source/cmExtraCodeLiteGenerator.cxx
index 6fe8c14..30b3f0d 100644
--- a/Source/cmExtraCodeLiteGenerator.cxx
+++ b/Source/cmExtraCodeLiteGenerator.cxx
@@ -217,22 +217,21 @@ std::string cmExtraCodeLiteGenerator::CollectSourceFiles(
case cmStateEnums::STATIC_LIBRARY:
case cmStateEnums::SHARED_LIBRARY:
case cmStateEnums::MODULE_LIBRARY: {
+ cmake const* cm = makefile->GetCMakeInstance();
std::vector<cmSourceFile*> sources;
gt->GetSourceFiles(sources,
makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"));
for (cmSourceFile* s : sources) {
+ std::string const& fullPath = s->GetFullPath();
+ std::string const& extLower =
+ cmSystemTools::LowerCase(s->GetExtension());
// check whether it is a source or a include file
// then put it accordingly into one of the two containers
- switch (cmSystemTools::GetFileFormat(s->GetExtension())) {
- case cmSystemTools::C_FILE_FORMAT:
- case cmSystemTools::CXX_FILE_FORMAT:
- case cmSystemTools::CUDA_FILE_FORMAT:
- case cmSystemTools::FORTRAN_FILE_FORMAT: {
- cFiles[s->GetFullPath()] = s;
- } break;
- default: {
- otherFiles.insert(s->GetFullPath());
- }
+ if (cm->IsSourceExtension(extLower) || cm->IsCudaExtension(extLower) ||
+ cm->IsFortranExtension(extLower)) {
+ cFiles[fullPath] = s;
+ } else {
+ otherFiles.insert(fullPath);
}
}
}
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e50fa44a351cb4ea10267f98868d5a54efaa1a1d
commit e50fa44a351cb4ea10267f98868d5a54efaa1a1d
Author: Sebastian Holtermann <sebholt at xwmw.org>
AuthorDate: Thu Jul 4 11:22:20 2019 +0200
Commit: Sebastian Holtermann <sebholt at xwmw.org>
CommitDate: Thu Jul 4 13:46:15 2019 +0200
cmake: Refactor file extension list setup
Refactor the file extention list setup in cmake.h/cxx and add file extensions
lists for Cuda and Fortran.
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 8f2f86d..ca3b405 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -104,7 +104,6 @@
#include <cstring>
#include <initializer_list>
#include <iostream>
-#include <iterator>
#include <memory> // IWYU pragma: keep
#include <sstream>
#include <stdio.h>
@@ -122,9 +121,9 @@ typedef std::unordered_map<std::string, Json::Value> JsonValueMapType;
static bool cmakeCheckStampFile(const std::string& stampName);
static bool cmakeCheckStampList(const std::string& stampList);
-void cmWarnUnusedCliWarning(const std::string& variable, int /*unused*/,
- void* ctx, const char* /*unused*/,
- const cmMakefile* /*unused*/)
+static void cmWarnUnusedCliWarning(const std::string& variable, int /*unused*/,
+ void* ctx, const char* /*unused*/,
+ const cmMakefile* /*unused*/)
{
cmake* cm = reinterpret_cast<cmake*>(ctx);
cm->MarkCliAsUsed(variable);
@@ -184,40 +183,36 @@ cmake::cmake(Role role, cmState::Mode mode)
// Make sure we can capture the build tool output.
cmSystemTools::EnableVSConsoleOutput();
- // Set up a list of source and header extensions
- // these are used to find files when the extension
- // is not given
- // The "c" extension MUST precede the "C" extension.
- this->SourceFileExtensions.emplace_back("c");
- this->SourceFileExtensions.emplace_back("C");
-
- this->SourceFileExtensions.emplace_back("c++");
- this->SourceFileExtensions.emplace_back("cc");
- this->SourceFileExtensions.emplace_back("cpp");
- this->SourceFileExtensions.emplace_back("cxx");
- this->SourceFileExtensions.emplace_back("cu");
- this->SourceFileExtensions.emplace_back("m");
- this->SourceFileExtensions.emplace_back("M");
- this->SourceFileExtensions.emplace_back("mm");
-
- std::copy(this->SourceFileExtensions.begin(),
- this->SourceFileExtensions.end(),
- std::inserter(this->SourceFileExtensionsSet,
- this->SourceFileExtensionsSet.end()));
-
- this->HeaderFileExtensions.emplace_back("h");
- this->HeaderFileExtensions.emplace_back("hh");
- this->HeaderFileExtensions.emplace_back("h++");
- this->HeaderFileExtensions.emplace_back("hm");
- this->HeaderFileExtensions.emplace_back("hpp");
- this->HeaderFileExtensions.emplace_back("hxx");
- this->HeaderFileExtensions.emplace_back("in");
- this->HeaderFileExtensions.emplace_back("txx");
-
- std::copy(this->HeaderFileExtensions.begin(),
- this->HeaderFileExtensions.end(),
- std::inserter(this->HeaderFileExtensionsSet,
- this->HeaderFileExtensionsSet.end()));
+ // Set up a list of source and header extensions.
+ // These are used to find files when the extension is not given.
+ {
+ auto fillExts = [](FileExtensions& exts,
+ std::initializer_list<const char*> extList) {
+ // Fill ordered vector
+ exts.ordered.reserve(extList.size());
+ for (const char* ext : extList) {
+ exts.ordered.emplace_back(ext);
+ };
+ // Fill unordered set
+ exts.unordered.insert(exts.ordered.begin(), exts.ordered.end());
+ };
+
+ // Source extensions
+ // The "c" extension MUST precede the "C" extension.
+ fillExts(this->SourceFileExtensions,
+ { "c", "C", "c++", "cc", "cpp", "cxx", "cu", "m", "M", "mm" });
+
+ // Header extensions
+ fillExts(this->HeaderFileExtensions,
+ { "h", "hh", "h++", "hm", "hpp", "hxx", "in", "txx" });
+
+ // Cuda extensions
+ fillExts(this->CudaFileExtensions, { "cu" });
+
+ // Fortran extensions
+ fillExts(this->FortranFileExtensions,
+ { "f", "F", "for", "f77", "f90", "f95", "f03" });
+ }
}
cmake::~cmake()
diff --git a/Source/cmake.h b/Source/cmake.h
index e14a081..c03872b 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -121,6 +121,17 @@ public:
bool isAlias;
};
+ struct FileExtensions
+ {
+ bool Test(std::string const& ext) const
+ {
+ return (this->unordered.find(ext) != this->unordered.end());
+ }
+
+ std::vector<std::string> ordered;
+ std::unordered_set<std::string> unordered;
+ };
+
typedef std::map<std::string, cmInstalledFile> InstalledFilesMap;
static const int NO_BUILD_PARALLEL_LEVEL = -1;
@@ -233,24 +244,42 @@ public:
const std::vector<std::string>& GetSourceExtensions() const
{
- return this->SourceFileExtensions;
+ return this->SourceFileExtensions.ordered;
}
bool IsSourceExtension(const std::string& ext) const
{
- return this->SourceFileExtensionsSet.find(ext) !=
- this->SourceFileExtensionsSet.end();
+ return this->SourceFileExtensions.Test(ext);
}
const std::vector<std::string>& GetHeaderExtensions() const
{
- return this->HeaderFileExtensions;
+ return this->HeaderFileExtensions.ordered;
}
bool IsHeaderExtension(const std::string& ext) const
{
- return this->HeaderFileExtensionsSet.find(ext) !=
- this->HeaderFileExtensionsSet.end();
+ return this->HeaderFileExtensions.Test(ext);
+ }
+
+ const std::vector<std::string>& GetCudaExtensions() const
+ {
+ return this->CudaFileExtensions.ordered;
+ }
+
+ bool IsCudaExtension(const std::string& ext) const
+ {
+ return this->CudaFileExtensions.Test(ext);
+ }
+
+ const std::vector<std::string>& GetFortranExtensions() const
+ {
+ return this->FortranFileExtensions.ordered;
+ }
+
+ bool IsFortranExtension(const std::string& ext) const
+ {
+ return this->FortranFileExtensions.Test(ext);
}
// Strips the extension (if present and known) from a filename
@@ -531,10 +560,10 @@ private:
std::string CheckStampList;
std::string VSSolutionFile;
std::string EnvironmentGenerator;
- std::vector<std::string> SourceFileExtensions;
- std::unordered_set<std::string> SourceFileExtensionsSet;
- std::vector<std::string> HeaderFileExtensions;
- std::unordered_set<std::string> HeaderFileExtensionsSet;
+ FileExtensions SourceFileExtensions;
+ FileExtensions HeaderFileExtensions;
+ FileExtensions CudaFileExtensions;
+ FileExtensions FortranFileExtensions;
bool ClearBuildSystem;
bool DebugTryCompile;
std::unique_ptr<cmFileTimeCache> FileTimeCache;
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8214ad442fd7dabf8d8aafa8a50ccb99e5b28b8d
commit 8214ad442fd7dabf8d8aafa8a50ccb99e5b28b8d
Author: Sebastian Holtermann <sebholt at xwmw.org>
AuthorDate: Thu Jul 4 11:49:10 2019 +0200
Commit: Sebastian Holtermann <sebholt at xwmw.org>
CommitDate: Thu Jul 4 12:30:40 2019 +0200
Tests: Autogen: Extend SameName test with additional header extensions
This adds additional headers with suffixes ".hh" and uppercase ".H" to the
QtAutogen/SameName test.
diff --git a/Tests/QtAutogen/SameName/CMakeLists.txt b/Tests/QtAutogen/SameName/CMakeLists.txt
index 0a80d5e..1919cc7 100644
--- a/Tests/QtAutogen/SameName/CMakeLists.txt
+++ b/Tests/QtAutogen/SameName/CMakeLists.txt
@@ -18,9 +18,11 @@ add_executable(sameName
ccc/data.qrc
item.cpp
object.h
+ object.hh
object.h++
object.hpp
object.hxx
+ object_upper_ext.H
data.qrc
main.cpp
)
diff --git a/Tests/QtAutogen/SameName/main.cpp b/Tests/QtAutogen/SameName/main.cpp
index 92f15cd..725f4cd 100644
--- a/Tests/QtAutogen/SameName/main.cpp
+++ b/Tests/QtAutogen/SameName/main.cpp
@@ -6,8 +6,10 @@
#include "item.hpp"
#include "object.h"
#include "object.h++"
+#include "object.hh"
#include "object.hpp"
#include "object.hxx"
+#include "object_upper_ext.H"
int main(int argv, char** args)
{
@@ -20,8 +22,10 @@ int main(int argv, char** args)
::ccc::Item ccc_item;
// Object instances
::Object_h obj_h;
+ ::Object_hh obj_hh;
::Object_hplpl obj_hplpl;
::Object_hpp obj_hpp;
::Object_hxx obj_hxx;
+ ::Object_Upper_Ext_H obj_upper_ext_h;
return 0;
}
diff --git a/Tests/QtAutogen/SameName/object.hh b/Tests/QtAutogen/SameName/object.hh
new file mode 100644
index 0000000..3e16f83
--- /dev/null
+++ b/Tests/QtAutogen/SameName/object.hh
@@ -0,0 +1,13 @@
+#ifndef OBJECT_HH
+#define OBJECT_HH
+
+#include <QObject>
+
+class Object_hh : public QObject
+{
+ Q_OBJECT
+ Q_SLOT
+ void go(){};
+};
+
+#endif
diff --git a/Tests/QtAutogen/SameName/object_upper_ext.H b/Tests/QtAutogen/SameName/object_upper_ext.H
new file mode 100644
index 0000000..3266087
--- /dev/null
+++ b/Tests/QtAutogen/SameName/object_upper_ext.H
@@ -0,0 +1,13 @@
+#ifndef OBJECT_UPPER_EXT_H
+#define OBJECT_UPPER_EXT_H
+
+#include <QObject>
+
+class Object_Upper_Ext_H : public QObject
+{
+ Q_OBJECT
+ Q_SLOT
+ void go(){};
+};
+
+#endif
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4a9154537c12e5f47e71018a7d485530a376c6da
commit 4a9154537c12e5f47e71018a7d485530a376c6da
Author: Sebastian Holtermann <sebholt at xwmw.org>
AuthorDate: Tue Jul 2 18:04:53 2019 +0200
Commit: Sebastian Holtermann <sebholt at xwmw.org>
CommitDate: Thu Jul 4 12:30:40 2019 +0200
Autogen: Use cmake::IsHeader/SourceExtension for file type detection
In the QtAutogen initializer use `cmake::IsHeaderExtension` and
`cmake::IsSourceExtension` instead of `cmSystemTools::GetFileFormat` for file
type detection.
Closes: #13904
diff --git a/Source/cmQtAutoGenInitializer.cxx b/Source/cmQtAutoGenInitializer.cxx
index 9985f93..83a1bc4 100644
--- a/Source/cmQtAutoGenInitializer.cxx
+++ b/Source/cmQtAutoGenInitializer.cxx
@@ -620,6 +620,7 @@ bool cmQtAutoGenInitializer::InitRcc()
bool cmQtAutoGenInitializer::InitScanFiles()
{
cmMakefile* makefile = this->Target->Target->GetMakefile();
+ cmake const* cm = makefile->GetCMakeInstance();
auto const& kw = this->GlobalInitializer->kw();
auto makeMUFile = [this, &kw](cmSourceFile* sf, std::string const& fullPath,
@@ -665,25 +666,21 @@ bool cmQtAutoGenInitializer::InitScanFiles()
if (!pathError.empty() || fullPath.empty()) {
continue;
}
- std::string const& ext = sf->GetExtension();
+ std::string const& extLower =
+ cmSystemTools::LowerCase(sf->GetExtension());
// Register files that will be scanned by moc or uic
if (this->MocOrUicEnabled()) {
- switch (cmSystemTools::GetFileFormat(ext)) {
- case cmSystemTools::HEADER_FILE_FORMAT:
- addMUFile(makeMUFile(sf, fullPath, true), true);
- break;
- case cmSystemTools::CXX_FILE_FORMAT:
- addMUFile(makeMUFile(sf, fullPath, true), false);
- break;
- default:
- break;
+ if (cm->IsHeaderExtension(extLower)) {
+ addMUFile(makeMUFile(sf, fullPath, true), true);
+ } else if (cm->IsSourceExtension(extLower)) {
+ addMUFile(makeMUFile(sf, fullPath, true), false);
}
}
// Register rcc enabled files
if (this->Rcc.Enabled) {
- if ((ext == kw.qrc) && !sf->GetPropertyAsBool(kw.SKIP_AUTOGEN) &&
+ if ((extLower == kw.qrc) && !sf->GetPropertyAsBool(kw.SKIP_AUTOGEN) &&
!sf->GetPropertyAsBool(kw.SKIP_AUTORCC)) {
// Register qrc file
Qrc qrc;
@@ -715,7 +712,7 @@ bool cmQtAutoGenInitializer::InitScanFiles()
extraHeaders.reserve(this->AutogenTarget.Sources.size() * 2);
// Header search suffixes and extensions
std::array<std::string, 2> const suffixes{ { "", "_p" } };
- auto const& exts = makefile->GetCMakeInstance()->GetHeaderExtensions();
+ auto const& exts = cm->GetHeaderExtensions();
// Scan through sources
for (auto const& pair : this->AutogenTarget.Sources) {
MUFile const& muf = *pair.second;
@@ -784,10 +781,10 @@ bool cmQtAutoGenInitializer::InitScanFiles()
if (!pathError.empty() || fullPath.empty()) {
continue;
}
- std::string const& ext = sf->GetExtension();
+ std::string const& extLower =
+ cmSystemTools::LowerCase(sf->GetExtension());
- auto const fileFormat = cmSystemTools::GetFileFormat(ext);
- if (fileFormat == cmSystemTools::HEADER_FILE_FORMAT) {
+ if (cm->IsHeaderExtension(extLower)) {
if (this->AutogenTarget.Headers.find(sf) ==
this->AutogenTarget.Headers.end()) {
auto muf = makeMUFile(sf, fullPath, false);
@@ -795,7 +792,7 @@ bool cmQtAutoGenInitializer::InitScanFiles()
this->AutogenTarget.Headers.emplace(sf, std::move(muf));
}
}
- } else if (fileFormat == cmSystemTools::CXX_FILE_FORMAT) {
+ } else if (cm->IsSourceExtension(extLower)) {
if (this->AutogenTarget.Sources.find(sf) ==
this->AutogenTarget.Sources.end()) {
auto muf = makeMUFile(sf, fullPath, false);
@@ -803,7 +800,7 @@ bool cmQtAutoGenInitializer::InitScanFiles()
this->AutogenTarget.Sources.emplace(sf, std::move(muf));
}
}
- } else if (this->Uic.Enabled && (ext == kw.ui)) {
+ } else if (this->Uic.Enabled && (extLower == kw.ui)) {
// .ui file
std::string realPath = cmSystemTools::GetRealPath(fullPath);
bool const skipAutogen = sf->GetPropertyAsBool(kw.SKIP_AUTOGEN);
-----------------------------------------------------------------------
Summary of changes:
Source/cmExtraCodeLiteGenerator.cxx | 19 +++----
Source/cmQtAutoGenInitializer.cxx | 31 +++++------
Source/cmSystemTools.cxx | 59 --------------------
Source/cmSystemTools.h | 26 ---------
Source/cmake.cxx | 71 +++++++++++-------------
Source/cmake.h | 49 ++++++++++++----
Tests/QtAutogen/SameName/CMakeLists.txt | 2 +
Tests/QtAutogen/SameName/main.cpp | 4 ++
Tests/QtAutogen/SameName/{object.h => object.hh} | 6 +-
Tests/QtAutogen/SameName/object_upper_ext.H | 13 +++++
10 files changed, 117 insertions(+), 163 deletions(-)
copy Tests/QtAutogen/SameName/{object.h => object.hh} (50%)
create mode 100644 Tests/QtAutogen/SameName/object_upper_ext.H
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list