diff options
34 files changed, 196 insertions, 88 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/Help/variable/MSVC.rst b/Help/variable/MSVC.rst index 913ed08..22a087a 100644 --- a/Help/variable/MSVC.rst +++ b/Help/variable/MSVC.rst @@ -4,3 +4,5 @@ MSVC ``True`` when using Microsoft Visual C++. Set to ``true`` when the compiler is some version of Microsoft Visual C++. + +See also the :variable:`MSVC_VERSION` variable. diff --git a/Help/variable/MSVC10.rst b/Help/variable/MSVC10.rst index 98e0493..55c6337 100644 --- a/Help/variable/MSVC10.rst +++ b/Help/variable/MSVC10.rst @@ -1,5 +1,7 @@ MSVC10 ------ +Discouraged. Use the :variable:`MSVC_VERSION` variable instead. + ``True`` when using the Microsoft Visual Studio ``v100`` toolset (``cl`` version 16) or another compiler that simulates it. diff --git a/Help/variable/MSVC11.rst b/Help/variable/MSVC11.rst index 42b7b86..17943dc 100644 --- a/Help/variable/MSVC11.rst +++ b/Help/variable/MSVC11.rst @@ -1,5 +1,7 @@ MSVC11 ------ +Discouraged. Use the :variable:`MSVC_VERSION` variable instead. + ``True`` when using the Microsoft Visual Studio ``v110`` toolset (``cl`` version 17) or another compiler that simulates it. diff --git a/Help/variable/MSVC12.rst b/Help/variable/MSVC12.rst index 0648f35..a524fab 100644 --- a/Help/variable/MSVC12.rst +++ b/Help/variable/MSVC12.rst @@ -1,5 +1,7 @@ MSVC12 ------ +Discouraged. Use the :variable:`MSVC_VERSION` variable instead. + ``True`` when using the Microsoft Visual Studio ``v120`` toolset (``cl`` version 18) or another compiler that simulates it. diff --git a/Help/variable/MSVC14.rst b/Help/variable/MSVC14.rst index f67ebc7..79e0c10 100644 --- a/Help/variable/MSVC14.rst +++ b/Help/variable/MSVC14.rst @@ -1,5 +1,7 @@ MSVC14 ------ -``True`` when using the Microsoft Visual Studio ``v140`` toolset -(``cl`` version 19) or another compiler that simulates it. +Discouraged. Use the :variable:`MSVC_VERSION` variable instead. + +``True`` when using the Microsoft Visual Studio ``v140`` or ``v141`` +toolset (``cl`` version 19) or another compiler that simulates it. diff --git a/Help/variable/MSVC60.rst b/Help/variable/MSVC60.rst index 14f09cf..14164bf 100644 --- a/Help/variable/MSVC60.rst +++ b/Help/variable/MSVC60.rst @@ -1,6 +1,8 @@ MSVC60 ------ +Discouraged. Use the :variable:`MSVC_VERSION` variable instead. + ``True`` when using Microsoft Visual C++ 6.0. Set to ``true`` when the compiler is version 6.0 of Microsoft Visual C++. diff --git a/Help/variable/MSVC70.rst b/Help/variable/MSVC70.rst index 76fa96f..ed3b0bb 100644 --- a/Help/variable/MSVC70.rst +++ b/Help/variable/MSVC70.rst @@ -1,6 +1,8 @@ MSVC70 ------ +Discouraged. Use the :variable:`MSVC_VERSION` variable instead. + ``True`` when using Microsoft Visual C++ 7.0. Set to ``true`` when the compiler is version 7.0 of Microsoft Visual C++. diff --git a/Help/variable/MSVC71.rst b/Help/variable/MSVC71.rst index d69d4fc..0237592 100644 --- a/Help/variable/MSVC71.rst +++ b/Help/variable/MSVC71.rst @@ -1,6 +1,8 @@ MSVC71 ------ +Discouraged. Use the :variable:`MSVC_VERSION` variable instead. + ``True`` when using Microsoft Visual C++ 7.1. Set to ``true`` when the compiler is version 7.1 of Microsoft Visual C++. diff --git a/Help/variable/MSVC80.rst b/Help/variable/MSVC80.rst index 0d33e82..1533218 100644 --- a/Help/variable/MSVC80.rst +++ b/Help/variable/MSVC80.rst @@ -1,5 +1,7 @@ MSVC80 ------ +Discouraged. Use the :variable:`MSVC_VERSION` variable instead. + ``True`` when using the Microsoft Visual Studio ``v80`` toolset (``cl`` version 14) or another compiler that simulates it. diff --git a/Help/variable/MSVC90.rst b/Help/variable/MSVC90.rst index 1716e6f..4981ecf 100644 --- a/Help/variable/MSVC90.rst +++ b/Help/variable/MSVC90.rst @@ -1,5 +1,7 @@ MSVC90 ------ +Discouraged. Use the :variable:`MSVC_VERSION` variable instead. + ``True`` when using the Microsoft Visual Studio ``v90`` toolset (``cl`` version 15) or another compiler that simulates it. diff --git a/Help/variable/MSVC_VERSION.rst b/Help/variable/MSVC_VERSION.rst index e2aff3c9..8932147 100644 --- a/Help/variable/MSVC_VERSION.rst +++ b/Help/variable/MSVC_VERSION.rst @@ -13,4 +13,5 @@ Known version numbers are:: 1600 = VS 10.0 1700 = VS 11.0 1800 = VS 12.0 - 1900 = VS 14.0, 15.0 + 1900 = VS 14.0 + 1910 = VS 15.0 diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index 722ee15..e905bc6 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -721,14 +721,6 @@ # Debuginfo packages contain debug symbols and sources for debugging packaged # binaries. # -# .. note:: -# -# Currently multiple debuginfo packages are generated if component based -# packaging is used - one debuginfo package per component. This duplicates -# sources if multiple binaries are using them. This is a side effect of -# how CPackRPM currently generates component packages and will be addressed -# in later versions of the generator. -# # Debuginfo RPM packaging has it's own set of variables: # # .. variable:: CPACK_RPM_DEBUGINFO_PACKAGE @@ -1472,8 +1464,8 @@ function(cpack_rpm_debugsymbol_check INSTALL_FILES WORKING_DIR) string(LENGTH "${CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX}/src_${index_}" debuginfo_dir_len) if(source_dir_len_ LESS debuginfo_dir_len) message(FATAL_ERROR "CPackRPM: source dir path '${source_dir_}' is" - " longer than debuginfo sources dir path '${CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX}/src_${index_}'!" - " Source dir path must be shorter than debuginfo sources dir path." + " shorter than debuginfo sources dir path '${CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX}/src_${index_}'!" + " Source dir path must be longer than debuginfo sources dir path." " Set CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX variable to a shorter value" " or make source dir path longer." " Required for debuginfo packaging. See documentation of" @@ -2141,7 +2133,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 +2193,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..a6f63f5 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) @@ -445,7 +445,7 @@ function(_Boost_GUESS_COMPILER_PREFIX _ret) set(_boost_COMPILER "-vc71") elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13) # Good luck! set(_boost_COMPILER "-vc7") # yes, this is correct - else() # MSVC60 Good luck! + else() # VS 6.0 Good luck! set(_boost_COMPILER "-vc6") # yes, this is correct endif() elseif (BORLAND) @@ -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/FindGTK2.cmake b/Modules/FindGTK2.cmake index 20d7924..fd179a8 100644 --- a/Modules/FindGTK2.cmake +++ b/Modules/FindGTK2.cmake @@ -105,7 +105,7 @@ # * 14236: Detect gthread library # Detect pangocairo on windows # Detect pangocairo with gtk module instead of with gtkmm -# * 14259: Use vc100 libraries with MSVC11 +# * 14259: Use vc100 libraries with VS 11 # * 14260: Export a GTK2_DEFINITIONS variable to set /vd2 when appropriate # (i.e. MSVC) # * Use the optimized/debug syntax for _LIBRARY and _LIBRARIES variables when @@ -352,13 +352,13 @@ function(_GTK2_FIND_LIBRARY _var _lib _expand_vc _append_version) if(_expand_vc AND MSVC) # Add vc80/vc90/vc100 midfixes - if(MSVC80) + if(MSVC_VERSION EQUAL 1400) set(_library ${_library}-vc80) - elseif(MSVC90) + elseif(MSVC_VERSION EQUAL 1500) set(_library ${_library}-vc90) - elseif(MSVC10) + elseif(MSVC_VERSION EQUAL 1600) set(_library ${_library}-vc100) - elseif(MSVC11) + elseif(MSVC_VERSION EQUAL 1700) # Up to gtkmm-win 2.22.0-2 there are no vc110 libraries but vc100 can be used set(_library ${_library}-vc100) endif() 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/FindRuby.cmake b/Modules/FindRuby.cmake index b0e9b47..a9f8d35 100644 --- a/Modules/FindRuby.cmake +++ b/Modules/FindRuby.cmake @@ -207,19 +207,19 @@ set(_RUBY_POSSIBLE_LIB_NAMES ruby ruby-static ruby${_RUBY_VERSION_SHORT} ruby${_ if(WIN32) set( _RUBY_MSVC_RUNTIME "" ) - if( MSVC60 ) + if( MSVC_VERSION EQUAL 1200 ) set( _RUBY_MSVC_RUNTIME "60" ) endif() - if( MSVC70 ) + if( MSVC_VERSION EQUAL 1300 ) set( _RUBY_MSVC_RUNTIME "70" ) endif() - if( MSVC71 ) + if( MSVC_VERSION EQUAL 1310 ) set( _RUBY_MSVC_RUNTIME "71" ) endif() - if( MSVC80 ) + if( MSVC_VERSION EQUAL 1400 ) set( _RUBY_MSVC_RUNTIME "80" ) endif() - if( MSVC90 ) + if( MSVC_VERSION EQUAL 1500 ) set( _RUBY_MSVC_RUNTIME "90" ) endif() 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/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake index 0e90d35..31b26b5 100644 --- a/Modules/Platform/Windows-MSVC.cmake +++ b/Modules/Platform/Windows-MSVC.cmake @@ -78,7 +78,9 @@ if(NOT MSVC_VERSION) set(MSVC90) set(CMAKE_COMPILER_2005) set(CMAKE_COMPILER_SUPPORTS_PDBTYPE) - if(NOT "${_compiler_version}" VERSION_LESS 19) + if(NOT "${_compiler_version}" VERSION_LESS 20) + # We no longer provide per-version variables. Use MSVC_VERSION instead. + elseif(NOT "${_compiler_version}" VERSION_LESS 19) set(MSVC14 1) elseif(NOT "${_compiler_version}" VERSION_LESS 18) set(MSVC12 1) diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index e2b8d4f..8ae8b33 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -2,4 +2,4 @@ set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 8) set(CMake_VERSION_PATCH 0) -set(CMake_VERSION_RC 2) +set(CMake_VERSION_RC 3) 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/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index 334a05a..a5c1a23 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -255,6 +255,27 @@ static void setErrorMessage(std::string* errorMessage, const std::string& text) } } +static bool testHomeDirectory(cmState* state, std::string& value, + std::string* errorMessage) +{ + const std::string cachedValue = + std::string(state->GetCacheEntryValue("CMAKE_HOME_DIRECTORY")); + const std::string suffix = "/CMakeLists.txt"; + const std::string cachedValueCML = cachedValue + suffix; + const std::string valueCML = value + suffix; + if (!cmSystemTools::SameFile(valueCML, cachedValueCML)) { + setErrorMessage(errorMessage, + std::string("\"CMAKE_HOME_DIRECTORY\" is set but " + "incompatible with configured " + "source directory value.")); + return false; + } + if (value.empty()) { + value = cachedValue; + } + return true; +} + static bool testValue(cmState* state, const std::string& key, std::string& value, const std::string& keyDescription, std::string* errorMessage) @@ -314,8 +335,7 @@ bool cmServerProtocol1_0::DoActivate(const cmServerRequest& request, } // check sourcedir: - if (!testValue(state, "CMAKE_HOME_DIRECTORY", sourceDirectory, - "source directory", errorMessage)) { + if (!testHomeDirectory(state, sourceDirectory, errorMessage)) { return false; } diff --git a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake index fc90d09..a5b38fd 100644 --- a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake +++ b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake @@ -205,14 +205,14 @@ if(CPackGen MATCHES "RPM") /usr/foo/bar/non_relocatable/depth_two /usr/foo/bar/non_relocatable/depth_two/symlink_from_non_relocatable_path /usr/foo/bar/other_relocatable -/usr/foo/bar/other_relocatable/depth_two$") +/usr/foo/bar/other_relocatable/depth_two(\n.*\.build-id.*)*$") elseif(check_file_headers_match) set(check_file_match_expected_summary ".*${CPACK_RPM_HEADERS_PACKAGE_SUMMARY}.*") set(check_file_match_expected_description ".*${CPACK_RPM_HEADERS_PACKAGE_DESCRIPTION}.*") set(check_file_match_expected_relocation_path "Relocations${whitespaces}:${whitespaces}${CPACK_PACKAGING_INSTALL_PREFIX}${whitespaces}${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}") set(check_file_match_expected_architecture "noarch") set(spec_regex "*headers*") - set(check_content_list "^/usr/foo/bar\n/usr/foo/bar/include\n/usr/foo/bar/include/mylib.h$") + set(check_content_list "^/usr/foo/bar\n/usr/foo/bar/include\n/usr/foo/bar/include/mylib.h(\n.*\.build-id.*)*$") elseif(check_file_applications_match) set(check_file_match_expected_summary ".*${CPACK_RPM_PACKAGE_SUMMARY}.*") set(check_file_match_expected_description ".*${CPACK_COMPONENT_APPLICATIONS_DESCRIPTION}.*") @@ -221,7 +221,7 @@ if(CPackGen MATCHES "RPM") set(spec_regex "*applications*") set(check_content_list "^/usr/foo/bar /usr/foo/bar/bin -/usr/foo/bar/bin/mylibapp$") +/usr/foo/bar/bin/mylibapp(\n.*\.build-id.*)*$") elseif(check_file_Unspecified_match) set(check_file_match_expected_summary ".*${CPACK_RPM_PACKAGE_SUMMARY}.*") set(check_file_match_expected_description ".*DESCRIPTION.*") @@ -241,7 +241,7 @@ if(CPackGen MATCHES "RPM") /usr/foo/bar/share/man/mylib/man3 /usr/foo/bar/share/man/mylib/man3/mylib.1 /usr/foo/bar/share/man/mylib/man3/mylib.1/mylib -/usr/foo/bar/share/man/mylib/man3/mylib.1/mylib2$") +/usr/foo/bar/share/man/mylib/man3/mylib.1/mylib2(\n.*\.build-id.*)*$") else() message(FATAL_ERROR "error: unexpected rpm package '${check_file}'") endif() diff --git a/Tests/RunCMake/CPack/RPM/Helpers.cmake b/Tests/RunCMake/CPack/RPM/Helpers.cmake index bbc358c8..d8012b1 100644 --- a/Tests/RunCMake/CPack/RPM/Helpers.cmake +++ b/Tests/RunCMake/CPack/RPM/Helpers.cmake @@ -36,6 +36,10 @@ function(getPackageContentList FILE RESULT_VAR) OUTPUT_STRIP_TRAILING_WHITESPACE) string(REGEX REPLACE "\n" ";" package_content_ "${package_content_}") + # never versions of rpmbuild (introduced in rpm 4.13.0.1) add build_id links + # to packages - tests should ignore them + list(FILTER package_content_ EXCLUDE REGEX ".*\.build-id.*") + set(${RESULT_VAR} "${package_content_}" PARENT_SCOPE) endfunction() diff --git a/Tests/RunCMake/CPack/tests/SOURCE_PACKAGE/VerifyResult.cmake b/Tests/RunCMake/CPack/tests/SOURCE_PACKAGE/VerifyResult.cmake index bc54d79..73d7481 100644 --- a/Tests/RunCMake/CPack/tests/SOURCE_PACKAGE/VerifyResult.cmake +++ b/Tests/RunCMake/CPack/tests/SOURCE_PACKAGE/VerifyResult.cmake @@ -21,7 +21,9 @@ execute_process(COMMAND ${RPMBUILD_EXECUTABLE} --define "_topdir ${CMAKE_CURRENT set(output_error_message_ "\n${RPMBUILD_EXECUTABLE} error: '${error_}';\nresult: '${result_}';\n${output_error_message}") -set(EXPECTED_FILE_CONTENT_ "^/foo${whitespaces_}/foo/test_prog$") +# expected file content are test_prog and optional build-id links that are +# generated by rpmbuild (introduced in rpm 4.13.0.1) +set(EXPECTED_FILE_CONTENT_ "^/foo${whitespaces_}/foo/test_prog(${whitespaces_}.*\.build-id.*)*$") file(GLOB_RECURSE FOUND_FILE_ RELATIVE "${CMAKE_CURRENT_BINARY_DIR}/test_rpm/RPMS" "${CMAKE_CURRENT_BINARY_DIR}/test_rpm/RPMS/*.rpm") list(APPEND foundFiles_ "${FOUND_FILE_}") 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; } |