summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/CTest/cmCTestCoverageHandler.cxx2
-rw-r--r--Source/cmCommonTargetGenerator.cxx16
-rw-r--r--Source/cmCommonTargetGenerator.h2
-rw-r--r--Source/cmLocalGenerator.cxx4
-rw-r--r--Source/cmLocalGenerator.h1
-rw-r--r--Source/cmMakefileTargetGenerator.cxx9
-rw-r--r--Source/cmNinjaTargetGenerator.cxx9
-rw-r--r--Source/cmState.cxx11
9 files changed, 51 insertions, 5 deletions
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index b382750..fa4f95d 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 3)
-set(CMake_VERSION_PATCH 20150713)
+set(CMake_VERSION_PATCH 20150715)
#set(CMake_VERSION_RC 1)
diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx
index f92f19a..6369e17 100644
--- a/Source/CTest/cmCTestCoverageHandler.cxx
+++ b/Source/CTest/cmCTestCoverageHandler.cxx
@@ -446,7 +446,7 @@ int cmCTestCoverageHandler::ProcessHandler()
}
std::set<std::string> uncovered = this->FindUncoveredFiles(&cont);
- if ( file_count == 0 )
+ if (file_count == 0 && this->ExtraCoverageGlobs.empty())
{
cmCTestOptionalLog(this->CTest, WARNING,
" Cannot find any coverage files. Ignoring Coverage request."
diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx
index ce351ee..2225fdc 100644
--- a/Source/cmCommonTargetGenerator.cxx
+++ b/Source/cmCommonTargetGenerator.cxx
@@ -312,9 +312,6 @@ std::string cmCommonTargetGenerator::GetFlags(const std::string &l)
this->LocalGenerator->AddVisibilityPresetFlags(flags, this->Target,
lang);
- // Add include directory flags.
- this->AddIncludeFlags(flags, lang);
-
// Append old-style preprocessor definition flags.
this->LocalGenerator->
AppendFlags(flags, this->Makefile->GetDefineFlags());
@@ -358,3 +355,16 @@ std::string cmCommonTargetGenerator::GetDefines(const std::string &l)
}
return i->second;
}
+
+std::string cmCommonTargetGenerator::GetIncludes(std::string const& l)
+{
+ ByLanguageMap::iterator i = this->IncludesByLanguage.find(l);
+ if (i == this->IncludesByLanguage.end())
+ {
+ std::string includes;
+ this->AddIncludeFlags(includes, l);
+ ByLanguageMap::value_type entry(l, includes);
+ i = this->IncludesByLanguage.insert(entry).first;
+ }
+ return i->second;
+}
diff --git a/Source/cmCommonTargetGenerator.h b/Source/cmCommonTargetGenerator.h
index e184dba..5451a5a 100644
--- a/Source/cmCommonTargetGenerator.h
+++ b/Source/cmCommonTargetGenerator.h
@@ -83,6 +83,8 @@ protected:
ByLanguageMap FlagsByLanguage;
std::string GetDefines(const std::string &l);
ByLanguageMap DefinesByLanguage;
+ std::string GetIncludes(std::string const& l);
+ ByLanguageMap IncludesByLanguage;
};
#endif
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index e170253..5c9ee0e 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -766,6 +766,10 @@ cmLocalGenerator::ExpandRuleVariable(std::string const& variable,
{
return replaceValues.Defines;
}
+ if(replaceValues.Includes && variable == "INCLUDES")
+ {
+ return replaceValues.Includes;
+ }
if(replaceValues.TargetPDB )
{
if(variable == "TARGET_PDB")
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index 98f4d3a..2dfe825 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -230,6 +230,7 @@ public:
const char* LinkFlags;
const char* LanguageCompileFlags;
const char* Defines;
+ const char* Includes;
const char* RuleLauncher;
const char* DependencyFile;
const char* FilterPrefix;
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index ef4bbbe..9cac5bd 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -295,11 +295,14 @@ void cmMakefileTargetGenerator::WriteTargetLanguageFlags()
{
std::string flags = this->GetFlags(*l);
std::string defines = this->GetDefines(*l);
+ std::string includes = this->GetIncludes(*l);
// Escape comment characters so they do not terminate assignment.
cmSystemTools::ReplaceString(flags, "#", "\\#");
cmSystemTools::ReplaceString(defines, "#", "\\#");
+ cmSystemTools::ReplaceString(includes, "#", "\\#");
*this->FlagFileStream << *l << "_FLAGS = " << flags << "\n\n";
*this->FlagFileStream << *l << "_DEFINES = " << defines << "\n\n";
+ *this->FlagFileStream << *l << "_INCLUDES = " << includes << "\n\n";
}
}
@@ -611,6 +614,9 @@ cmMakefileTargetGenerator
vars.Defines = definesString.c_str();
+ std::string const includesString = "$(" + lang + "_INCLUDES)";
+ vars.Includes = includesString.c_str();
+
// At the moment, it is assumed that C, C++, and Fortran have both
// assembly and preprocessor capabilities. The same is true for the
// ability to export compile commands
@@ -643,6 +649,9 @@ cmMakefileTargetGenerator
std::string langDefines = std::string("$(") + lang + "_DEFINES)";
compileCommand.replace(compileCommand.find(langDefines),
langDefines.size(), this->GetDefines(lang));
+ std::string langIncludes = std::string("$(") + lang + "_INCLUDES)";
+ compileCommand.replace(compileCommand.find(langIncludes),
+ langIncludes.size(), this->GetIncludes(lang));
this->GlobalGenerator->AddCXXCompileCommand(
source.GetFullPath(), workingDirectory, compileCommand);
}
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index a72bc72..74f262c 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -112,6 +112,12 @@ cmNinjaTargetGenerator::ComputeFlagsForObject(cmSourceFile const* source,
{
std::string flags = this->GetFlags(language);
+ // Add Fortran format flags.
+ if(language == "Fortran")
+ {
+ this->AppendFortranFormatFlags(flags, *source);
+ }
+
// Add source file specific flags.
this->LocalGenerator->AppendFlags(flags,
source->GetProperty("COMPILE_FLAGS"));
@@ -315,6 +321,7 @@ cmNinjaTargetGenerator
vars.Source = "$in";
vars.Object = "$out";
vars.Defines = "$DEFINES";
+ vars.Includes = "$INCLUDES";
vars.TargetPDB = "$TARGET_PDB";
vars.TargetCompilePDB = "$TARGET_COMPILE_PDB";
vars.ObjectDir = "$OBJECT_DIR";
@@ -592,6 +599,7 @@ cmNinjaTargetGenerator
cmNinjaVars vars;
vars["FLAGS"] = this->ComputeFlagsForObject(source, language);
vars["DEFINES"] = this->ComputeDefines(source, language);
+ vars["INCLUDES"] = this->GetIncludes(language);
if (!this->NeedDepTypeMSVC(language)) {
vars["DEP_FILE"] =
cmGlobalNinjaGenerator::EncodeDepfileSpace(objectFileName + ".d");
@@ -637,6 +645,7 @@ cmNinjaTargetGenerator
compileObjectVars.ObjectFileDir = objectFileDir.c_str();
compileObjectVars.Flags = vars["FLAGS"].c_str();
compileObjectVars.Defines = vars["DEFINES"].c_str();
+ compileObjectVars.Includes = vars["INCLUDES"].c_str();
// Rule for compiling object file.
std::string compileCmdVar = "CMAKE_";
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index d918f65..2d8b935 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -430,6 +430,7 @@ std::vector<std::string> cmState::GetCommandNames() const
void cmState::RemoveUserDefinedCommands()
{
+ std::vector<cmCommand*> renamedCommands;
for(std::map<std::string, cmCommand*>::iterator j = this->Commands.begin();
j != this->Commands.end(); )
{
@@ -439,11 +440,21 @@ void cmState::RemoveUserDefinedCommands()
delete j->second;
this->Commands.erase(j++);
}
+ else if (j->first != j->second->GetName())
+ {
+ renamedCommands.push_back(j->second);
+ this->Commands.erase(j++);
+ }
else
{
++j;
}
}
+ for (std::vector<cmCommand*>::const_iterator it = renamedCommands.begin();
+ it != renamedCommands.end(); ++it)
+ {
+ this->Commands[cmSystemTools::LowerCase((*it)->GetName())] = *it;
+ }
}
void cmState::SetGlobalProperty(const std::string& prop, const char* value)