summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/cmComputeLinkInformation.cxx8
-rw-r--r--Source/cmExtraCodeLiteGenerator.cxx31
-rw-r--r--Source/cmQtAutoGeneratorMocUic.cxx8
-rw-r--r--Source/cmServerProtocol.cxx4
5 files changed, 26 insertions, 27 deletions
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index b41f400..bab642b 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,5 +1,5 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 10)
-set(CMake_VERSION_PATCH 20180122)
+set(CMake_VERSION_PATCH 20180124)
#set(CMake_VERSION_RC 1)
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index fb13a58..18cca5a 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -913,11 +913,9 @@ std::string cmComputeLinkInformation::CreateExtensionRegex(
// Finish the list.
libext += ")";
- // Add an optional OpenBSD version component.
- if (this->OpenBSD) {
- libext += "(\\.[0-9]+\\.[0-9]+)?";
- } else if (type == LinkShared) {
- libext += "(\\.[0-9]+)?";
+ // Add an optional OpenBSD-style version or major.minor.version component.
+ if (this->OpenBSD || type == LinkShared) {
+ libext += "(\\.[0-9]+)*";
}
libext += "$";
diff --git a/Source/cmExtraCodeLiteGenerator.cxx b/Source/cmExtraCodeLiteGenerator.cxx
index 4958007..fad0723 100644
--- a/Source/cmExtraCodeLiteGenerator.cxx
+++ b/Source/cmExtraCodeLiteGenerator.cxx
@@ -198,8 +198,6 @@ std::string cmExtraCodeLiteGenerator::CollectSourceFiles(
std::map<std::string, cmSourceFile*>& cFiles,
std::set<std::string>& otherFiles)
{
- auto cm = this->GlobalGenerator->GetCMakeInstance();
-
std::string projectType;
switch (gt->GetType()) {
case cmStateEnums::EXECUTABLE: {
@@ -227,19 +225,18 @@ std::string cmExtraCodeLiteGenerator::CollectSourceFiles(
gt->GetSourceFiles(sources,
makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"));
for (cmSourceFile* s : sources) {
- // check whether it is a C/C++/CUDA implementation file
- bool isCFile = false;
- std::string lang = s->GetLanguage();
- if (lang == "C" || lang == "CXX" || lang == "CUDA") {
- std::string const& srcext = s->GetExtension();
- isCFile = cm->IsSourceExtension(srcext);
- }
-
+ // check whether it is a source or a include file
// then put it accordingly into one of the two containers
- if (isCFile) {
- cFiles[s->GetFullPath()] = s;
- } else {
- otherFiles.insert(s->GetFullPath());
+ switch (cmSystemTools::GetFileFormat(s->GetExtension().c_str())) {
+ 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());
+ }
}
}
}
@@ -679,7 +676,11 @@ std::string cmExtraCodeLiteGenerator::GetSingleFileBuildCommand(
std::string generator = mf->GetSafeDefinition("CMAKE_GENERATOR");
if (generator == "Unix Makefiles" || generator == "MinGW Makefiles") {
std::ostringstream ss;
- ss << make << " -f$(ProjectPath)/Makefile $(CurrentFileName).cpp.o";
+#if defined(_WIN32)
+ ss << make << " -f$(ProjectPath)/Makefile -B $(CurrentFileFullName).obj";
+#else
+ ss << make << " -f$(ProjectPath)/Makefile -B $(CurrentFileFullName).o";
+#endif
buildCommand = ss.str();
}
return buildCommand;
diff --git a/Source/cmQtAutoGeneratorMocUic.cxx b/Source/cmQtAutoGeneratorMocUic.cxx
index 4b02e0b..037279a 100644
--- a/Source/cmQtAutoGeneratorMocUic.cxx
+++ b/Source/cmQtAutoGeneratorMocUic.cxx
@@ -221,7 +221,7 @@ bool cmQtAutoGeneratorMocUic::JobParseT::ParseMocSource(WorkerT& wrk,
const char* contentChars = meta.Content.c_str();
cmsys::RegularExpressionMatch match;
while (wrk.Moc().RegExpInclude.find(contentChars, match)) {
- std::string incString = match.match(1);
+ std::string incString = match.match(2);
std::string incDir(SubDirPrefix(incString));
std::string incBase =
cmSystemTools::GetFilenameWithoutLastExtension(incString);
@@ -500,7 +500,7 @@ bool cmQtAutoGeneratorMocUic::JobParseT::ParseUic(WorkerT& wrk,
const char* contentChars = meta.Content.c_str();
cmsys::RegularExpressionMatch match;
while (wrk.Uic().RegExpInclude.find(contentChars, match)) {
- if (!ParseUicInclude(wrk, meta, match.match(1))) {
+ if (!ParseUicInclude(wrk, meta, match.match(2))) {
success = false;
break;
}
@@ -1124,9 +1124,9 @@ cmQtAutoGeneratorMocUic::cmQtAutoGeneratorMocUic()
{
// Precompile regular expressions
Moc_.RegExpInclude.compile(
- "[\n][ \t]*#[ \t]*include[ \t]+"
+ "(^|\n)[ \t]*#[ \t]*include[ \t]+"
"[\"<](([^ \">]+/)?moc_[^ \">/]+\\.cpp|[^ \">]+\\.moc)[\">]");
- Uic_.RegExpInclude.compile("[\n][ \t]*#[ \t]*include[ \t]+"
+ Uic_.RegExpInclude.compile("(^|\n)[ \t]*#[ \t]*include[ \t]+"
"[\"<](([^ \">]+/)?ui_[^ \">/]+\\.h)[\">]");
// Initialize libuv asynchronous iteration request
diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx
index 6b7143b..4c0a354 100644
--- a/Source/cmServerProtocol.cxx
+++ b/Source/cmServerProtocol.cxx
@@ -1034,8 +1034,8 @@ static Json::Value DumpProjectList(const cmake* cm, std::string const& config)
// Project structure information:
const cmMakefile* mf = lg->GetMakefile();
- pObj[kMINIMUM_CMAKE_VERSION] =
- mf->GetDefinition("CMAKE_MINIMUM_REQUIRED_VERSION");
+ auto minVersion = mf->GetDefinition("CMAKE_MINIMUM_REQUIRED_VERSION");
+ pObj[kMINIMUM_CMAKE_VERSION] = minVersion ? minVersion : "";
pObj[kSOURCE_DIRECTORY_KEY] = mf->GetCurrentSourceDirectory();
pObj[kBUILD_DIRECTORY_KEY] = mf->GetCurrentBinaryDirectory();
pObj[kTARGETS_KEY] = DumpTargetsList(projectIt.second, config);