diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CMakeVersion.cmake | 2 | ||||
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 6 | ||||
-rw-r--r-- | Source/cmIDEOptions.cxx | 5 | ||||
-rw-r--r-- | Source/cmIDEOptions.h | 2 | ||||
-rw-r--r-- | Source/cmLocalVisualStudio7Generator.cxx | 10 | ||||
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 12 | ||||
-rw-r--r-- | Source/cmVisualStudioGeneratorOptions.cxx | 5 | ||||
-rw-r--r-- | Source/kwsys/FStream.hxx.in | 4 |
8 files changed, 32 insertions, 14 deletions
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 8d56b82..e88a12b 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 8) -set(CMake_VERSION_PATCH 20170328) +set(CMake_VERSION_PATCH 20170330) #set(CMake_VERSION_RC 1) diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 39f7b8f..42dd997 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -3117,10 +3117,14 @@ bool cmGlobalXCodeGenerator::CreateXCodeObjects( this->CreateString(this->GeneratorToolset)); } if (this->GetLanguageEnabled("Swift")) { - std::string swiftVersion = "2.3"; + std::string swiftVersion; if (const char* vers = this->CurrentMakefile->GetDefinition( "CMAKE_Swift_LANGUAGE_VERSION")) { swiftVersion = vers; + } else if (this->XcodeVersion >= 83) { + swiftVersion = "3.0"; + } else { + swiftVersion = "2.3"; } buildSettings->AddAttribute("SWIFT_VERSION", this->CreateString(swiftVersion)); diff --git a/Source/cmIDEOptions.cxx b/Source/cmIDEOptions.cxx index 1c0a99e..bda6b75 100644 --- a/Source/cmIDEOptions.cxx +++ b/Source/cmIDEOptions.cxx @@ -150,6 +150,11 @@ void cmIDEOptions::AddDefines(const std::vector<std::string>& defines) this->Defines.insert(this->Defines.end(), defines.begin(), defines.end()); } +std::vector<std::string> const& cmIDEOptions::GetDefines() const +{ + return this->Defines; +} + void cmIDEOptions::AddFlag(const char* flag, const char* value) { this->FlagMap[flag] = value; diff --git a/Source/cmIDEOptions.h b/Source/cmIDEOptions.h index 465cf2c..11f8aba 100644 --- a/Source/cmIDEOptions.h +++ b/Source/cmIDEOptions.h @@ -24,6 +24,8 @@ public: void AddDefine(const std::string& define); void AddDefines(const char* defines); void AddDefines(const std::vector<std::string>& defines); + std::vector<std::string> const& GetDefines() const; + void AddFlag(const char* flag, const char* value); void AddFlag(const char* flag, std::vector<std::string> const& value); void AppendFlag(std::string const& flag, std::string const& value); diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 7c33821..3117ef3 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -746,11 +746,13 @@ void cmLocalVisualStudio7Generator::WriteConfiguration( if (this->FortranProject) { // Intel Fortran >= 15.0 uses TargetName property. - std::string targetNameFull = target->GetFullName(configName); - std::string targetName = + std::string const targetNameFull = target->GetFullName(configName); + std::string const targetName = cmSystemTools::GetFilenameWithoutLastExtension(targetNameFull); - std::string targetExt = - cmSystemTools::GetFilenameLastExtension(targetNameFull); + std::string const targetExt = + target->GetType() == cmStateEnums::OBJECT_LIBRARY + ? ".lib" + : cmSystemTools::GetFilenameLastExtension(targetNameFull); /* clang-format off */ fout << "\t\t\tTargetName=\"" << this->EscapeForXML(targetName) << "\"\n" diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 84767a8..9c9296e 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -2402,6 +2402,11 @@ bool cmVisualStudio10TargetGenerator::ComputeRcOptions( std::string(this->Makefile->GetSafeDefinition(rcConfigFlagsVar)); rcOptions.Parse(flags.c_str()); + + // For historical reasons, add the C preprocessor defines to RC. + Options& clOptions = *(this->ClOptions[configName]); + rcOptions.AddDefines(clOptions.GetDefines()); + this->RcOptions[configName] = pOptions.release(); return true; } @@ -2414,12 +2419,9 @@ void cmVisualStudio10TargetGenerator::WriteRCOptions( } this->WriteString("<ResourceCompile>\n", 2); - // Preprocessor definitions and includes are shared with clOptions. - Options& clOptions = *(this->ClOptions[configName]); - clOptions.OutputPreprocessorDefinitions(*this->BuildFileStream, " ", - "\n", "RC"); - Options& rcOptions = *(this->RcOptions[configName]); + rcOptions.OutputPreprocessorDefinitions(*this->BuildFileStream, " ", + "\n", "RC"); rcOptions.AppendFlag("AdditionalIncludeDirectories", includes); rcOptions.AppendFlag("AdditionalIncludeDirectories", "%(AdditionalIncludeDirectories)"); diff --git a/Source/cmVisualStudioGeneratorOptions.cxx b/Source/cmVisualStudioGeneratorOptions.cxx index 1ca6b9c..abc4924 100644 --- a/Source/cmVisualStudioGeneratorOptions.cxx +++ b/Source/cmVisualStudioGeneratorOptions.cxx @@ -1,5 +1,6 @@ #include "cmVisualStudioGeneratorOptions.h" +#include "cmAlgorithms.h" #include "cmLocalVisualStudioGenerator.h" #include "cmOutputConverter.h" #include "cmSystemTools.h" @@ -403,8 +404,10 @@ void cmVisualStudioGeneratorOptions::OutputPreprocessorDefinitions( fout << prefix << tag << "=\""; } const char* sep = ""; + std::vector<std::string>::const_iterator de = + cmRemoveDuplicates(this->Defines); for (std::vector<std::string>::const_iterator di = this->Defines.begin(); - di != this->Defines.end(); ++di) { + di != de; ++di) { // Escape the definition for the compiler. std::string define; if (this->Version < cmGlobalVisualStudioGenerator::VS10) { diff --git a/Source/kwsys/FStream.hxx.in b/Source/kwsys/FStream.hxx.in index cf331a5..d4bc6c9 100644 --- a/Source/kwsys/FStream.hxx.in +++ b/Source/kwsys/FStream.hxx.in @@ -170,8 +170,6 @@ template <typename CharType, typename Traits = std::char_traits<CharType> > class basic_ifstream : public std::basic_istream<CharType, Traits>, public basic_efilebuf<CharType, Traits> { - using basic_efilebuf<CharType, Traits>::is_open; - public: typedef typename basic_efilebuf<CharType, Traits>::internal_buffer_type internal_buffer_type; @@ -201,6 +199,8 @@ public: void close() { this->_set_state(this->_close(), this, this); } + using basic_efilebuf<CharType, Traits>::is_open; + internal_buffer_type* rdbuf() const { return this->buf_; } ~basic_ifstream() @KWSYS_NAMESPACE@_FStream_NOEXCEPT { close(); } |