summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake8
-rw-r--r--Modules/CMakeRCInformation.cmake17
-rw-r--r--Modules/FindBoost.cmake1
-rw-r--r--Modules/Platform/Windows-MSVC.cmake3
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx6
-rw-r--r--Source/cmIDEOptions.cxx5
-rw-r--r--Source/cmIDEOptions.h2
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx10
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx12
-rw-r--r--Source/cmVisualStudioGeneratorOptions.cxx5
-rw-r--r--Source/kwsys/FStream.hxx.in4
-rw-r--r--Tests/SwiftMix/ObjCMain.m2
-rw-r--r--Tests/SwiftMix/SwiftMain.swift8
-rw-r--r--Utilities/Sphinx/conf.py.in20
15 files changed, 82 insertions, 23 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index 6fce8e2..1abbc01 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -298,7 +298,13 @@ Id flags: ${testflags} ${CMAKE_${lang}_COMPILER_ID_FLAGS_ALWAYS}
set(id_toolset "")
endif()
if("${lang}" STREQUAL "Swift")
- set(id_lang_version "SWIFT_VERSION = 2.3;")
+ if(CMAKE_Swift_LANGUAGE_VERSION)
+ set(id_lang_version "SWIFT_VERSION = ${CMAKE_Swift_LANGUAGE_VERSION};")
+ elseif(XCODE_VERSION VERSION_GREATER_EQUAL 8.3)
+ set(id_lang_version "SWIFT_VERSION = 3.0;")
+ else()
+ set(id_lang_version "SWIFT_VERSION = 2.3;")
+ endif()
else()
set(id_lang_version "")
endif()
diff --git a/Modules/CMakeRCInformation.cmake b/Modules/CMakeRCInformation.cmake
index 10f2cfb..7ddd297 100644
--- a/Modules/CMakeRCInformation.cmake
+++ b/Modules/CMakeRCInformation.cmake
@@ -17,11 +17,26 @@ set(CMAKE_SYSTEM_AND_RC_COMPILER_INFO_FILE
${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)
-string(STRIP "$ENV{RCFLAGS} ${CMAKE_RC_FLAGS_INIT}" CMAKE_RC_FLAGS_INIT)
+set(CMAKE_RC_FLAGS_INIT "$ENV{RCFLAGS} ${CMAKE_RC_FLAGS_INIT}")
+
+foreach(c "" _DEBUG _RELEASE _MINSIZEREL _RELWITHDEBINFO)
+ string(STRIP "${CMAKE_RC_FLAGS${c}_INIT}" CMAKE_RC_FLAGS${c}_INIT)
+endforeach()
set (CMAKE_RC_FLAGS "${CMAKE_RC_FLAGS_INIT}" CACHE STRING
"Flags for Windows Resource Compiler.")
+if(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
+ set (CMAKE_RC_FLAGS_DEBUG "${CMAKE_RC_FLAGS_DEBUG_INIT}" CACHE STRING
+ "Flags for Windows Resource Compiler during debug builds.")
+ set (CMAKE_RC_FLAGS_MINSIZEREL "${CMAKE_RC_FLAGS_MINSIZEREL_INIT}" CACHE STRING
+ "Flags for Windows Resource Compiler during release builds for minimum size.")
+ set (CMAKE_RC_FLAGS_RELEASE "${CMAKE_RC_FLAGS_RELEASE_INIT}" CACHE STRING
+ "Flags for Windows Resource Compiler during release builds.")
+ set (CMAKE_RC_FLAGS_RELWITHDEBINFO "${CMAKE_RC_FLAGS_RELWITHDEBINFO_INIT}" CACHE STRING
+ "Flags for Windows Resource Compiler during release builds with debug info.")
+endif()
+
# These are the only types of flags that should be passed to the rc
# command, if COMPILE_FLAGS is used on a target this will be used
# to filter out any other flags
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index a6f63f5..2dd08e1 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -746,6 +746,7 @@ function(_Boost_COMPONENT_DEPENDENCIES component _ret)
set(_Boost_CHRONO_DEPENDENCIES system)
set(_Boost_CONTEXT_DEPENDENCIES thread chrono system date_time)
set(_Boost_COROUTINE_DEPENDENCIES context system)
+ set(_Boost_COROUTINE2_DEPENDENCIES context fiber thread chrono system date_time)
set(_Boost_FIBER_DEPENDENCIES context thread chrono system date_time)
set(_Boost_FILESYSTEM_DEPENDENCIES system)
set(_Boost_IOSTREAMS_DEPENDENCIES regex)
diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake
index 31b26b5..e4aca6e 100644
--- a/Modules/Platform/Windows-MSVC.cmake
+++ b/Modules/Platform/Windows-MSVC.cmake
@@ -310,6 +310,9 @@ macro(__windows_compiler_msvc lang)
if(NOT CMAKE_RC_FLAGS_INIT)
string(APPEND CMAKE_RC_FLAGS_INIT " ${_PLATFORM_DEFINES} ${_PLATFORM_DEFINES_${lang}}")
endif()
+ if(NOT CMAKE_RC_FLAGS_DEBUG_INIT)
+ string(APPEND CMAKE_RC_FLAGS_DEBUG_INIT " /D_DEBUG")
+ endif()
enable_language(RC)
set(CMAKE_NINJA_CMCLDEPS_RC 1)
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(); }
diff --git a/Tests/SwiftMix/ObjCMain.m b/Tests/SwiftMix/ObjCMain.m
index 7fa90ae..20f0bf1 100644
--- a/Tests/SwiftMix/ObjCMain.m
+++ b/Tests/SwiftMix/ObjCMain.m
@@ -1,4 +1,4 @@
#import "SwiftMix-Swift.h"
int ObjCMain(int argc, char const* const argv[]) {
- return [SwiftMainClass SwiftMain:argc argv:argv];
+ return [SwiftMainClass SwiftMain];
}
diff --git a/Tests/SwiftMix/SwiftMain.swift b/Tests/SwiftMix/SwiftMain.swift
index 3629ac8..a4a0a62 100644
--- a/Tests/SwiftMix/SwiftMain.swift
+++ b/Tests/SwiftMix/SwiftMain.swift
@@ -1,12 +1,8 @@
import Foundation
@objc class SwiftMainClass : NSObject {
- class func SwiftMain(argc:Int, argv:UnsafePointer<UnsafePointer<CChar>>) -> Int32 {
- dump("argc: \(argc)")
- for (var i = 0; i < argc; ++i) {
- let argi = String.fromCString(argv[i])
- dump("arg[\(i)]: \(argi)");
- }
+ class func SwiftMain() -> Int32 {
+ dump("Hello World!");
return 0;
}
}
diff --git a/Utilities/Sphinx/conf.py.in b/Utilities/Sphinx/conf.py.in
index e3afc78..7878ad2 100644
--- a/Utilities/Sphinx/conf.py.in
+++ b/Utilities/Sphinx/conf.py.in
@@ -54,6 +54,26 @@ html_show_sourcelink = True
html_static_path = ['@conf_path@/static']
html_style = 'cmake.css'
html_theme = 'default'
+html_theme_options = {
+ 'footerbgcolor': '#00182d',
+ 'footertextcolor': '#ffffff',
+ 'sidebarbgcolor': '#e4ece8',
+ 'sidebarbtncolor': '#00a94f',
+ 'sidebartextcolor': '#333333',
+ 'sidebarlinkcolor': '#00a94f',
+ 'relbarbgcolor': '#00529b',
+ 'relbartextcolor': '#ffffff',
+ 'relbarlinkcolor': '#ffffff',
+ 'bgcolor': '#ffffff',
+ 'textcolor': '#444444',
+ 'headbgcolor': '#f2f2f2',
+ 'headtextcolor': '#003564',
+ 'headlinkcolor': '#3d8ff2',
+ 'linkcolor': '#2b63a8',
+ 'visitedlinkcolor': '#2b63a8',
+ 'codebgcolor': '#eeeeee',
+ 'codetextcolor': '#333333',
+}
html_title = 'CMake %s Documentation' % release
html_short_title = '%s Documentation' % release
html_favicon = '@conf_path@/static/cmake-favicon.ico'