diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CMakeLists.txt | 13 | ||||
-rw-r--r-- | Source/CMakeVersion.cmake | 2 | ||||
-rw-r--r-- | Source/CMakeVersion.rc.in | 34 | ||||
-rw-r--r-- | Source/cmAddCustomTargetCommand.cxx | 34 | ||||
-rw-r--r-- | Source/cmAddExecutableCommand.cxx | 34 | ||||
-rw-r--r-- | Source/cmAddLibraryCommand.cxx | 32 | ||||
-rw-r--r-- | Source/cmCTest.cxx | 3 | ||||
-rw-r--r-- | Source/cmForEachCommand.cxx | 5 | ||||
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 162 | ||||
-rw-r--r-- | Source/cmGlobalGenerator.h | 3 | ||||
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 8 | ||||
-rw-r--r-- | Source/cmMakefile.cxx | 36 | ||||
-rw-r--r-- | Source/cmMakefile.h | 3 | ||||
-rw-r--r-- | Source/cmPolicies.h | 1 | ||||
-rw-r--r-- | Source/cmQtAutoGenerators.cxx | 4 | ||||
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 22 | ||||
-rw-r--r-- | Source/cm_codecvt.cxx | 14 |
17 files changed, 259 insertions, 151 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index e1c34bf..f15dff8 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -1057,6 +1057,19 @@ endif() include (${CMake_BINARY_DIR}/Source/LocalUserOptions.cmake OPTIONAL) include (${CMake_SOURCE_DIR}/Source/LocalUserOptions.cmake OPTIONAL) +if(WIN32) + # Add Windows executable version information. + configure_file("CMakeVersion.rc.in" "CMakeVersion.rc" @ONLY) + + # We use a separate object library for this to work around a limitation of + # MinGW's windres tool with spaces in the path to the include directories. + add_library(CMakeVersion OBJECT "${CMAKE_CURRENT_BINARY_DIR}/CMakeVersion.rc") + set_property(TARGET CMakeVersion PROPERTY INCLUDE_DIRECTORIES "") + foreach(_tool ${_tools}) + target_sources(${_tool} PRIVATE $<TARGET_OBJECTS:CMakeVersion>) + endforeach() +endif() + # Install tools foreach(_tool ${_tools}) diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index a48bf17..0ecbd07 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 20171030) +set(CMake_VERSION_PATCH 20171101) #set(CMake_VERSION_RC 1) diff --git a/Source/CMakeVersion.rc.in b/Source/CMakeVersion.rc.in new file mode 100644 index 0000000..f4ca3d5 --- /dev/null +++ b/Source/CMakeVersion.rc.in @@ -0,0 +1,34 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ + +#define VER_FILEVERSION @CMake_VERSION_MAJOR@,@CMake_VERSION_MINOR@,@CMake_VERSION_PATCH@ +#define VER_FILEVERSION_STR "@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@.@CMake_VERSION_PATCH@\0" + +#define VER_PRODUCTVERSION @CMake_VERSION_MAJOR@,@CMake_VERSION_MINOR@,@CMake_VERSION_PATCH@ +#define VER_PRODUCTVERSION_STR "@CMake_VERSION@\0" + +VS_VERSION_INFO VERSIONINFO +FILEVERSION VER_FILEVERSION +PRODUCTVERSION VER_PRODUCTVERSION +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" + BEGIN + VALUE "FileVersion", VER_FILEVERSION_STR + VALUE "ProductVersion", VER_PRODUCTVERSION_STR + END + END + + BLOCK "VarFileInfo" + BEGIN + /* The following line should only be modified for localized versions. */ + /* It consists of any number of WORD,WORD pairs, with each pair */ + /* describing a language,codepage combination supported by the file. */ + /* */ + /* For example, a file might have values "0x409,1252" indicating that it */ + /* supports English language (0x409) in the Windows ANSI codepage (1252). */ + + VALUE "Translation", 0x409, 1252 + END +END diff --git a/Source/cmAddCustomTargetCommand.cxx b/Source/cmAddCustomTargetCommand.cxx index a8d5b2e..f4b4f66 100644 --- a/Source/cmAddCustomTargetCommand.cxx +++ b/Source/cmAddCustomTargetCommand.cxx @@ -8,7 +8,7 @@ #include "cmGeneratorExpression.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" -#include "cmPolicies.h" +#include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTarget.h" #include "cmake.h" @@ -160,35 +160,9 @@ bool cmAddCustomTargetCommand::InitialPass( if (nameOk) { nameOk = targetName.find(':') == std::string::npos; } - if (!nameOk) { - cmake::MessageType messageType = cmake::AUTHOR_WARNING; - std::ostringstream e; - bool issueMessage = false; - switch (this->Makefile->GetPolicyStatus(cmPolicies::CMP0037)) { - case cmPolicies::WARN: - e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0037) << "\n"; - issueMessage = true; - case cmPolicies::OLD: - break; - case cmPolicies::NEW: - case cmPolicies::REQUIRED_IF_USED: - case cmPolicies::REQUIRED_ALWAYS: - issueMessage = true; - messageType = cmake::FATAL_ERROR; - } - if (issueMessage) { - /* clang-format off */ - e << "The target name \"" << targetName << - "\" is reserved or not valid for certain " - "CMake features, such as generator expressions, and may result " - "in undefined behavior."; - /* clang-format on */ - this->Makefile->IssueMessage(messageType, e.str()); - - if (messageType == cmake::FATAL_ERROR) { - return false; - } - } + if (!nameOk && + !this->Makefile->CheckCMP0037(targetName, cmStateEnums::UTILITY)) { + return false; } // Store the last command line finished. diff --git a/Source/cmAddExecutableCommand.cxx b/Source/cmAddExecutableCommand.cxx index 053e34c..b9e200a 100644 --- a/Source/cmAddExecutableCommand.cxx +++ b/Source/cmAddExecutableCommand.cxx @@ -7,10 +7,8 @@ #include "cmGeneratorExpression.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" -#include "cmPolicies.h" #include "cmStateTypes.h" #include "cmTarget.h" -#include "cmake.h" class cmExecutionStatus; @@ -63,35 +61,9 @@ bool cmAddExecutableCommand::InitialPass(std::vector<std::string> const& args, if (nameOk && !importTarget && !isAlias) { nameOk = exename.find(':') == std::string::npos; } - if (!nameOk) { - cmake::MessageType messageType = cmake::AUTHOR_WARNING; - std::ostringstream e; - bool issueMessage = false; - switch (this->Makefile->GetPolicyStatus(cmPolicies::CMP0037)) { - case cmPolicies::WARN: - e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0037) << "\n"; - issueMessage = true; - case cmPolicies::OLD: - break; - case cmPolicies::NEW: - case cmPolicies::REQUIRED_IF_USED: - case cmPolicies::REQUIRED_ALWAYS: - issueMessage = true; - messageType = cmake::FATAL_ERROR; - } - if (issueMessage) { - /* clang-format off */ - e << "The target name \"" << exename << - "\" is reserved or not valid for certain " - "CMake features, such as generator expressions, and may result " - "in undefined behavior."; - /* clang-format on */ - this->Makefile->IssueMessage(messageType, e.str()); - - if (messageType == cmake::FATAL_ERROR) { - return false; - } - } + if (!nameOk && + !this->Makefile->CheckCMP0037(exename, cmStateEnums::EXECUTABLE)) { + return false; } // Special modifiers are not allowed with IMPORTED signature. diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx index 9129047..0fcffdd 100644 --- a/Source/cmAddLibraryCommand.cxx +++ b/Source/cmAddLibraryCommand.cxx @@ -7,7 +7,6 @@ #include "cmGeneratorExpression.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" -#include "cmPolicies.h" #include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" @@ -175,35 +174,8 @@ bool cmAddLibraryCommand::InitialPass(std::vector<std::string> const& args, if (nameOk && !importTarget && !isAlias) { nameOk = libName.find(':') == std::string::npos; } - if (!nameOk) { - cmake::MessageType messageType = cmake::AUTHOR_WARNING; - std::ostringstream e; - bool issueMessage = false; - switch (this->Makefile->GetPolicyStatus(cmPolicies::CMP0037)) { - case cmPolicies::WARN: - if (type != cmStateEnums::INTERFACE_LIBRARY) { - e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0037) << "\n"; - issueMessage = true; - } - case cmPolicies::OLD: - break; - case cmPolicies::NEW: - case cmPolicies::REQUIRED_IF_USED: - case cmPolicies::REQUIRED_ALWAYS: - issueMessage = true; - messageType = cmake::FATAL_ERROR; - } - if (issueMessage) { - e << "The target name \"" << libName - << "\" is reserved or not valid for certain " - "CMake features, such as generator expressions, and may result " - "in undefined behavior."; - this->Makefile->IssueMessage(messageType, e.str()); - - if (messageType == cmake::FATAL_ERROR) { - return false; - } - } + if (!nameOk && !this->Makefile->CheckCMP0037(libName, type)) { + return false; } if (isAlias) { diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 4ea1493..37ff901 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -12,6 +12,7 @@ #include "cmsys/String.hxx" #include "cmsys/SystemInformation.hxx" #include <algorithm> +#include <cstdint> #include <ctype.h> #include <iostream> #include <map> @@ -1421,7 +1422,7 @@ int cmCTest::GenerateCTestNotesOutput(cmXMLWriter& xml, std::string note_time = this->CurrentTime(); xml.StartElement("Note"); xml.Attribute("Name", file); - xml.Element("Time", cmSystemTools::GetTime()); + xml.Element("Time", static_cast<uint64_t>(cmSystemTools::GetTime())); xml.Element("DateTime", note_time); xml.StartElement("Text"); cmsys::ifstream ifs(file.c_str()); diff --git a/Source/cmForEachCommand.cxx b/Source/cmForEachCommand.cxx index 542a860..df288bd 100644 --- a/Source/cmForEachCommand.cxx +++ b/Source/cmForEachCommand.cxx @@ -7,6 +7,7 @@ #include <stdio.h> #include <stdlib.h> +#include "cmAlgorithms.h" #include "cmExecutionStatus.h" #include "cmMakefile.h" #include "cmSystemTools.h" @@ -121,7 +122,7 @@ bool cmForEachCommand::InitialPass(std::vector<std::string> const& args, } // create a function blocker - cmForEachFunctionBlocker* f = new cmForEachFunctionBlocker(this->Makefile); + auto f = cm::make_unique<cmForEachFunctionBlocker>(this->Makefile); if (args.size() > 1) { if (args[1] == "RANGE") { int start = 0; @@ -175,7 +176,7 @@ bool cmForEachCommand::InitialPass(std::vector<std::string> const& args, } else { f->Args = args; } - this->Makefile->AddFunctionBlocker(f); + this->Makefile->AddFunctionBlocker(f.release()); return true; } diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 74a089f..11ea46f 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -2220,6 +2220,45 @@ inline std::string removeQuotes(const std::string& s) return s; } +bool cmGlobalGenerator::CheckCMP0037(std::string const& targetName, + std::string const& reason) const +{ + cmTarget* tgt = this->FindTarget(targetName); + if (!tgt) { + return true; + } + cmake::MessageType messageType = cmake::AUTHOR_WARNING; + std::ostringstream e; + bool issueMessage = false; + switch (tgt->GetPolicyStatusCMP0037()) { + case cmPolicies::WARN: + e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0037) << "\n"; + issueMessage = true; + CM_FALLTHROUGH; + case cmPolicies::OLD: + break; + case cmPolicies::NEW: + case cmPolicies::REQUIRED_IF_USED: + case cmPolicies::REQUIRED_ALWAYS: + issueMessage = true; + messageType = cmake::FATAL_ERROR; + break; + } + if (issueMessage) { + e << "The target name \"" << targetName << "\" is reserved " << reason + << "."; + if (messageType == cmake::AUTHOR_WARNING) { + e << " It may result in undefined behavior."; + } + this->GetCMakeInstance()->IssueMessage(messageType, e.str(), + tgt->GetBacktrace()); + if (messageType == cmake::FATAL_ERROR) { + return false; + } + } + return true; +} + void cmGlobalGenerator::CreateDefaultGlobalTargets( std::vector<GlobalTargetInfo>& targets) { @@ -2235,6 +2274,20 @@ void cmGlobalGenerator::AddGlobalTarget_Package( std::vector<GlobalTargetInfo>& targets) { cmMakefile* mf = this->Makefiles[0]; + std::string configFile = mf->GetCurrentBinaryDirectory(); + configFile += "/CPackConfig.cmake"; + if (!cmSystemTools::FileExists(configFile.c_str())) { + return; + } + + const char* reservedTargets[] = { "package", "PACKAGE" }; + for (const char* const* tn = cm::cbegin(reservedTargets); + tn != cm::cend(reservedTargets); ++tn) { + if (!this->CheckCMP0037(*tn, "when CPack packaging is enabled")) { + return; + } + } + const char* cmakeCfgIntDir = this->GetCMakeCFGIntDir(); GlobalTargetInfo gti; gti.Name = this->GetPackageTargetName(); @@ -2248,8 +2301,6 @@ void cmGlobalGenerator::AddGlobalTarget_Package( singleLine.push_back(cmakeCfgIntDir); } singleLine.push_back("--config"); - std::string configFile = mf->GetCurrentBinaryDirectory(); - configFile += "/CPackConfig.cmake"; std::string relConfigFile = "./CPackConfig.cmake"; singleLine.push_back(relConfigFile); gti.CommandLines.push_back(singleLine); @@ -2262,61 +2313,81 @@ void cmGlobalGenerator::AddGlobalTarget_Package( gti.Depends.push_back(this->GetAllTargetName()); } } - if (cmSystemTools::FileExists(configFile.c_str())) { - targets.push_back(gti); - } + targets.push_back(gti); } void cmGlobalGenerator::AddGlobalTarget_PackageSource( std::vector<GlobalTargetInfo>& targets) { - cmMakefile* mf = this->Makefiles[0]; const char* packageSourceTargetName = this->GetPackageSourceTargetName(); - if (packageSourceTargetName) { - GlobalTargetInfo gti; - gti.Name = packageSourceTargetName; - gti.Message = "Run CPack packaging tool for source..."; - gti.WorkingDir = mf->GetCurrentBinaryDirectory(); - gti.UsesTerminal = true; - cmCustomCommandLine singleLine; - singleLine.push_back(cmSystemTools::GetCPackCommand()); - singleLine.push_back("--config"); - std::string configFile = mf->GetCurrentBinaryDirectory(); - configFile += "/CPackSourceConfig.cmake"; - std::string relConfigFile = "./CPackSourceConfig.cmake"; - singleLine.push_back(relConfigFile); - if (cmSystemTools::FileExists(configFile.c_str())) { - singleLine.push_back(configFile); - gti.CommandLines.push_back(singleLine); - targets.push_back(gti); + if (!packageSourceTargetName) { + return; + } + + cmMakefile* mf = this->Makefiles[0]; + std::string configFile = mf->GetCurrentBinaryDirectory(); + configFile += "/CPackSourceConfig.cmake"; + if (!cmSystemTools::FileExists(configFile.c_str())) { + return; + } + + const char* reservedTargets[] = { "package_source" }; + for (const char* const* tn = cm::cbegin(reservedTargets); + tn != cm::cend(reservedTargets); ++tn) { + if (!this->CheckCMP0037(*tn, "when CPack source packaging is enabled")) { + return; } } + + GlobalTargetInfo gti; + gti.Name = packageSourceTargetName; + gti.Message = "Run CPack packaging tool for source..."; + gti.WorkingDir = mf->GetCurrentBinaryDirectory(); + gti.UsesTerminal = true; + cmCustomCommandLine singleLine; + singleLine.push_back(cmSystemTools::GetCPackCommand()); + singleLine.push_back("--config"); + std::string relConfigFile = "./CPackSourceConfig.cmake"; + singleLine.push_back(relConfigFile); + singleLine.push_back(configFile); + gti.CommandLines.push_back(singleLine); + targets.push_back(gti); } void cmGlobalGenerator::AddGlobalTarget_Test( std::vector<GlobalTargetInfo>& targets) { cmMakefile* mf = this->Makefiles[0]; - const char* cmakeCfgIntDir = this->GetCMakeCFGIntDir(); - if (mf->IsOn("CMAKE_TESTING_ENABLED")) { - GlobalTargetInfo gti; - gti.Name = this->GetTestTargetName(); - gti.Message = "Running tests..."; - gti.UsesTerminal = true; - cmCustomCommandLine singleLine; - singleLine.push_back(cmSystemTools::GetCTestCommand()); - singleLine.push_back("--force-new-ctest-process"); - if (cmakeCfgIntDir && *cmakeCfgIntDir && cmakeCfgIntDir[0] != '.') { - singleLine.push_back("-C"); - singleLine.push_back(cmakeCfgIntDir); - } else // TODO: This is a hack. Should be something to do with the - // generator - { - singleLine.push_back("$(ARGS)"); + if (!mf->IsOn("CMAKE_TESTING_ENABLED")) { + return; + } + + const char* reservedTargets[] = { "test", "RUN_TESTS" }; + for (const char* const* tn = cm::cbegin(reservedTargets); + tn != cm::cend(reservedTargets); ++tn) { + if (!this->CheckCMP0037(*tn, "when CTest testing is enabled")) { + return; } - gti.CommandLines.push_back(singleLine); - targets.push_back(gti); } + + const char* cmakeCfgIntDir = this->GetCMakeCFGIntDir(); + GlobalTargetInfo gti; + gti.Name = this->GetTestTargetName(); + gti.Message = "Running tests..."; + gti.UsesTerminal = true; + cmCustomCommandLine singleLine; + singleLine.push_back(cmSystemTools::GetCTestCommand()); + singleLine.push_back("--force-new-ctest-process"); + if (cmakeCfgIntDir && *cmakeCfgIntDir && cmakeCfgIntDir[0] != '.') { + singleLine.push_back("-C"); + singleLine.push_back(cmakeCfgIntDir); + } else // TODO: This is a hack. Should be something to do with the + // generator + { + singleLine.push_back("$(ARGS)"); + } + gti.CommandLines.push_back(singleLine); + targets.push_back(gti); } void cmGlobalGenerator::AddGlobalTarget_EditCache( @@ -2582,11 +2653,10 @@ bool cmGlobalGenerator::IsReservedTarget(std::string const& name) // by one or more of the cmake generators. // Adding additional targets to this list will require a policy! - const char* reservedTargets[] = { - "all", "ALL_BUILD", "help", "install", "INSTALL", - "preinstall", "clean", "edit_cache", "rebuild_cache", "test", - "RUN_TESTS", "package", "PACKAGE", "package_source", "ZERO_CHECK" - }; + const char* reservedTargets[] = { "all", "ALL_BUILD", "help", + "install", "INSTALL", "preinstall", + "clean", "edit_cache", "rebuild_cache", + "ZERO_CHECK" }; return std::find(cm::cbegin(reservedTargets), cm::cend(reservedTargets), name) != cm::cend(reservedTargets); diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index c5a5297..8fcb533 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -568,6 +568,9 @@ private: void ClearGeneratorMembers(); + bool CheckCMP0037(std::string const& targetName, + std::string const& reason) const; + void IndexMakefile(cmMakefile* mf); virtual const char* GetBuildIgnoreErrorsFlag() const { return nullptr; } diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index d902ca3..a85a700 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -2299,7 +2299,8 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateUtilityTarget( this->XCodeObjectMap[gtgt] = target; // Add source files without build rules for editing convenience. - if (gtgt->GetType() == cmStateEnums::UTILITY) { + if (gtgt->GetType() == cmStateEnums::UTILITY && + gtgt->GetName() != CMAKE_CHECK_BUILD_SYSTEM_TARGET) { std::vector<cmSourceFile*> sources; if (!gtgt->GetConfigCommonSourceFiles(sources)) { return nullptr; @@ -2716,7 +2717,7 @@ bool cmGlobalXCodeGenerator::CreateGroups( generator->GetGeneratorTargets(); for (auto gtgt : tgts) { // Same skipping logic here as in CreateXCodeTargets so that we do not - // end up with (empty anyhow) ALL_BUILD and XCODE_DEPEND_HELPER source + // end up with (empty anyhow) ZERO_CHECK, install, or test source // groups: // if (gtgt->GetType() == cmStateEnums::GLOBAL_TARGET) { @@ -2725,6 +2726,9 @@ bool cmGlobalXCodeGenerator::CreateGroups( if (gtgt->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } + if (gtgt->GetName() == CMAKE_CHECK_BUILD_SYSTEM_TARGET) { + continue; + } // add the soon to be generated Info.plist file as a source for a // MACOSX_BUNDLE file diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index fbafbf8..43c529c 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -123,6 +123,42 @@ void cmMakefile::IssueMessage(cmake::MessageType t, this->GetCMakeInstance()->IssueMessage(t, text, this->GetBacktrace()); } +bool cmMakefile::CheckCMP0037(std::string const& targetName, + cmStateEnums::TargetType targetType) const +{ + cmake::MessageType messageType = cmake::AUTHOR_WARNING; + std::ostringstream e; + bool issueMessage = false; + switch (this->GetPolicyStatus(cmPolicies::CMP0037)) { + case cmPolicies::WARN: + if (targetType != cmStateEnums::INTERFACE_LIBRARY) { + e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0037) << "\n"; + issueMessage = true; + } + CM_FALLTHROUGH; + case cmPolicies::OLD: + break; + case cmPolicies::NEW: + case cmPolicies::REQUIRED_IF_USED: + case cmPolicies::REQUIRED_ALWAYS: + issueMessage = true; + messageType = cmake::FATAL_ERROR; + break; + } + if (issueMessage) { + e << "The target name \"" << targetName + << "\" is reserved or not valid for certain " + "CMake features, such as generator expressions, and may result " + "in undefined behavior."; + this->IssueMessage(messageType, e.str()); + + if (messageType == cmake::FATAL_ERROR) { + return false; + } + } + return true; +} + cmStringRange cmMakefile::GetIncludeDirectoriesEntries() const { return this->StateSnapshot.GetDirectory().GetIncludeDirectoriesEntries(); diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 7c6cca5..5e7a361 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -741,6 +741,9 @@ public: /** Set whether or not to report a CMP0000 violation. */ void SetCheckCMP0000(bool b) { this->CheckCMP0000 = b; } + bool CheckCMP0037(std::string const& targetName, + cmStateEnums::TargetType targetType) const; + cmStringRange GetIncludeDirectoriesEntries() const; cmBacktraceRange GetIncludeDirectoriesBacktraces() const; cmStringRange GetCompileOptionsEntries() const; diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h index 6c33e2b..f614dca 100644 --- a/Source/cmPolicies.h +++ b/Source/cmPolicies.h @@ -225,6 +225,7 @@ class cmMakefile; F(CMP0021) \ F(CMP0022) \ F(CMP0027) \ + F(CMP0037) \ F(CMP0038) \ F(CMP0041) \ F(CMP0042) \ diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index a01d5d6..87c0f89 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -1937,9 +1937,9 @@ bool cmQtAutoGenerators::RccGenerateFile(const RccJob& rccJob) case cmQtAutoGen::SINGLE: break; case cmQtAutoGen::WRAP: - suffix = this->ConfigSuffix; + suffix = "_CMAKE"; + suffix += this->ConfigSuffix; suffix += "_"; - suffix += this->FilePathChecksum.getPart(rccJob.RccFile, 4); break; case cmQtAutoGen::FULL: suffix = this->ConfigSuffix; diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 0a303b0..1aadf67 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -1602,6 +1602,8 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf) std::string shaderEntryPoint; std::string shaderModel; std::string shaderAdditionalFlags; + std::string shaderDisableOptimizations; + std::string shaderEnableDebug; std::string outputHeaderFile; std::string variableName; std::string settingsGenerator; @@ -1668,6 +1670,16 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf) shaderAdditionalFlags = saf; toolHasSettings = true; } + // Figure out if debug information should be generated + if (const char* sed = sf->GetProperty("VS_SHADER_ENABLE_DEBUG")) { + shaderEnableDebug = cmSystemTools::IsOn(sed) ? "true" : "false"; + toolHasSettings = true; + } + // Figure out if optimizations should be disabled + if (const char* sdo = sf->GetProperty("VS_SHADER_DISABLE_OPTIMIZATIONS")) { + shaderDisableOptimizations = cmSystemTools::IsOn(sdo) ? "true" : "false"; + toolHasSettings = true; + } } else if (ext == "jpg" || ext == "png") { tool = "Image"; } else if (ext == "resw") { @@ -1810,6 +1822,16 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf) this->WriteString("</VariableName>\n", 0); } } + if (!shaderEnableDebug.empty()) { + this->WriteString("<EnableDebuggingInformation>", 3); + (*this->BuildFileStream) << cmVS10EscapeXML(shaderEnableDebug) + << "</EnableDebuggingInformation>\n"; + } + if (!shaderDisableOptimizations.empty()) { + this->WriteString("<DisableOptimizations>", 3); + (*this->BuildFileStream) << cmVS10EscapeXML(shaderDisableOptimizations) + << "</DisableOptimizations>\n"; + } if (!shaderAdditionalFlags.empty()) { this->WriteString("<AdditionalOptions>", 3); (*this->BuildFileStream) << cmVS10EscapeXML(shaderAdditionalFlags) diff --git a/Source/cm_codecvt.cxx b/Source/cm_codecvt.cxx index cf55741..6705851 100644 --- a/Source/cm_codecvt.cxx +++ b/Source/cm_codecvt.cxx @@ -38,12 +38,14 @@ codecvt::codecvt(Encoding e) } } -codecvt::~codecvt(){}; +codecvt::~codecvt() +{ +} bool codecvt::do_always_noconv() const throw() { return m_noconv; -}; +} std::codecvt_base::result codecvt::do_out(mbstate_t& state, const char* from, const char* from_end, @@ -122,7 +124,7 @@ std::codecvt_base::result codecvt::do_out(mbstate_t& state, const char* from, static_cast<void>(to_next); return std::codecvt_base::noconv; #endif -}; +} std::codecvt_base::result codecvt::do_unshift(mbstate_t& state, char* to, char* to_end, @@ -143,7 +145,7 @@ std::codecvt_base::result codecvt::do_unshift(mbstate_t& state, char* to, static_cast<void>(to_end); return std::codecvt_base::ok; #endif -}; +} #if defined(_WIN32) std::codecvt_base::result codecvt::Decode(mbstate_t& state, int size, @@ -235,9 +237,9 @@ void codecvt::BufferPartial(mbstate_t& state, int size, int codecvt::do_max_length() const throw() { return 4; -}; +} int codecvt::do_encoding() const throw() { return 0; -}; +} |