summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Help/variable/CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE.rst2
-rw-r--r--Modules/CPackRPM.cmake10
-rw-r--r--Modules/CSharpUtilities.cmake32
-rw-r--r--Modules/FindBLAS.cmake33
-rw-r--r--Modules/FindBoost.cmake6
-rw-r--r--Modules/FindGit.cmake16
-rw-r--r--Modules/FindHDF5.cmake12
-rw-r--r--Modules/FindLAPACK.cmake11
-rw-r--r--Modules/FindVulkan.cmake1
-rw-r--r--Modules/FindwxWidgets.cmake12
-rw-r--r--Source/cmGlobalVisualStudioGenerator.cxx4
-rw-r--r--Source/cmLocalGenerator.cxx11
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx13
-rw-r--r--Source/cmNinjaTargetGenerator.cxx12
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_random.c2
15 files changed, 122 insertions, 55 deletions
diff --git a/Help/variable/CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE.rst b/Help/variable/CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE.rst
index 4c04e97..9b59c52 100644
--- a/Help/variable/CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE.rst
+++ b/Help/variable/CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE.rst
@@ -4,7 +4,7 @@ CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE
Visual Studio preferred tool architecture.
The :ref:`Visual Studio Generators` for VS 2013 and above support optional
-selection of a 64-bit toolchain on 64-bit hosts by specifying a ``host=64``
+selection of a 64-bit toolchain on 64-bit hosts by specifying a ``host=x64``
value in the :variable:`CMAKE_GENERATOR_TOOLSET` option. CMake provides
the selected toolchain architecture preference in this variable (either
``x64`` or empty).
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index 722ee15..036875b 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -2141,7 +2141,9 @@ function(cpack_rpm_generate_package)
if(CPACK_RPM_DEBUGINFO_PACKAGE)
# only add current package files to debuginfo list if debuginfo
# generation is enabled for current package
- set(install_files_ "${CPACK_RPM_INSTALL_FILES}")
+ string(STRIP "${CPACK_RPM_INSTALL_FILES}" install_files_)
+ string(REPLACE "\n" ";" install_files_ "${install_files_}")
+ string(REPLACE "\"" "" install_files_ "${install_files_}")
else()
unset(install_files_)
endif()
@@ -2199,7 +2201,11 @@ function(cpack_rpm_generate_package)
cpack_rpm_debugsymbol_check("${install_files_}" "${WDIR}")
else()
- cpack_rpm_debugsymbol_check("${CPACK_RPM_INSTALL_FILES}" "${WDIR}")
+ string(STRIP "${CPACK_RPM_INSTALL_FILES}" install_files_)
+ string(REPLACE "\n" ";" install_files_ "${install_files_}")
+ string(REPLACE "\"" "" install_files_ "${install_files_}")
+
+ cpack_rpm_debugsymbol_check("${install_files_}" "${WDIR}")
endif()
if(TMP_DEBUGINFO_ADDITIONAL_SOURCES)
diff --git a/Modules/CSharpUtilities.cmake b/Modules/CSharpUtilities.cmake
index ddad85a..e9e1510 100644
--- a/Modules/CSharpUtilities.cmake
+++ b/Modules/CSharpUtilities.cmake
@@ -30,7 +30,7 @@ Main functions provided by the module
.. command:: csharp_set_windows_forms_properties
Sets source file properties for use of Windows Forms. Use this, if your CSharp
- target uses windows forms::
+ target uses Windows Forms::
csharp_set_windows_forms_properties([<file1> [<file2> [...]]])
@@ -59,8 +59,10 @@ Main functions provided by the module
.. command:: csharp_set_designer_cs_properties
- Sets source file properties for use of WPF/XAML. Use this, if your CSharp
- target uses WPF/XAML::
+ Sets source file properties of ``.Designer.cs`` files depending on
+ sibling filenames. Use this, if your CSharp target does **not**
+ use Windows Forms (for Windows Forms use
+ :command:`csharp_set_designer_cs_properties` instead)::
csharp_set_designer_cs_properties([<file1> [<file2> [...]]])
@@ -88,10 +90,16 @@ Main functions provided by the module
- VS_CSHARP_DesignTimeSharedInput "True"
- VS_CSHARP_DependentUpon <settings-filename>
+.. note::
+
+ Because the source file properties of the ``.Designer.cs`` file are set according
+ to the found matches and every match sets the **VS_CSHARP_DependentUpon**
+ property, there should only be one match for each ``Designer.cs`` file.
+
.. command:: csharp_set_xaml_cs_properties
- Sets source file properties for use of WPF/XAML. Use this, if your
- CSharp target uses WPF/XAML::
+ Sets source file properties for use of Windows Presentation Foundation (WPF) and
+ XAML. Use this, if your CSharp target uses WPF/XAML::
csharp_set_xaml_cs_properties([<file1> [<file2> [...]]])
@@ -101,7 +109,7 @@ Main functions provided by the module
``.xaml``, and ``.xaml.cs`` extensions).
In the list of all given files for all files ending with
- ``.xaml.cs`` is searched. For every xaml file, a file
+ ``.xaml.cs`` is searched. For every *xaml-cs* file, a file
with the same base name but extension ``.xaml`` is searched.
If a match is found, the source file properties of the ``.xaml.cs``
file are set:
@@ -120,10 +128,10 @@ Helper functions which are used by the above ones
csharp_get_filename_keys(OUT [<file1> [<file2> [...]]])
``OUT``
- name of the variable in which the list of keys is stored
+ Name of the variable in which the list of keys is stored
``<fileN>``
- filename as given to to CSharp target using :command:`add_library`
+ filename(s) as given to to CSharp target using :command:`add_library`
or :command:`add_executable`
In some way the function applies a canonicalization to the source names.
@@ -146,14 +154,14 @@ Helper functions which are used by the above ones
.. command:: csharp_get_filename_key_base
- Returns the full filepath and name **withouth** extension of a key.
+ Returns the full filepath and name **without** extension of a key.
KEY is expected to be a key from csharp_get_filename_keys. In BASE
the value of KEY without the file extension is returned::
csharp_get_filename_key_base(BASE KEY)
``BASE``
- The computed "base" of ``KEY``.
+ Name of the variable with the computed "base" of ``KEY``.
``KEY``
The key of which the base will be computed. Expected to be a
@@ -167,10 +175,10 @@ Helper functions which are used by the above ones
csharp_get_dependentupon_name(NAME FILE)
``NAME``
- result value
+ Name of the variable with the result value
``FILE``
- filename to convert to DependentUpon value
+ Filename to convert to ``<DependentUpon>`` value
Actually this is only the filename without any path given at the moment.
diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake
index 853a6b4..2684617 100644
--- a/Modules/FindBLAS.cmake
+++ b/Modules/FindBLAS.cmake
@@ -32,13 +32,32 @@
# all the possibilities
# BLA_F95 if set on tries to find the f95 interfaces for BLAS/LAPACK
#
-# ######### ## List of vendors (BLA_VENDOR) valid in this module #
-# Goto,OpenBLAS,ATLAS PhiPACK,CXML,DXML,SunPerf,SCSL,SGIMATH,IBMESSL,
-# Intel10_32 (intel mkl v10 32 bit),Intel10_64lp (intel mkl v10 64 bit,
-# lp thread model, lp64 model), # Intel10_64lp_seq (intel mkl v10 64
-# bit,sequential code, lp64 model), # Intel( older versions of mkl 32
-# and 64 bit), ACML,ACML_MP,ACML_GPU,Apple, NAS, Generic C/CXX should be
-# enabled to use Intel mkl
+# List of vendors (BLA_VENDOR) valid in this module:
+#
+# * Goto
+# * OpenBLAS
+# * ATLAS PhiPACK
+# * CXML
+# * DXML
+# * SunPerf
+# * SCSL
+# * SGIMATH
+# * IBMESSL
+# * Intel10_32 (intel mkl v10 32 bit)
+# * Intel10_64lp (intel mkl v10 64 bit, lp thread model, lp64 model)
+# * Intel10_64lp_seq (intel mkl v10 64 bit, sequential code, lp64 model)
+# * Intel (older versions of mkl 32 and 64 bit)
+# * ACML
+# * ACML_MP
+# * ACML_GPU
+# * Apple
+# * NAS
+# * Generic
+#
+# .. note::
+#
+# C/CXX should be enabled to use Intel mkl
+#
include(${CMAKE_CURRENT_LIST_DIR}/CheckFunctionExists.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/CheckFortranFunctionExists.cmake)
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index e795aad..2886381 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -428,7 +428,7 @@ function(_Boost_GUESS_COMPILER_PREFIX _ret)
set(_boost_COMPILER "-ghs")
elseif("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC")
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.10)
- set(_boost_COMPILER "-vc150")
+ set(_boost_COMPILER "-vc141")
elseif (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19)
set(_boost_COMPILER "-vc140")
elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18)
@@ -742,7 +742,7 @@ function(_Boost_COMPONENT_DEPENDENCIES component _ret)
set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
- elseif(NOT Boost_VERSION VERSION_LESS 106300 AND Boost_VERSION VERSION_LESS 106400)
+ elseif(NOT Boost_VERSION VERSION_LESS 106300 AND Boost_VERSION VERSION_LESS 106500)
set(_Boost_CHRONO_DEPENDENCIES system)
set(_Boost_CONTEXT_DEPENDENCIES thread chrono system date_time)
set(_Boost_COROUTINE_DEPENDENCIES context system)
@@ -963,7 +963,7 @@ else()
# _Boost_COMPONENT_HEADERS. See the instructions at the top of
# _Boost_COMPONENT_DEPENDENCIES.
set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS}
- "1.63.0" "1.63" "1.62.0" "1.62" "1.61.0" "1.61" "1.60.0" "1.60"
+ "1.64.0" "1.64" "1.63.0" "1.63" "1.62.0" "1.62" "1.61.0" "1.61" "1.60.0" "1.60"
"1.59.0" "1.59" "1.58.0" "1.58" "1.57.0" "1.57" "1.56.0" "1.56" "1.55.0" "1.55"
"1.54.0" "1.54" "1.53.0" "1.53" "1.52.0" "1.52" "1.51.0" "1.51"
"1.50.0" "1.50" "1.49.0" "1.49" "1.48.0" "1.48" "1.47.0" "1.47" "1.46.1"
diff --git a/Modules/FindGit.cmake b/Modules/FindGit.cmake
index b830c08..fae31eb 100644
--- a/Modules/FindGit.cmake
+++ b/Modules/FindGit.cmake
@@ -43,12 +43,26 @@ if(CMAKE_HOST_WIN32)
endif()
endif()
+# First search the PATH and specific locations.
find_program(GIT_EXECUTABLE
NAMES ${git_names}
PATHS ${github_path} ${_git_sourcetree_path}
- PATH_SUFFIXES Git/cmd Git/bin
DOC "Git command line client"
)
+
+if(CMAKE_HOST_WIN32)
+ # Now look for installations in Git/ directories under typical installation
+ # prefixes on Windows. Exclude PATH from this search because VS 2017's
+ # command prompt happens to have a PATH entry with a Git/ subdirectory
+ # containing a minimal git not meant for general use.
+ find_program(GIT_EXECUTABLE
+ NAMES ${git_names}
+ PATH_SUFFIXES Git/cmd Git/bin
+ NO_SYSTEM_ENVIRONMENT_PATH
+ DOC "Git command line client"
+ )
+endif()
+
mark_as_advanced(GIT_EXECUTABLE)
unset(git_names)
diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index 65a825d..2a81da6 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -89,7 +89,11 @@
#
# The following variable can be set to guide the search for HDF5 libraries and includes:
#
-# HDF5_ROOT
+# ``HDF5_ROOT``
+# Specify the path to the HDF5 installation to use.
+#
+# ``HDF5_NO_FIND_PACKAGE_CONFIG_FILE``
+# Set to a true value to skip trying to find ``hdf5-config.cmake``.
# This module is maintained by Will Dicharry <wdicharry@stellarscience.com>.
@@ -352,7 +356,7 @@ macro( _HDF5_parse_compile_line
list(APPEND ${include_paths} "${CMAKE_MATCH_1}")
elseif("${arg}" MATCHES "^-D(.*)$")
# compile definition
- list(APPEND ${definitions} "${CMAKE_MATCH_1}")
+ list(APPEND ${definitions} "-D${CMAKE_MATCH_1}")
elseif("${arg}" MATCHES "^-L(.*)$")
# library search path
list(APPEND ${library_paths} "${CMAKE_MATCH_1}")
@@ -390,7 +394,7 @@ else()
endif()
# Try to find HDF5 using an installed hdf5-config.cmake
-if(NOT HDF5_FOUND)
+if(NOT HDF5_FOUND AND NOT HDF5_NO_FIND_PACKAGE_CONFIG_FILE)
find_package(HDF5 QUIET NO_MODULE
HINTS ${HDF5_ROOT}
${_HDF5_SEARCH_OPTS}
@@ -520,7 +524,7 @@ if(NOT HDF5_FOUND)
foreach(L IN LISTS HDF5_${__lang}_LIBRARY_NAMES)
set(_HDF5_SEARCH_NAMES_LOCAL)
- if(x"${L}" MATCHES "hdf5")
+ if("x${L}" MATCHES "hdf5")
# hdf5 library
set(_HDF5_SEARCH_OPTS_LOCAL ${_HDF5_SEARCH_OPTS})
if(UNIX AND HDF5_USE_STATIC_LIBRARIES)
diff --git a/Modules/FindLAPACK.cmake b/Modules/FindLAPACK.cmake
index fe6af91..a451e6c 100644
--- a/Modules/FindLAPACK.cmake
+++ b/Modules/FindLAPACK.cmake
@@ -33,8 +33,15 @@
# all the possibilities
# BLA_F95 if set on tries to find the f95 interfaces for BLAS/LAPACK
#
-# ## List of vendors (BLA_VENDOR) valid in this module # Intel(mkl),
-# OpenBLAS, ACML,Apple, NAS, Generic
+# List of vendors (BLA_VENDOR) valid in this module:
+#
+# * Intel(mkl)
+# * OpenBLAS
+# * ACML
+# * Apple
+# * NAS
+# * Generic
+#
set(_lapack_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
diff --git a/Modules/FindVulkan.cmake b/Modules/FindVulkan.cmake
index 0be9f97..1f4c8ad 100644
--- a/Modules/FindVulkan.cmake
+++ b/Modules/FindVulkan.cmake
@@ -48,6 +48,7 @@ if(WIN32)
PATHS
"$ENV{VULKAN_SDK}/Lib32"
"$ENV{VULKAN_SDK}/Bin32"
+ NO_SYSTEM_ENVIRONMENT_PATH
)
endif()
else()
diff --git a/Modules/FindwxWidgets.cmake b/Modules/FindwxWidgets.cmake
index 77091f4..d30d35f 100644
--- a/Modules/FindwxWidgets.cmake
+++ b/Modules/FindwxWidgets.cmake
@@ -498,15 +498,17 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
set(_WX_TOOL gcc)
elseif(MSVC)
set(_WX_TOOL vc)
- if(MSVC14)
+ if(MSVC_VERSION EQUAL 1910)
+ set(_WX_TOOLVER 141)
+ elseif(MSVC_VERSION EQUAL 1900)
set(_WX_TOOLVER 140)
- elseif(MSVC12)
+ elseif(MSVC_VERSION EQUAL 1800)
set(_WX_TOOLVER 120)
- elseif(MSVC11)
+ elseif(MSVC_VERSION EQUAL 1700)
set(_WX_TOOLVER 110)
- elseif(MSVC10)
+ elseif(MSVC_VERSION EQUAL 1600)
set(_WX_TOOLVER 100)
- elseif(MSVC90)
+ elseif(MSVC_VERSION EQUAL 1500)
set(_WX_TOOLVER 90)
endif()
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index cc2536c..ced0c26 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -750,6 +750,10 @@ bool cmGlobalVisualStudioGenerator::TargetIsCSharpOnly(
if (!gt->GetConfigCommonSourceFiles(sources)) {
return false;
}
+ // Only "real" targets are allowed to be C# targets.
+ if (gt->Target->GetType() > cmStateEnums::OBJECT_LIBRARY) {
+ return false;
+ }
}
gt->GetLanguages(languages, "");
if (languages.size() == 1) {
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 44c390c..7077bbb 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -214,14 +214,7 @@ void cmLocalGenerator::TraceDependencies()
void cmLocalGenerator::GenerateTestFiles()
{
- std::string file = this->StateSnapshot.GetDirectory().GetCurrentBinary();
- file += "/";
- file += "CTestTestfile.cmake";
-
if (!this->Makefile->IsOn("CMAKE_TESTING_ENABLED")) {
- if (cmSystemTools::FileExists(file)) {
- cmSystemTools::RemoveFile(file);
- }
return;
}
@@ -230,6 +223,10 @@ void cmLocalGenerator::GenerateTestFiles()
const std::string& config =
this->Makefile->GetConfigurations(configurationTypes, false);
+ std::string file = this->StateSnapshot.GetDirectory().GetCurrentBinary();
+ file += "/";
+ file += "CTestTestfile.cmake";
+
cmGeneratedFileStream fout(file.c_str());
fout.SetCopyIfDifferent(true);
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index b172478..4fc664d 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -753,11 +753,10 @@ void cmNinjaNormalTargetGenerator::WriteDeviceLinkStatement()
cmGlobalNinjaGenerator& globalGen = *this->GetGlobalGenerator();
- int commandLineLengthLimit = -1;
- if (!this->ForceResponseFile()) {
- commandLineLengthLimit = calculateCommandLineLengthLimit(
- globalGen.GetRuleCmdLength(this->LanguageLinkerDeviceRule()));
- }
+ // Device linking currently doesn't support response files so
+ // do not check if the user has explicitly forced a response file.
+ int const commandLineLengthLimit = calculateCommandLineLengthLimit(
+ globalGen.GetRuleCmdLength(this->LanguageLinkerDeviceRule()));
const std::string rspfile =
std::string(cmake::GetCMakeFilesDirectoryPostSlash()) +
@@ -1048,8 +1047,10 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
}
cmGlobalNinjaGenerator& globalGen = *this->GetGlobalGenerator();
+ bool const lang_supports_response =
+ !(this->TargetLinkLanguage == "RC" || this->TargetLinkLanguage == "CUDA");
int commandLineLengthLimit = -1;
- if (!this->ForceResponseFile()) {
+ if (!lang_supports_response || !this->ForceResponseFile()) {
commandLineLengthLimit = calculateCommandLineLengthLimit(
globalGen.GetRuleCmdLength(this->LanguageLinkerRule()));
}
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index b1f26e4..d57b8f7 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -405,7 +405,8 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang)
std::string rspcontent;
std::string responseFlag;
- if (lang != "RC" && this->ForceResponseFile()) {
+ bool const lang_supports_response = !(lang == "RC" || lang == "CUDA");
+ if (lang_supports_response && this->ForceResponseFile()) {
rspfile = "$RSP_FILE";
responseFlag = "@" + rspfile;
rspcontent = " $DEFINES $INCLUDES $FLAGS";
@@ -930,9 +931,10 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement(
this->SetMsvcTargetPdbVariable(vars);
- bool const isRC = (language == "RC");
+ bool const lang_supports_response =
+ !(language == "RC" || language == "CUDA");
int const commandLineLengthLimit =
- ((!isRC && this->ForceResponseFile())) ? -1 : 0;
+ ((lang_supports_response && this->ForceResponseFile())) ? -1 : 0;
std::string const rspfile = objectFileName + ".rsp";
this->GetGlobalGenerator()->WriteBuild(
@@ -978,7 +980,9 @@ void cmNinjaTargetGenerator::WriteTargetDependInfo(std::string const& lang)
lang, this->GetConfigName());
for (std::vector<std::string>::iterator i = includes.begin();
i != includes.end(); ++i) {
- tdi_include_dirs.append(*i);
+ // Convert the include directories the same way we do for -I flags.
+ // See upstream ninja issue 1251.
+ tdi_include_dirs.append(this->ConvertToNinjaPath(*i));
}
Json::Value& tdi_linked_target_dirs = tdi["linked-target-dirs"] =
diff --git a/Utilities/cmlibarchive/libarchive/archive_random.c b/Utilities/cmlibarchive/libarchive/archive_random.c
index a20b9b1..fcea6c6 100644
--- a/Utilities/cmlibarchive/libarchive/archive_random.c
+++ b/Utilities/cmlibarchive/libarchive/archive_random.c
@@ -222,7 +222,7 @@ arc4_stir(void)
* Discard early keystream, as per recommendations in:
* "(Not So) Random Shuffles of RC4" by Ilya Mironov.
*/
- for (i = 0; i < 1024; i++)
+ for (i = 0; i < 3072; i++)
(void)arc4_getbyte();
arc4_count = 1600000;
}