In commit v3.8.0-rc1~304^2 (MSVC: Do not define _DEBUG explicitly when
using /MDd, 2016-11-15) we removed the `_DEBUG` preprocessor definition
from MSVC C and C++ flags because the `cl` compiler automatically
defines it in Debug builds anyway. However, the VS generators propagate
C preprocessor definitions to the RC (Windows Resource Compiler) tool.
This means that we used to explicitly define `_DEBUG` for RC debug
builds. Therefore existing project code may expect the definition to be
there even though the `rc` compiler itself does not implicitly define
`_DEBUG` in debug builds.
Add the `_DEBUG` flag to the default `CMAKE_RC_FLAGS_DEBUG` instead
to restore this definition for RC debug builds. This also makes it
available consistently in VS, Ninja, and Makefile generators.
Fixes: #16745
The VS generators use the C (or CXX) preprocessor definitions for
the Windows Resource Compiler tool. This causes definitions parsed
out of `CMAKE_RC_FLAGS[_<CONFIG>]` variables to be dropped. Fix
the implementation to preserve both.
Issue: #16745
The `TargetExt` for `.vfproj` object libraries should be `.lib`
to match the `OutputFile` value. Otherwise Visual Fortran raises
warnings:
TargetPath(...) does not match the Library's OutputFile
property value (...)
Code extracted from:
https://gitlab.kitware.com/utils/kwsys.git
at commit 34999b6ab815d1456818f4517338a15be7f89ea0 (master).
Upstream Shortlog
-----------------
Daniel Pfeifer (1):
6f43bcef FStream: Make (i|o)fstream::is_open function public
6eb609fd InstallRequiredSystemLibraries: Find VS 2017 redist directory
cf784d9f Add undocumented CMake language means to find VS 2017
082c0375 InstallRequiredSystemLibraries: Split VS 2017 search paths
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !632
The `sysconf(3)` manual explains that the return value can be `-1` for
limits if there is no definite limit. Recognize this case and skip
using the value as a limit candidate. Otherwise we use response files
unconditionally on such systems instead of checking other limits.
Fixes: #16740
Use our undocumented `cmake_host_system_information` query to find the
VS 2017 installation directory by asking the VS installer tool. Then
look relative to that for the redist directory.
Fixes: #16737
Add a query to the `cmake_host_system_information` command to get
the location of a VS 2017 installation. Leave it undocumented and
for internal use for now.
Build id links generation was introduced
in rpm 4.13.0.1 so files related to them
should be ignored as they are not relevant
for the tests.
Fixes#16710
* upstream-KWSys:
KWSys 2017-03-24 (7e9f7b7b)
Resolve conflicts in `.gitattributes` by integrating changes from both
sides. Keep the `our-c-style` attribute that KWSys uses, but drop their
definition of it in favor of ours (Git only allows custom attributes in
the top level anyway). Then add our own attribute line to unset the
`format.clang-format` attribute for KWSys sources since we do not want
to format third-party code ourselves.
Code extracted from:
https://gitlab.kitware.com/utils/kwsys.git
at commit 7e9f7b7bdc8ac54006a40a775867022c4d678b06 (master).
Upstream Shortlog
-----------------
Brad King (3):
0af48083 Drop custom Git whitespace check attribute
6365886c Define a custom Git attribute to mark sources using our C style
d22c2743 clang-format.bash: Use Git attributes to mark files for formatting
Egor Pugin (3):
ce44c58a FStream: Export ReadBOM() from shared library
04e24b2b ConsoleBuf: Remove export macro from BasicConsoleBuf template
858d5edd Encoding: Export CommandLineArguments from shared library
The KWSys `.gitattributes` file now defines custom attributes.
Git does not support these in a subdirectory where we are about
to place the content, so comment them out during import.
This also ensures that the `our-c-style` attribute on KWSys
sources does not activate the `format.clang-format` attribute
on the third-party import branch.
Provide a helper function that import scripts can use when the
third-party project defines custom Git attributes in its top-level
`.gitattributes` file. These must be commented out because Git
does not support custom attributes in a subdirectory where we
where the third-party project is about to be merged.