diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CMakeVersion.cmake | 2 | ||||
-rw-r--r-- | Source/CPack/cmCPackDocumentVariables.cxx | 2 | ||||
-rw-r--r-- | Source/cmGeneratorExpressionParser.cxx | 20 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio10Generator.h | 3 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio12Generator.h | 5 | ||||
-rw-r--r-- | Source/cmListFileCache.cxx | 2 | ||||
-rw-r--r-- | Source/cmPolicies.cxx | 6 | ||||
-rw-r--r-- | Source/cmTarget.cxx | 15 | ||||
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 32 |
9 files changed, 64 insertions, 23 deletions
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index e9a4dd0..3db3d9e 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -2,5 +2,5 @@ set(CMake_VERSION_MAJOR 2) set(CMake_VERSION_MINOR 8) set(CMake_VERSION_PATCH 11) -set(CMake_VERSION_TWEAK 20130809) +set(CMake_VERSION_TWEAK 20130826) #set(CMake_VERSION_RC 1) diff --git a/Source/CPack/cmCPackDocumentVariables.cxx b/Source/CPack/cmCPackDocumentVariables.cxx index 1dfaaf9..8b16ae9 100644 --- a/Source/CPack/cmCPackDocumentVariables.cxx +++ b/Source/CPack/cmCPackDocumentVariables.cxx @@ -28,7 +28,7 @@ void cmCPackDocumentVariables::DefineVariables(cmake* cm) " the so-called top level directory. The purpose of" " is to include (set to 1 or ON or TRUE) the top level directory" " in the package or not (set to 0 or OFF or FALSE).\n" - "Each CPack generator as a built-in default value for this" + "Each CPack generator has a built-in default value for this" " variable. E.g. Archive generators (ZIP, TGZ, ...) includes" " the top level whereas RPM or DEB don't. The user may override" " the default value by setting this variable.\n" diff --git a/Source/cmGeneratorExpressionParser.cxx b/Source/cmGeneratorExpressionParser.cxx index a619cec..e1fb8f1 100644 --- a/Source/cmGeneratorExpressionParser.cxx +++ b/Source/cmGeneratorExpressionParser.cxx @@ -126,6 +126,9 @@ void cmGeneratorExpressionParser::ParseGeneratorExpression( std::vector<std::vector<cmGeneratorExpressionToken>::const_iterator> commaTokens; std::vector<cmGeneratorExpressionToken>::const_iterator colonToken; + + bool emptyParamTermination = false; + if (this->it != this->Tokens.end() && this->it->TokenType == cmGeneratorExpressionToken::ColonSeparator) { @@ -133,6 +136,10 @@ void cmGeneratorExpressionParser::ParseGeneratorExpression( parameters.resize(parameters.size() + 1); assert(this->it != this->Tokens.end()); ++this->it; + if(this->it == this->Tokens.end()) + { + emptyParamTermination = true; + } while (this->it != this->Tokens.end() && this->it->TokenType == cmGeneratorExpressionToken::CommaSeparator) @@ -141,6 +148,10 @@ void cmGeneratorExpressionParser::ParseGeneratorExpression( parameters.resize(parameters.size() + 1); assert(this->it != this->Tokens.end()); ++this->it; + if(this->it == this->Tokens.end()) + { + emptyParamTermination = true; + } } while (this->it != this->Tokens.end() && this->it->TokenType == cmGeneratorExpressionToken::ColonSeparator) @@ -164,6 +175,10 @@ void cmGeneratorExpressionParser::ParseGeneratorExpression( parameters.resize(parameters.size() + 1); assert(this->it != this->Tokens.end()); ++this->it; + if(this->it == this->Tokens.end()) + { + emptyParamTermination = true; + } } while (this->it != this->Tokens.end() && this->it->TokenType == cmGeneratorExpressionToken::ColonSeparator) @@ -203,7 +218,10 @@ void cmGeneratorExpressionParser::ParseGeneratorExpression( assert(parameters.size() > commaTokens.size()); for ( ; pit != pend; ++pit, ++commaIt) { - extendResult(result, *pit); + if (!pit->empty() && !emptyParamTermination) + { + extendResult(result, *pit); + } if (commaIt != commaTokens.end()) { extendText(result, *commaIt); diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h index 0a95091..31e122e 100644 --- a/Source/cmGlobalVisualStudio10Generator.h +++ b/Source/cmGlobalVisualStudio10Generator.h @@ -81,6 +81,9 @@ public: void PathTooLong(cmTarget* target, cmSourceFile* sf, std::string const& sfRel); + + virtual const char* GetToolsVersion() { return "4.0"; } + protected: virtual const char* GetIDEVersion() { return "10.0"; } diff --git a/Source/cmGlobalVisualStudio12Generator.h b/Source/cmGlobalVisualStudio12Generator.h index 064e310..8c8aeb1 100644 --- a/Source/cmGlobalVisualStudio12Generator.h +++ b/Source/cmGlobalVisualStudio12Generator.h @@ -31,6 +31,11 @@ public: /** TODO: VS 12 user macro support. */ virtual std::string GetUserMacrosDirectory() { return ""; } + + //in Visual Studio 2013 they detached the MSBuild tools version + //from the .Net Framework version and instead made it have it's own + //version number + virtual const char* GetToolsVersion() { return "12.0"; } protected: virtual const char* GetIDEVersion() { return "12.0"; } private: diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx index c02866c..898f379 100644 --- a/Source/cmListFileCache.cxx +++ b/Source/cmListFileCache.cxx @@ -287,8 +287,8 @@ bool cmListFileParser::ParseFunction(const char* name, long line) if(token->type == cmListFileLexer_Token_ParenLeft) { parenDepth++; - this->AddArgument(token, cmListFileArgument::Unquoted); this->Separation = SeparationOkay; + this->AddArgument(token, cmListFileArgument::Unquoted); } else if(token->type == cmListFileLexer_Token_ParenRight) { diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx index 0ba673e..a823f05 100644 --- a/Source/cmPolicies.cxx +++ b/Source/cmPolicies.cxx @@ -543,7 +543,7 @@ cmPolicies::cmPolicies() "the INCLUDE_DIRECTORIES target property. " "The NEW behavior for this policy is to issue a FATAL_ERROR if " "INCLUDE_DIRECTORIES contains a relative path.", - 2,8,11,20130516, cmPolicies::WARN); + 2,8,12,0, cmPolicies::WARN); this->DefinePolicy( CMP0022, "CMP0022", @@ -574,7 +574,7 @@ cmPolicies::cmPolicies() "The NEW behavior for this policy is to use the INTERFACE_LINK_LIBRARIES " "property for in-build targets, and ignore the old properties matching " "(IMPORTED_)?LINK_INTERFACE_LIBRARIES(_<CONFIG>)?.", - 2,8,11,20130516, cmPolicies::WARN); + 2,8,12,0, cmPolicies::WARN); this->DefinePolicy( CMP0023, "CMP0023", @@ -600,7 +600,7 @@ cmPolicies::cmPolicies() "target_link_libraries signatures to be mixed. " "The NEW behavior for this policy is to not to allow mixing of the " "keyword and plain signatures.", - 2,8,11,20130724, cmPolicies::WARN); + 2,8,12,0, cmPolicies::WARN); } cmPolicies::~cmPolicies() diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 13cd006..147c332 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -1617,7 +1617,7 @@ void cmTarget::SetMakefile(cmMakefile* mf) this->IsApple = this->Makefile->IsOn("APPLE"); // Setup default property values. - this->SetPropertyDefault("INSTALL_NAME_DIR", ""); + this->SetPropertyDefault("INSTALL_NAME_DIR", 0); this->SetPropertyDefault("INSTALL_RPATH", ""); this->SetPropertyDefault("INSTALL_RPATH_USE_LINK_PATH", "OFF"); this->SetPropertyDefault("SKIP_BUILD_RPATH", "OFF"); @@ -3303,7 +3303,10 @@ static void processIncludeDirectories(cmTarget *tgt, if (!noMessage) { tgt->GetMakefile()->IssueMessage(messageType, e.str().c_str()); - return; + if (messageType == cmake::FATAL_ERROR) + { + return; + } } } @@ -4567,6 +4570,10 @@ bool cmTarget::HasMacOSXRpath(const char* config) { install_name_is_rpath = true; } + else if(install_name && use_install_name) + { + return false; + } } else { @@ -5299,18 +5306,18 @@ std::string cmTarget::GetInstallNameDirForInstallTree() if(this->Makefile->IsOn("CMAKE_PLATFORM_HAS_INSTALLNAME")) { std::string dir; + const char* install_name_dir = this->GetProperty("INSTALL_NAME_DIR"); if(!this->Makefile->IsOn("CMAKE_SKIP_RPATH") && !this->Makefile->IsOn("CMAKE_SKIP_INSTALL_RPATH")) { - const char* install_name_dir = this->GetProperty("INSTALL_NAME_DIR"); if(install_name_dir && *install_name_dir) { dir = install_name_dir; dir += "/"; } } - if(dir.empty() && this->GetPropertyAsBool("MACOSX_RPATH")) + if(!install_name_dir && this->GetPropertyAsBool("MACOSX_RPATH")) { dir = "@rpath/"; } diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index ea05347..a26b291 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -216,12 +216,16 @@ void cmVisualStudio10TargetGenerator::Generate() // Write the encoding header into the file char magic[] = {0xEF,0xBB, 0xBF}; this->BuildFileStream->write(magic, 3); - this->WriteString("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n",0); - this->WriteString("<Project DefaultTargets=\"Build\" " - "ToolsVersion=\"4.0\" " - "xmlns=\"http://schemas.microsoft.com/" - "developer/msbuild/2003\">\n", - 0); + + //get the tools version to use + const std::string toolsVer(this->GlobalGenerator->GetToolsVersion()); + std::string project_defaults="<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"; + project_defaults.append("<Project DefaultTargets=\"Build\" ToolsVersion=\""); + project_defaults.append(toolsVer +"\" "); + project_defaults.append( + "xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n"); + this->WriteString(project_defaults.c_str(),0); + this->WriteProjectConfigurations(); this->WriteString("<PropertyGroup Label=\"Globals\">\n", 1); this->WriteString("<ProjectGUID>", 2); @@ -716,12 +720,16 @@ void cmVisualStudio10TargetGenerator::WriteGroups() fout.write(magic, 3); cmGeneratedFileStream* save = this->BuildFileStream; this->BuildFileStream = & fout; - this->WriteString("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" - "<Project " - "ToolsVersion=\"4.0\" " - "xmlns=\"http://schemas.microsoft.com/" - "developer/msbuild/2003\">\n", - 0); + + //get the tools version to use + const std::string toolsVer(this->GlobalGenerator->GetToolsVersion()); + std::string project_defaults="<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"; + project_defaults.append("<Project ToolsVersion=\""); + project_defaults.append(toolsVer +"\" "); + project_defaults.append( + "xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n"); + this->WriteString(project_defaults.c_str(),0); + for(ToolSourceMap::const_iterator ti = this->Tools.begin(); ti != this->Tools.end(); ++ti) { |