summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Help/command/foreach.rst8
-rw-r--r--Help/variable/CMAKE_INCLUDE_CURRENT_DIR.rst2
-rw-r--r--Help/variable/CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE.rst2
-rw-r--r--Modules/FindCUDA.cmake12
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx2
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx9
7 files changed, 25 insertions, 12 deletions
diff --git a/Help/command/foreach.rst b/Help/command/foreach.rst
index c0f3679..106ba73 100644
--- a/Help/command/foreach.rst
+++ b/Help/command/foreach.rst
@@ -26,14 +26,14 @@ list.
Foreach can also iterate over a generated range of numbers. There are
three types of this iteration:
-* When specifying single number, the range will have elements 0 to
- "total".
+* When specifying single number, the range will have elements [0, ... to
+ "total"] (inclusive).
* When specifying two numbers, the range will have elements from the
- first number to the second number.
+ first number to the second number (inclusive).
* The third optional number is the increment used to iterate from the
- first number to the second number.
+ first number to the second number (inclusive).
::
diff --git a/Help/variable/CMAKE_INCLUDE_CURRENT_DIR.rst b/Help/variable/CMAKE_INCLUDE_CURRENT_DIR.rst
index 6eea322..98d99eb 100644
--- a/Help/variable/CMAKE_INCLUDE_CURRENT_DIR.rst
+++ b/Help/variable/CMAKE_INCLUDE_CURRENT_DIR.rst
@@ -1,7 +1,7 @@
CMAKE_INCLUDE_CURRENT_DIR
-------------------------
-Automatically add the current source- and build directories to the include path.
+Automatically add the current source and build directories to the include path.
If this variable is enabled, CMake automatically adds
:variable:`CMAKE_CURRENT_SOURCE_DIR` and :variable:`CMAKE_CURRENT_BINARY_DIR`
diff --git a/Help/variable/CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE.rst b/Help/variable/CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE.rst
index 5fc95f0..697682b 100644
--- a/Help/variable/CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE.rst
+++ b/Help/variable/CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE.rst
@@ -1,7 +1,7 @@
CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE
--------------------------------------
-Automatically add the current source- and build directories to the
+Automatically add the current source and build directories to the
:prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES` target property.
If this variable is enabled, CMake automatically adds for each shared
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
index 0decbb5..0a31ac2 100644
--- a/Modules/FindCUDA.cmake
+++ b/Modules/FindCUDA.cmake
@@ -585,6 +585,18 @@ mark_as_advanced(
CUDA_SEPARABLE_COMPILATION
)
+# Single config generators like Makefiles or Ninja don't usually have
+# CMAKE_CONFIGURATION_TYPES defined (but note that it can be defined if set by
+# projects or developers). Even CMAKE_BUILD_TYPE might not be defined for
+# single config generators (and should not be defined for multi-config
+# generators). To ensure we get a complete superset of all possible
+# configurations, we combine CMAKE_CONFIGURATION_TYPES, CMAKE_BUILD_TYPE and
+# all of the standard configurations, then weed out duplicates with
+# list(REMOVE_DUPLICATES). Looping over the unique set then ensures we have
+# each configuration-specific set of nvcc flags defined and marked as advanced.
+set(CUDA_configuration_types ${CMAKE_CONFIGURATION_TYPES} ${CMAKE_BUILD_TYPE} Debug MinSizeRel Release RelWithDebInfo)
+list(REMOVE_DUPLICATES CUDA_configuration_types)
+
###############################################################################
###############################################################################
# Locate CUDA, Set Build Type, etc.
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 79d0e6b..3666d5c 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 20180130)
+set(CMake_VERSION_PATCH 20180131)
#set(CMake_VERSION_RC 1)
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 9db21d8..7668fd0 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -176,7 +176,7 @@ cmGlobalGenerator* cmGlobalXCodeGenerator::Factory::CreateGlobalGenerator(
std::string versionFile;
{
std::string out;
- std::string::size_type pos;
+ std::string::size_type pos = 0;
if (cmSystemTools::RunSingleCommand("xcode-select --print-path", &out,
nullptr, nullptr, nullptr,
cmSystemTools::OUTPUT_NONE) &&
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 4555358..e15e833 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -2563,11 +2563,12 @@ void cmVisualStudio10TargetGenerator::WriteClOptions(
}
// If not in debug mode, write the DebugInformationFormat field
- // without value so PDBs don't get generated uselessly.
+ // without value so PDBs don't get generated uselessly. Each tag
+ // goes on its own line because Visual Studio corrects it this
+ // way when saving the project after CMake generates it.
if (!clOptions.IsDebug()) {
- this->WriteString("<DebugInformationFormat>"
- "</DebugInformationFormat>\n",
- 3);
+ this->WriteString("<DebugInformationFormat>\n", 3);
+ this->WriteString("</DebugInformationFormat>\n", 3);
}
// Specify the compiler program database file if configured.