Commit Graph

24924 Commits

Author SHA1 Message Date
Brad King
eba2b13a83 Merge topic 'msvc-link-non-english'
7e359823c9 MSVC: Preserve linker output encoding
b7e7718a38 MSVC: Fix manifest resource encoding

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2261
2018-08-10 11:01:11 -04:00
Kitware Robot
292542d207 CMake Nightly Date Stamp 2018-08-10 00:01:11 -04:00
Justin Goshi
7e359823c9 MSVC: Preserve linker output encoding
When using the Ninja or Makefile generator with MSVC on Windows
we invoke the linker through a `cmake -E vs_link_{exe,dll}` wrapper.
Preserve the linker output encoding to match `link.exe` behavior
instead of forcing UTF-8.
2018-08-09 11:06:12 -04:00
Justin Goshi
b7e7718a38 MSVC: Fix manifest resource encoding
When using the Ninja or Makefile generator with MSVC on Windows
we invoke the resource compiler (`rc.exe`) to compile a manifest
resource.  CMake generates the file with UTF-8 encoding so we
need to add a pragma to inform the resource compiler.
2018-08-09 11:03:10 -04:00
Brad King
75844dd609 Merge topic 'cleanup-find-cstr'
69ca85cc7f Remove unnecessary c_str() in RegularExpression::find calls

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2271
2018-08-09 08:00:03 -04:00
Brad King
34334c098f Merge topic 'cmGeneratedFileStream_string'
b6802cd506 cmGeneratedFileStream: clang-tidy applied to remove redundant ``c_str`` calls
a688defcc6 cmGeneratedFileStream: Use ``std::string const&`` instead of ``const char*``

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2266
2018-08-09 07:59:23 -04:00
Brad King
575f06e48c Merge topic 'update-kwsys'
ba872ea9c3 Merge branch 'upstream-KWSys' into update-kwsys
4d76239a51 KWSys 2018-08-07 (9044518f)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2268
2018-08-09 07:53:49 -04:00
Brad King
1c773b5d3a Merge topic 'iwyu-std-hash'
aefb8559dc IWYU: Fix workaround mapping for std::hash

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2267
2018-08-09 07:52:39 -04:00
Kitware Robot
e1e9e0697b CMake Nightly Date Stamp 2018-08-09 00:01:05 -04:00
Kitware Robot
708dcbfdf5 CMake Nightly Date Stamp 2018-08-08 00:01:06 -04:00
Vitaly Stakhovsky
69ca85cc7f Remove unnecessary c_str() in RegularExpression::find calls 2018-08-07 15:28:24 -04:00
Brad King
aefb8559dc IWYU: Fix workaround mapping for std::hash
It is provided by `functional`, not `utility`.  Fix the mapping added by
commit 276d3c7afe (IWYU: Add workaround mapping for std::hash,
2018-07-31).  Also generalize the workaround from commit v3.12.0-rc1~39^2~1
(IWYU: Define a macro to tell code it is preprocessing for iwyu,
2018-05-25) to allow local builds to configure specific flags.  This
is needed because iwyu behaves differently in different environments.
2018-08-07 12:04:58 -04:00
Sebastian Holtermann
b6802cd506 cmGeneratedFileStream: clang-tidy applied to remove redundant `c_str` calls
After changing the ``cmGeneratedFileStream`` methods to accept
``std::string const&`` instead of ``const char*`` we don't
need to call ``std::string::c_str`` anymore when passing
a ``std::string`` to a ``cmGeneratedFileStream`` method.

This patch removes all redundant ``std::string::c_str``
calls when passing a string to a ``cmGeneratedFileStream`` method.

It was generated by building CMake with clang-tidy enabled using
the following options:

-DCMAKE_CXX_CLANG_TIDY=/usr/bin/clang-tidy-4.0;-checks=-*,readability-redundant-string-cstr;-fix;-fix-errors
2018-08-07 17:02:39 +02:00
Sebastian Holtermann
a688defcc6 cmGeneratedFileStream: Use `std::string const& instead of const char*` 2018-08-07 16:57:40 +02:00
Craig Scott
d7a52f8c24 Merge topic 'productbuild-merge-output'
496d22b8cc productbuild: Capture stderr too in CPackProductBuild logs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2257
2018-08-07 09:17:26 -04:00
Brad King
ba872ea9c3 Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2018-08-07 (9044518f)
2018-08-07 07:16:09 -04:00
Kitware Robot
90df5f6730 CMake Nightly Date Stamp 2018-08-07 00:01:05 -04:00
Brad King
1d76991a41 Merge topic 'autogen_single_entry'
87e7904c91 Autogen: Use a single AUTOGEN  setup function in cmGlobalGenerator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2260
2018-08-06 08:43:54 -04:00
Brad King
d7a1bcd2e6 Merge topic 'xcode_schemes_config'
6b7f1e1db0 Xcode: Add variables and properties to configure schemes
39c91d0703 cmGlobalGenerator: Add IsXcode query

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1803
2018-08-06 08:25:50 -04:00
Brad King
117d9f5570 Merge topic 'check-unique_ptr-pgi'
3a2c736b41 Extend C++17/C++14 feature checks to require unique_ptr

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2252
2018-08-06 08:19:40 -04:00
Brad King
e19453d8ec Merge topic 'file-WRITE-chmod'
bdd0174df1 file(WRITE): Avoid toggling permissions between 644 and 664

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2246
2018-08-06 07:55:24 -04:00
Muhammad Ismail Soboute
496d22b8cc productbuild: Capture stderr too in CPackProductBuild logs
Stdout and stderr will be merged.

Fixes: #18234
2018-08-06 21:27:51 +10:00
Kitware Robot
d1d5709503 CMake Nightly Date Stamp 2018-08-06 00:01:16 -04:00
Kitware Robot
85fcad7e63 CMake Nightly Date Stamp 2018-08-05 00:01:09 -04:00
Kitware Robot
0dc85598a1 CMake Nightly Date Stamp 2018-08-04 00:01:10 -04:00
Sebastian Holtermann
87e7904c91 Autogen: Use a single AUTOGEN setup function in cmGlobalGenerator
By moving all AUTOGEN setup code in ``cmGlobalGenerator``
into a single ``cmGlobalGenerator::QtAutoGen`` function, the
``cmGlobalGenerator::Compute`` function becomes cleaner.
2018-08-03 12:55:50 +02:00
Kitware Robot
ce309b624a CMake Nightly Date Stamp 2018-08-03 00:01:05 -04:00
Kitware Robot
a1d130688c CMake Nightly Date Stamp 2018-08-02 00:01:13 -04:00
Brad King
3a2c736b41 Extend C++17/C++14 feature checks to require unique_ptr
When testing compiler modes higher than C++11 for constructs we need,
include a check for using `unique_ptr` in that mode.  The PGI 18.4
compiler in some environments supports `unique_ptr` in C++11 mode
but is broken for C++14 and C++17.  Check that `unique_ptr` works
in these modes before using one.
2018-08-01 14:03:43 -04:00
Gregor Jasny
6b7f1e1db0 Xcode: Add variables and properties to configure schemes
Add `XCODE_SCHEME_*` target properties and associated variables
`CMAKE_XCODE_SCHEME_*` to initialize them on target creation.
Map each target property value to an associated Xcode scheme entry.

Co-Author: Martin Sander <mail@martin-sander.de>
Fixes: #17919
2018-08-01 09:12:42 -04:00
Brad King
39c91d0703 cmGlobalGenerator: Add IsXcode query
Make it easy to detect use of the Xcode generator.
2018-08-01 09:12:42 -04:00
David Faure
bdd0174df1 file(WRITE): Avoid toggling permissions between 644 and 664
On systems with umask 022, this function would set permissions
to 664 and restore them to 644 at the end, every single time it was
called (which is many times on e.g. install_manifest.txt).

The intent of the code was to make non-writable files temporarily
writable and to restore permissions in the end, but really, if it's
already user-writable there's no point in toggling this back and forth.
2018-08-01 09:05:33 -04:00
Brad King
9187d1c41a Merge topic 'gcc-8-warnings'
276d3c7afe IWYU: Add workaround mapping for std::hash
72f57845d3 cmXMLParser: Avoid -Wconversion warning
34257b0dd4 LexerParser: Suppress GCC -Wconversion warnings
cfa6b14f9c cmGlobalGenerator: Avoid -Wstringop-truncation warning
9df0e1f98a cmCommandArgumentParserHelper: Avoid -Wstringop-truncation warning
b6d116e240 cmCursesLongMessageForm: Avoid -Wstringop-overflow warning

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2244
2018-08-01 07:20:37 -04:00
Kitware Robot
0ac02edcc3 CMake Nightly Date Stamp 2018-08-01 00:01:07 -04:00
Brad King
276d3c7afe IWYU: Add workaround mapping for std::hash
When using GCC 8's standard library IWYU thinks that `<system_error>`
must be included to get `std::hash`.  Add a mapping for `<utility>`.
2018-07-31 09:34:55 -04:00
Brad King
72f57845d3 cmXMLParser: Avoid -Wconversion warning
Add an explicit cast since we expect the conversion to be well within
range.
2018-07-31 09:34:55 -04:00
Brad King
34257b0dd4 LexerParser: Suppress GCC -Wconversion warnings
GCC 8 warns about some of the conversions in bison-generated code.
Suppress the warnings.
2018-07-31 09:34:55 -04:00
Brad King
cfa6b14f9c cmGlobalGenerator: Avoid -Wstringop-truncation warning
Use `memcpy` instead of `strncpy` to copy bytes into a buffer that
is not intended to be null terminated.
2018-07-31 09:34:55 -04:00
Brad King
9df0e1f98a cmCommandArgumentParserHelper: Avoid -Wstringop-truncation warning
Use `memcpy` instead of `strncpy` to copy bytes from a buffer that
may not be null terminated.
2018-07-31 09:34:00 -04:00
Brad King
b6d116e240 cmCursesLongMessageForm: Avoid -Wstringop-overflow warning
We use `strncpy` to copy the title up to a maximum number of
characters.  GCC 8's `-Wstringop-overflow` warns that the length
depends on the input length because it fails to recognize that we
are bounding it to the buffer size too.  Update the code to hide
the dependence on the input length.
2018-07-31 08:52:59 -04:00
Brad King
c31d9f1c30 Merge topic 'autogen_refactor_initialization'
7bb70054e4 Autogen: Add test for Q_OS_ macros
f345135845 Autogen: For Qt5 pass all implicit include directories to moc
2d6cfe2677 Autogen: Split initializer main method
84bdae8895 Autogen: Compute variables in Init stage instead of Setup stage
8e0d70272d Autogen: Move info file write code into methods
5776639fbf Autogen: Pass absolute include path in info file
2e9199b291 cmLocalGenerator: Respect user requested implicit include directories order

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2230
2018-07-31 08:08:05 -04:00
Kitware Robot
398ce17fac CMake Nightly Date Stamp 2018-07-31 00:01:05 -04:00
Sebastian Holtermann
f345135845 Autogen: For Qt5 pass all implicit include directories to moc
For Qt4 it was not possible to pass all compiler implicit include
directories to moc because it couldn't handle some system headers.
For reference see commit 753b905ec8,
commit d2536579d5 and
[QTBUG-28045](https://bugreports.qt.io/browse/QTBUG-28045).

For Qt5's moc the problem does not persist anymore so we can
(and should) pass all implicit include directories to moc.

Fixes #18041
2018-07-30 09:22:47 +02:00
Sebastian Holtermann
2d6cfe2677 Autogen: Split initializer main method 2018-07-30 09:22:47 +02:00
Sebastian Holtermann
84bdae8895 Autogen: Compute variables in Init stage instead of Setup stage 2018-07-30 09:22:46 +02:00
Sebastian Holtermann
8e0d70272d Autogen: Move info file write code into methods 2018-07-30 09:22:46 +02:00
Sebastian Holtermann
5776639fbf Autogen: Pass absolute include path in info file 2018-07-30 09:22:46 +02:00
Sebastian Holtermann
2e9199b291 cmLocalGenerator: Respect user requested implicit include directories order
In ``cmLocalGenerator::GetIncludeDirectories`` append the user requested
implicit include directories first, then append the remaining implicit
include directories.  By By doing so we keep the user requested order of
implicit include directories.
2018-07-30 09:22:46 +02:00
Kitware Robot
264012dae0 CMake Nightly Date Stamp 2018-07-30 00:01:11 -04:00
Kitware Robot
7a7e4e9ea3 CMake Nightly Date Stamp 2018-07-29 00:01:07 -04:00