summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/cmGlobalVisualStudioGenerator.cxx31
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx2
-rw-r--r--Source/cmSetCommand.cxx8
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx18
5 files changed, 38 insertions, 23 deletions
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 0a65114..39a5b3d 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 13)
-set(CMake_VERSION_PATCH 20190201)
+set(CMake_VERSION_PATCH 20190205)
#set(CMake_VERSION_RC 1)
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index 77be592..1922906 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -813,7 +813,6 @@ bool cmGlobalVisualStudioGenerator::TargetIsFortranOnly(
cmGeneratorTarget const* gt)
{
// check to see if this is a fortran build
- std::set<std::string> languages;
{
// Issue diagnostic if the source files depend on the config.
std::vector<cmSourceFile*> sources;
@@ -821,27 +820,21 @@ bool cmGlobalVisualStudioGenerator::TargetIsFortranOnly(
return false;
}
}
+
// If there's only one source language, Fortran has to be used
// in order for the sources to compile.
- // Note: Via linker propagation, LINKER_LANGUAGE could become CXX in
- // this situation and mismatch from the actual language of the linker.
+ std::set<std::string> languages;
gt->GetLanguages(languages, "");
- if (languages.size() == 1) {
- if (*languages.begin() == "Fortran") {
- return true;
- }
- }
-
- // In the case of mixed object files or sources mixed with objects,
- // decide the language based on the value of LINKER_LANGUAGE.
- // This will not make it possible to mix source files of different
- // languages, but object libraries will be linked together in the
- // same fashion as other generators do.
- if (gt->GetLinkerLanguage("") == "Fortran") {
- return true;
- }
-
- return false;
+ // Consider an explicit linker language property, but *not* the
+ // computed linker language that may depend on linked targets.
+ // This allows the project to control the language choice in
+ // a target with none of its own sources, e.g. when also using
+ // object libraries.
+ const char* linkLang = gt->GetProperty("LINKER_LANGUAGE");
+ if (linkLang && *linkLang) {
+ languages.insert(linkLang);
+ }
+ return languages.size() == 1 && *languages.begin() == "Fortran";
}
bool cmGlobalVisualStudioGenerator::TargetCompare::operator()(
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index b428ae1..16f8a0e 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -3142,6 +3142,8 @@ bool cmGlobalXCodeGenerator::CreateXCodeObjects(
if (const char* vers = this->CurrentMakefile->GetDefinition(
"CMAKE_Swift_LANGUAGE_VERSION")) {
swiftVersion = vers;
+ } else if (this->XcodeVersion >= 102) {
+ swiftVersion = "4.0";
} else if (this->XcodeVersion >= 83) {
swiftVersion = "3.0";
} else {
diff --git a/Source/cmSetCommand.cxx b/Source/cmSetCommand.cxx
index b09e3ca..6bd071c 100644
--- a/Source/cmSetCommand.cxx
+++ b/Source/cmSetCommand.cxx
@@ -38,6 +38,14 @@ bool cmSetCommand::InitialPass(std::vector<std::string> const& args,
putEnvArg += args[1];
cmSystemTools::PutEnv(putEnvArg);
}
+ // if there's extra arguments, warn user
+ // that they are ignored by this command.
+ if (args.size() > 2) {
+ std::string m = "Only the first value argument is used when setting "
+ "an environment variable. Argument '" +
+ args[2] + "' and later are unused.";
+ this->Makefile->IssueMessage(MessageType::AUTHOR_WARNING, m);
+ }
return true;
}
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 9d7dd07..178e717 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -376,7 +376,13 @@ void cmVisualStudio10TargetGenerator::Generate()
{
Elem e0(BuildFileStream, "Project");
e0.Attribute("DefaultTargets", "Build");
- e0.Attribute("ToolsVersion", this->GlobalGenerator->GetToolsVersion());
+ const char* toolsVersion = this->GlobalGenerator->GetToolsVersion();
+ if (this->GlobalGenerator->GetVersion() ==
+ cmGlobalVisualStudioGenerator::VS12 &&
+ this->GlobalGenerator->TargetsWindowsCE()) {
+ toolsVersion = "4.0";
+ }
+ e0.Attribute("ToolsVersion", toolsVersion);
e0.Attribute("xmlns",
"http://schemas.microsoft.com/developer/msbuild/2003");
@@ -3884,8 +3890,8 @@ void cmVisualStudio10TargetGenerator::WriteProjectReferences(Elem& e0)
this->WriteDotNetReferenceCustomTags(e2, name);
// If the dependency target is not managed (compiled with /clr or
- // C# target) we cannot reference it and have to set
- // 'ReferenceOutputAssembly' to false.
+ // C# target) and not a WinRT component we cannot reference it and
+ // have to set 'ReferenceOutputAssembly' to false.
auto referenceNotManaged =
dt->GetManagedType("") < cmGeneratorTarget::ManagedType::Mixed;
// Workaround to check for manually set /clr flags.
@@ -3902,6 +3908,12 @@ void cmVisualStudio10TargetGenerator::WriteProjectReferences(Elem& e0)
if (referenceNotManaged && dt->GetType() == cmStateEnums::STATIC_LIBRARY) {
referenceNotManaged = !dt->IsCSharpOnly();
}
+
+ // Referencing WinRT components is okay.
+ if (referenceNotManaged) {
+ referenceNotManaged = !dt->GetPropertyAsBool("VS_WINRT_COMPONENT");
+ }
+
if (referenceNotManaged) {
e2.Element("ReferenceOutputAssembly", "false");
e2.Element("CopyToOutputDirectory", "Never");