Commit Graph

29884 Commits

Author SHA1 Message Date
Brad King
adf3ea701d Merge topic 'policy-cmp0111-iface'
54ef732b0c cmVisualStudio10TargetGenerator: Avoid GetFullPath on INTERFACE library
f06f4b517c cmTarget: Do not enforce CMP0111 on imported INTERFACE libraries
43c95df8fb Tests: Match RunCMake.CMP0111 stderr more strictly

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5530
2020-11-24 08:43:22 -05:00
Brad King
aee981e208 Merge topic 'fix-find-make-program'
ef91fb02f3 cmGlobalGenerator: FindMakeProgram() at a generator-specific time

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Frank Dana <ferdnyc@gmail.com>
Merge-request: !5529
2020-11-24 08:42:33 -05:00
Brad King
2bca5fa6aa Merge topic 'xcode-cc-work-dir'
36921d2d23 Xcode: Fix custom command work-dir placeholders in "new build system"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5527
2020-11-24 08:41:24 -05:00
Brad King
da234c87c3 Merge topic 'cmFileTime-fix-overflow'
b4c994f69c cmFileTime: Fix overflow on time computation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5526
2020-11-24 08:40:08 -05:00
Kitware Robot
39ee591a2f CMake Nightly Date Stamp 2020-11-24 00:01:08 -05:00
Brad King
54ef732b0c cmVisualStudio10TargetGenerator: Avoid GetFullPath on INTERFACE library
Issue: #21470
2020-11-23 15:57:05 -05:00
Brad King
f06f4b517c cmTarget: Do not enforce CMP0111 on imported INTERFACE libraries
Fix logic added by commit 359c500a24 (cmTarget: Raise error if imported
target location is not set, 2020-08-08, v3.19.0-rc1~273^2) to exclude
INTERFACE libraries from the policy.  They have no location.

Fixes: #21470
2020-11-23 15:56:28 -05:00
Kyle Edwards
ef91fb02f3 cmGlobalGenerator: FindMakeProgram() at a generator-specific time
d5b5c192 moved FindMakeProgram() to an earlier time, which resulted
in CMAKE_MAKE_PROGRAM not being read from the toolchain file. Change
it to only call FindMakeProgram() early in the specific cases of
Visual Studio and Xcode, and restore the old behavior for all other
generators.

Fixes: #21486
2020-11-23 14:20:08 -05:00
Brad King
c178fad186 Merge topic 'fix-compile-db-crash'
67e2130c96 Makefiles: Fix CMAKE_EXPORT_COMPILE_COMMANDS crash with custom compile rule

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5521
2020-11-23 11:19:59 -05:00
Brad King
ed049d1678 Merge topic 'fix-compile-db-crash' into release-3.19
67e2130c96 Makefiles: Fix CMAKE_EXPORT_COMPILE_COMMANDS crash with custom compile rule

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5521
2020-11-23 11:19:58 -05:00
Brad King
36921d2d23 Xcode: Fix custom command work-dir placeholders in "new build system"
The placeholders for `CONFIGURATION` and `EFFECTIVE_PLATFORM_NAME` need
to be handled in the `WORKING_DIRECTORY` of custom commands just as we
already do for the `COMMAND`.

Fixes: #21483
2020-11-23 10:24:13 -05:00
Marc Chevrier
b4c994f69c cmFileTime: Fix overflow on time computation
On Windows, time starting point is Januray, 1st of 1601.
So computing number of nanoseconds from this date exceeds 64bit
capabilities.
2020-11-23 15:03:25 +01:00
Kitware Robot
732cc38459 CMake Nightly Date Stamp 2020-11-23 00:01:15 -05:00
Kitware Robot
4c67c0d28f CMake Nightly Date Stamp 2020-11-22 00:01:05 -05:00
Kitware Robot
17a37a83b0 CMake Nightly Date Stamp 2020-11-21 00:01:11 -05:00
Brad King
bf241bcc1e Merge topic 'improve_cmakes_error_handling_of_bad_parameters'
7302a23a1f cmake: Simplify -W recognition of no- and error= prefixes
98290782b6 cmake: redesign command-line argument parsing
d800c26ce9 cmake: Fix processing of -Wno-error= flags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Axel Huebl <axel.huebl@plasma.ninja>
Merge-request: !5458
2020-11-20 10:09:03 -05:00
Brad King
60a131efd5 Merge topic 'revert-explicit-LANGUAGE-flag'
30aa715fac Revert "specify language flag when source LANGUAGE property is set"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5519
2020-11-20 10:05:11 -05:00
Brad King
67e2130c96 Makefiles: Fix CMAKE_EXPORT_COMPILE_COMMANDS crash with custom compile rule
Fixes: #21471
2020-11-20 09:45:14 -05:00
Kitware Robot
8dc3ef670d CMake Nightly Date Stamp 2020-11-20 00:01:08 -05:00
Brad King
30aa715fac Revert "specify language flag when source LANGUAGE property is set"
Revert commit 74b1c9fc8e (Explicitly specify language flag when source
LANGUAGE property is set, 2020-06-01, v3.19.0-rc1~722^2) and the lookup
tables from its two immediate ancestors.  The purpose of that change was
to convert an explicit `LANGUAGE` source file property into an explicit
language specification compiler flag like `-x c`.  This seems reasonable
since the property is documented as meaning "indicate what programming
language the source file is".  It is also needed to help compilers deal
with non-standard source file extensions they don't recognize.

However, some projects have been setting `LANGUAGE C` on `.S` assembler
source files to mean "use the C compiler".  Passing `-x c` for them
breaks the build because the `.S` sources are not written in C.  These
projects should be updated to use `enable_language(ASM)`, for which
CMake often chooses the C compiler as the assembler when using
toolchains that support it (which would have to be the case for projects
using the approach).

Revert the change for now to preserve the old behavior for such projects.
We can re-introduce it with a policy in a future version of CMake.

Fixes: #21469
Issue: #14516, #20716
2020-11-19 17:06:03 -05:00
Brad King
f800e28a9c Merge topic 'scandep-p1689r3'
2cb1d77c58 scandep: update format to P1689 R3

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !5515
2020-11-19 10:43:26 -05:00
Brad King
7302a23a1f cmake: Simplify -W recognition of no- and error= prefixes 2020-11-19 08:53:58 -05:00
Robert Maynard
98290782b6 cmake: redesign command-line argument parsing
Make handling more consistent:

   "-S" -> invalid
   "-S/path/to/source" -> valid
   "-S /path/to/source" -> valid
   "-S=/path/to/source" -> now valid

   "-D" -> invalid
   "-DStr" -> valid
   "-D Str" -> valid
   "-D=Str" -> now valid

   "--log-level=" -> invalid
   "--log-level" -> invalid
   "--log-level=2" -> valid
   "--log-level 2" -> now valid
2020-11-19 08:53:58 -05:00
Kitware Robot
785552c754 CMake Nightly Date Stamp 2020-11-19 00:01:24 -05:00
Brad King
2cb1d77c58 scandep: update format to P1689 R3
The `work-directory` field has been moved into individual rules since
each one may correspond to a different compiler invocation and therefore
a different work directory.

Support for arbitrary binary paths has been removed for simplicity.
We now assume paths have a valid UTF-8 round-trip representation.
2020-11-18 10:42:57 -05:00
Brad King
222bf361e4 CMake 3.19.0 2020-11-18 07:46:23 -05:00
Brad King
04b6de78a7 Merge topic 'ninja-fortran-ddi-format'
f3eed2c49d cmGlobalNinjaGenerator: use P1689 dependency file format for Fortran
a02c4ccabc cmScanDepFormat: add reader and writer for the format from P1689R2
fa18069ebd Ninja: Exclude unused dyndep features during CMake bootstrap

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Michael Hirsch, Ph.D. <michael@scivision.dev>
Merge-request: !5485
2020-11-18 07:32:21 -05:00
Brad King
c8b2331e8b Merge topic 'rename_cuda_memcheck'
fea49b2df0 CTest: Rename CudaMemcheck to CudaSanitizer

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5514
2020-11-18 07:29:54 -05:00
Kitware Robot
e58bc4bc31 CMake Nightly Date Stamp 2020-11-18 00:01:28 -05:00
Tobias Ribizel
fea49b2df0 CTest: Rename CudaMemcheck to CudaSanitizer 2020-11-17 21:06:30 +01:00
Brad King
d800c26ce9 cmake: Fix processing of -Wno-error= flags
Fix two bugs that happened to cancel each other out for cases covered
by our test suite.  Add a test case that distinguishes them.
2020-11-17 13:22:52 -05:00
Ben Boeckel
f3eed2c49d cmGlobalNinjaGenerator: use P1689 dependency file format for Fortran
The module dependency specification format described in the C++
JTC1/SC22/WG21 paper [1] is also suitable for use by Fortran.

[1] http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p1689r2.html
2020-11-17 13:17:04 -05:00
Ben Boeckel
a02c4ccabc cmScanDepFormat: add reader and writer for the format from P1689R2
This format is currently subject to change, but is not too far from the
end goal.

Some bits are currently unimplemented (see TODO comments).
2020-11-17 13:16:05 -05:00
Brad King
c0619861c9 Merge topic 'cmake-build-specify-makefile-name'
cfce067b3f Tests: Add RunCMake.Make case for conflicting Makefile names
378c047ae3 Makefiles: Explicitly tell 'make' tool what Makefile name to use

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5509
2020-11-17 13:16:02 -05:00
Brad King
0b47e940cf Merge topic 'cpack-deb-no-dbgsyms'
c826745f5a CPack/DEB: Do not crash when asked for debug symbols when there are none

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5443
2020-11-17 13:14:54 -05:00
Brad King
0c0e7525c4 Merge topic 'pch-header-not-generated'
7524501d89 PCH: Do not mark PCH-header as generated

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5510
2020-11-17 13:13:49 -05:00
Kitware Robot
9506449445 CMake Nightly Date Stamp 2020-11-17 00:01:09 -05:00
Craig Scott
67ebcfbcbb Merge topic 'xcode-clean-lib-paths'
b1ef2fffe7 Xcode: Clean library paths to avoid linker duplicate symbol definitions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5511
2020-11-16 14:23:52 -05:00
Andrew Fuller
c826745f5a CPack/DEB: Do not crash when asked for debug symbols when there are none
Fixes: #21356
2020-11-16 14:03:07 -05:00
Deniz Bahadir
7524501d89 PCH: Do not mark PCH-header as generated
The PCH header file itself is written by CMake and is not generated by
part of the buildsystem.  Therefore the `GENERATED` property is not
appropriate to set because the file is always present before the build
starts.  We already do not mark the PCH source file as `GENERATED`
either.

This is a preparation for solving #18399, which will no longer allow to
unset the `GENERATED` property from a source-file once it was set.

Fixes: #21437
Signed-off-by: Deniz Bahadir <dbahadir@benocs.com>
2020-11-16 12:56:54 -05:00
Brad King
fa18069ebd Ninja: Exclude unused dyndep features during CMake bootstrap 2020-11-16 11:42:40 -05:00
Oliver Schneider
378c047ae3 Makefiles: Explicitly tell 'make' tool what Makefile name to use
CMake did not specify the filename of the Makefile generated by it.
Due to GNU make precedence rules this means that the presence of a
GNUmakefile or makefile would take precedence over the generated
Makefile.

This is only relevant for in-source builds and only whenever an
alternative makefile by the above mentioned names exists.

This patch adds the (seemingly universal) `-f` switch and the
(hardcoded) filename (it is now hardcoded separately in these two
files):

- cmLocalUnixMakefileGenerator3.cxx
- cmGlobalUnixMakefileGenerator3.cxx

Fixes: #21418
2020-11-16 11:34:53 -05:00
Brad King
01b473b810 Merge topic 'msvc-no-GR'
c00a6d3967 MSVC: Do not add /GR to CMAKE_CXX_FLAGS by default
6114c8e994 MSVC: Factor out initialization of /GR flag

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5508
2020-11-16 11:19:28 -05:00
Kitware Robot
3ae680841c CMake Nightly Date Stamp 2020-11-16 00:01:17 -05:00
Gusts Kaksis
b1ef2fffe7 Xcode: Clean library paths to avoid linker duplicate symbol definitions 2020-11-16 07:14:57 +11:00
Kitware Robot
75ced70154 CMake Nightly Date Stamp 2020-11-15 00:01:07 -05:00
Craig Scott
eb04e25ba6 Merge topic 'cmake_path-enhancements'
ed21ad181e cmake_path: various enhancements to subcommands/keywords

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5457
2020-11-14 06:39:42 -05:00
Kitware Robot
5501958d16 CMake Nightly Date Stamp 2020-11-14 00:01:08 -05:00
Brad King
c00a6d3967 MSVC: Do not add /GR to CMAKE_CXX_FLAGS by default
The `/GR` flag has been on by default since MSVC cl 14.0 from VS 2005.
Remove it from the default flags to make it easier for projects to pass
`/GR-` themselves to turn it off.

Projects may be using string processing to replace `/GR` with another
flag, so we cannot simply drop it.  Add a policy to drop it in a
compatible way.

Fixes: #21428
2020-11-13 11:46:23 -05:00
Kitware Robot
8b8f0197eb CMake Nightly Date Stamp 2020-11-13 00:01:08 -05:00