diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-10-08 09:19:17 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-10-08 09:19:17 +0900 |
commit | 01310be508e7384e4a05bba3154f6fa458197696 (patch) | |
tree | be8290423ba1f10255031316e40017770ffadace /Source | |
parent | 673b21719eea1405c2e96df62abe022cd82a73ad (diff) | |
download | cmake-01310be508e7384e4a05bba3154f6fa458197696.tar.gz cmake-01310be508e7384e4a05bba3154f6fa458197696.tar.bz2 cmake-01310be508e7384e4a05bba3154f6fa458197696.zip |
Imported Upstream version 3.16.41d6613f4446f69f63beddf2d97c201154fb35e33
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CMakeVersion.cmake | 4 | ||||
-rw-r--r-- | Source/cmFileCommand.cxx | 17 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio10Generator.cxx | 6 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio10Generator.h | 3 | ||||
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 18 |
5 files changed, 35 insertions, 13 deletions
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 889e9436c..2797a6560 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,7 +1,7 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 16) -set(CMake_VERSION_PATCH 3) +set(CMake_VERSION_PATCH 4) #set(CMake_VERSION_RC 0) set(CMake_VERSION_IS_DIRTY 0) @@ -21,7 +21,7 @@ endif() if(NOT CMake_VERSION_NO_GIT) # If this source was exported by 'git archive', use its commit info. - set(git_info [==[21e60da5bb CMake 3.16.3]==]) + set(git_info [==[44b8937b76 CMake 3.16.4]==]) # Otherwise, try to identify the current development source version. if(NOT git_info MATCHES "^([0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]?[0-9a-f]?)[0-9a-f]* " diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index d55b959e8..d45414f72 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -2673,9 +2673,20 @@ bool HandleGetRuntimeDependenciesCommand(std::vector<std::string> const& args, cmSystemTools::SetFatalErrorOccured(); return false; } - argIt = keywordsMissingValues.begin(); - if (argIt != keywordsMissingValues.end()) { - status.SetError(cmStrCat("Keyword missing value: ", *argIt)); + + const std::vector<std::string> LIST_ARGS = { "DIRECTORIES", + "EXECUTABLES", + "LIBRARIES", + "MODULES", + "POST_EXCLUDE_REGEXES", + "POST_INCLUDE_REGEXES", + "PRE_EXCLUDE_REGEXES", + "PRE_INCLUDE_REGEXES" }; + auto kwbegin = keywordsMissingValues.cbegin(); + auto kwend = cmRemoveMatching(keywordsMissingValues, LIST_ARGS); + if (kwend != kwbegin) { + status.SetError(cmStrCat("Keywords missing values:\n ", + cmJoin(cmMakeRange(kwbegin, kwend), "\n "))); cmSystemTools::SetFatalErrorOccured(); return false; } diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index 09a49e1e9..f6472ab06 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -230,6 +230,12 @@ bool cmGlobalVisualStudio10Generator::SetGeneratorToolset( } } + this->SupportsUnityBuilds = + this->Version >= cmGlobalVisualStudioGenerator::VS16 || + (this->Version == cmGlobalVisualStudioGenerator::VS15 && + cmSystemTools::PathExists(this->VCTargetsPath + + "/Microsoft.Cpp.Unity.targets")); + if (this->GeneratorToolsetCuda.empty()) { // Find the highest available version of the CUDA tools. std::vector<std::string> cudaTools; diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h index 9adcf08ae..56f119363 100644 --- a/Source/cmGlobalVisualStudio10Generator.h +++ b/Source/cmGlobalVisualStudio10Generator.h @@ -108,6 +108,8 @@ public: virtual bool IsDefaultToolset(const std::string& version) const; virtual std::string GetAuxiliaryToolset() const; + bool GetSupportsUnityBuilds() const { return this->SupportsUnityBuilds; } + bool FindMakeProgram(cmMakefile* mf) override; bool IsIPOSupported() const override { return true; } @@ -172,6 +174,7 @@ protected: std::string DefaultMasmFlagTableName; std::string DefaultNasmFlagTableName; std::string DefaultRCFlagTableName; + bool SupportsUnityBuilds = false; bool SystemIsWindowsCE; bool SystemIsWindowsPhone; bool SystemIsWindowsStore; diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 53fc93cf6..58574776e 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -1430,6 +1430,7 @@ void cmVisualStudio10TargetGenerator::WriteCustomRule( std::string comment = lg->ConstructComment(ccg); comment = cmVS10EscapeComment(comment); std::string script = lg->ConstructScript(ccg); + bool symbolic = false; // input files for custom command std::stringstream additional_inputs; { @@ -1456,6 +1457,12 @@ void cmVisualStudio10TargetGenerator::WriteCustomRule( ConvertToWindowsSlash(dep); additional_inputs << sep << dep; sep = ";"; + if (!symbolic) { + if (cmSourceFile* sf = this->Makefile->GetSource( + dep, cmSourceFileLocationKind::Known)) { + symbolic = sf->GetPropertyAsBool("SYMBOLIC"); + } + } } } if (this->ProjectType != csproj) { @@ -1464,7 +1471,6 @@ void cmVisualStudio10TargetGenerator::WriteCustomRule( } // output files for custom command std::stringstream outputs; - bool symbolic = false; { const char* sep = ""; for (std::string const& o : ccg.GetOutputs()) { @@ -2085,9 +2091,7 @@ void cmVisualStudio10TargetGenerator::WriteAllSources(Elem& e0) const bool haveUnityBuild = this->GeneratorTarget->GetPropertyAsBool("UNITY_BUILD"); - if (haveUnityBuild && - this->GlobalGenerator->GetVersion() >= - cmGlobalVisualStudioGenerator::VS15) { + if (haveUnityBuild && this->GlobalGenerator->GetSupportsUnityBuilds()) { Elem e1(e0, "PropertyGroup"); e1.Element("EnableUnitySupport", "true"); } @@ -2193,9 +2197,7 @@ void cmVisualStudio10TargetGenerator::WriteAllSources(Elem& e0) this->WriteSource(e2, si.Source); bool useNativeUnityBuild = false; - if (haveUnityBuild && - this->GlobalGenerator->GetVersion() >= - cmGlobalVisualStudioGenerator::VS15) { + if (haveUnityBuild && this->GlobalGenerator->GetSupportsUnityBuilds()) { // Magic value taken from cmGlobalVisualStudioVersionedGenerator.cxx static const std::string vs15 = "141"; std::string toolset = @@ -2222,7 +2224,7 @@ void cmVisualStudio10TargetGenerator::WriteAllSources(Elem& e0) si.Source->GetProperty("UNITY_SOURCE_FILE")); e2.Attribute("UnityFilesDirectory", unityDir); } else { - // Visual Studio versions prior to 2017 do not know about unity + // Visual Studio versions prior to 2017 15.8 do not know about unity // builds, thus we exclude the files alredy part of unity sources. if (!si.Source->GetPropertyAsBool("SKIP_UNITY_BUILD_INCLUSION")) { exclude_configs = si.Configs; |