Commit Graph

29738 Commits

Author SHA1 Message Date
Brad King
d250b67722 cmGlobalXCodeGenerator: Adopt pbxproj object id generation 2021-01-06 16:21:53 -05:00
Brad King
92021198e5 cmSystemTools: Revert use of MOVEFILE_WRITE_THROUGH by RenameFile on Windows
Revert commit d78c22aa64 (cmSystemTools: Improve RenameFile on Windows
with MOVEFILE_WRITE_THROUGH, 2020-08-25, v3.19.0-rc1~243^2~3).  Using
this flag causes the operation to fail frequently in some environments.
Drop it for now pending further investigation.

Fixes: #21571
2020-12-17 08:35:38 -05:00
Brad King
0932b1c2b2 CMake 3.19.2 2020-12-16 07:35:29 -05:00
Brad King
854f5ea1cb cmake-gui: Restore completion during path editing
Revert commit 0fc1818831 (QCMakeWidgets: replace QDirModel, 2020-06-15,
v3.19.0-rc1~696^2).  `QFileSystemModel` is not a drop-in replacement for
`QDirModel`.  Additional changes are needed to make it work fully.
Revert the change and suppress the `QDirModel` deprecation warning
pending further investigation.

Fixes: #21589
2020-12-15 08:40:13 -05:00
Brad King
7932e0a46e Merge topic 'ispc_control_header_suffixes' into release-3.19
c9a50f3556 ISPC: Generated Headers suffix configurable with a better default

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5597
2020-12-15 07:40:34 -05:00
Brad King
795c5fe239 Merge topic 'support_CMAKE_VFS_OVERLAY_for_rc_compilation' into release-3.19
18ee6d7e32 llvm-rc: Add CMAKE_VFS_OVERLAY to the preprocessing flags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5604
2020-12-15 07:38:19 -05:00
Robert Maynard
c9a50f3556 ISPC: Generated Headers suffix configurable with a better default
The target property `ISPC_HEADER_SUFFIX` and associated global
variable now can control the suffix used when generating the
C/C++ interoperability ISPC headers.

In addition the default suffix is now "_ispc.h" which matches the
common convention that the ISPC compiler team uses and recommends.
2020-12-14 13:13:09 -05:00
Thomas Bernard
18ee6d7e32 llvm-rc: Add CMAKE_VFS_OVERLAY to the preprocessing flags
Issue: #20658
2020-12-14 11:08:12 -05:00
Brad King
1144d25094 Merge branch 'backport-ninja-no-cleandead' into ninja-no-cleandead 2020-12-14 10:14:19 -05:00
Brad King
73a961eaba Ninja: Remove cleandead on regeneration
Remove the `cleandead` tool invocation added by commit fb18215904
(Ninja: clean ninja metadata once generated, 2019-05-13,
v3.17.0-rc1~207^2).  The tool deletes files that were not previously
deleted by regenerating the build system.  Also, there are use cases
where no-longer-generated files should not be removed, such as Qt's TS
files.

Fixes: #21549
2020-12-14 10:08:14 -05:00
Brad King
4cdf951f07 Merge topic 'install-properties' into release-3.19
63db7ae9c4 cmake: Clear INSTALL file properties between runs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5603
2020-12-14 07:08:49 -05:00
Brad King
63db7ae9c4 cmake: Clear INSTALL file properties between runs
Do not keep state across separate project configurations.
This is particularly important in `cmake-gui` where those
configurations can be for separate projects.

Fixes: #21580
2020-12-11 12:30:27 -05:00
Asit Dhal
e5a4ffaad1 execute_process: Improve COMMAND_ERROR_IS_FATAL error capture scenarios
1.  COMMAND_ERROR_IS_FATAL ANY will capture errors if the exit code is
    non zero, there is a timeout or an abnormal exit.

2.  COMMAND_ERROR_IS_FATAL LAST
    will capture if only the last process has an exit code non zero, there
    is a timeout or an abnormal exit.

Fixes: #21562
2020-12-10 06:09:59 -05:00
Brad King
d00d5ac0cd Merge topic 'correct_ispc_path_computation' into release-3.19
9af93fef11 ISPC: Handle OBJECT sources in different directories
72ae15ebcb ISPC: Ninja properly compute ISPC_HEADER_DIRECTORY location

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5581
2020-12-08 10:17:33 -05:00
Robert Maynard
9af93fef11 ISPC: Handle OBJECT sources in different directories 2020-12-07 09:14:54 -05:00
Robert Maynard
72ae15ebcb ISPC: Ninja properly compute ISPC_HEADER_DIRECTORY location 2020-12-07 09:14:13 -05:00
Raul Tambre
fcabf4a47e macOS: Add architecture flags only for native ASM dialect
ASM dialects like NASM have languages names such as ASM_NASM.
However such ASM dialects don't support the architecture flags, so match only
the full name.

Fixes #21553.
2020-12-04 17:29:14 +02:00
Brad King
dd1f26e22e Merge topic 'export-namelink' into release-3.19
38bcb5c0a3 export: Do not fail generation for separate namelink only case

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5556
2020-12-02 09:17:50 -05:00
Brad King
b76013b515 Merge topic 'ninja-regen-metadata' into release-3.19
73d1c78bf4 ci: update to use ninja 1.10.2
11f4259362 Ninja: Clean metadata after regen during build on Windows with 1.10.2+

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5555
2020-12-01 09:29:11 -05:00
Deniz Bahadir
38bcb5c0a3 export: Do not fail generation for separate namelink only case
Update the change from commit 64690f6df0 (export: Do not fail generation
for namelink-only case, 2020-10-09, v3.19.0-rc1~7^2) to also handle
separate namelink-only and namelink-skip calls.

Fixes: #21529
2020-12-01 07:35:17 -05:00
Brad King
11f4259362 Ninja: Clean metadata after regen during build on Windows with 1.10.2+
Ninja 1.10.2 fixes support for `generator = 1` rules that run metadata
update commands during regeneration while a build is running.  Update
the condition added by commit ccaa0bccc4 (Ninja: Do not clean metadata
when re-generating inside a running build, 2020-01-27,
v3.17.0-rc1~73^2) to remove our workaround when Ninja is new enough.

Fixes: #20274
2020-11-30 14:57:48 -05:00
Cristian Adam
35432aabda PCH: Fix compiler errors on iOS multi-arch using Ninja Multi-Config
Fixes: #21401
2020-11-30 13:31:51 -05:00
Stephen Kelly
34f6d76755 QNX: Do not disable compiler extensions for CMake itself
The `set(CMAKE_CXX_EXTENSIONS FALSE)` option has the effect of passing
compile option `-std=c++NN` instead of `-std=gnu++NN`.  On some
platforms, the latter form (or the secondary effects that it has, such
as setting _XOPEN_SOURCE) is required.  This typically affects platforms
such as mingw, cygwin and QNX.  The GNU-like compiers default to
`-std=gnu++NN`, which means that users can typically build source code
on those platforms by default.

While the `set(CMAKE_CXX_EXTENSIONS FALSE)` option was set here in
commit f034b0f6 (CMake compilation: do not use compiler extensions,
2020-03-14), the other changes in that commit added `#defines` which
become required in the absense of use of `-std=gnu++NN`.  However, only
platforms regularly tested in the cmake dashboard were ported, as is
reasonable.  That made CMake fail to compile on QNX and perhaps other
platforms which for which no one is submitting regular testing to the
cmake dashboard.

Make the `set(CMAKE_CXX_EXTENSIONS FALSE)` option conditional on non-QNX
to restore the QNX build.

Issue: #21503
2020-11-25 10:17:29 -05:00
Brad King
64fb825438 CMake 3.19.1 2020-11-24 08:50:26 -05:00
Brad King
1f1d705154 Merge topic 'policy-cmp0111-iface' into release-3.19
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
aeb0e40111 Merge topic 'fix-find-make-program' into release-3.19
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:32 -05:00
Brad King
6b4bb3bf7f Merge topic 'xcode-cc-work-dir' into release-3.19
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:23 -05:00
Brad King
2ca9016376 Merge topic 'cmFileTime-fix-overflow' into release-3.19
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
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
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
Brad King
67e2130c96 Makefiles: Fix CMAKE_EXPORT_COMPILE_COMMANDS crash with custom compile rule
Fixes: #21471
2020-11-20 09:45:14 -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
222bf361e4 CMake 3.19.0 2020-11-18 07:46:23 -05:00
Tobias Ribizel
fea49b2df0 CTest: Rename CudaMemcheck to CudaSanitizer 2020-11-17 21:06:30 +01:00
Gusts Kaksis
b1ef2fffe7 Xcode: Clean library paths to avoid linker duplicate symbol definitions 2020-11-16 07:14:57 +11:00
Brad King
c5011399c5 Ninja: Avoid cleandead with dyndep bindings for Fortran module dependencies
The Ninja `cleandead` tool does not account for implicit outputs
discovered by `dyndep` bindings and can remove Fortran `.mod` files that
are still needed.  Disable the `cleandead` step when using `dyndep`
bindings.

Fixes: #21406
2020-11-10 15:16:28 -05:00
Brad King
7a04f45722 CMake 3.19.0-rc3 2020-11-06 09:19:57 -05:00
Brad King
dd8c91a4f3 Merge topic 'cmake-gui-file-dialog-crash' into release-3.19
5f782119c8 cmake-gui: Restore workaround for crash in file dialog

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5472
2020-11-06 07:57:51 -05:00
Brad King
5f782119c8 cmake-gui: Restore workaround for crash in file dialog
In commit ce9dbceb42 (QtDialog: remove Qt4-only code, 2020-06-02,
v3.19.0-rc1~712^2~1) we removed an event filter that was thought to be
necessary only as a workaround for a bug in Qt.  However, that bug was
fixed in Qt 4.5, and the file dialog still crashes as of Qt 5.14 without
the filter.  Restore the workaround pending further investigation.

Fixes: #21400
2020-11-05 14:50:45 -05:00
Gusts Kaksis
bffb17be3d Xcode: Inherit target library and framework search paths from project
Xcode has multiple levels of build settings with priority in descending
order:

1. Target
2. Project
3. Workspace
4. SDK defaults

`CMAKE_XCODE_ATTRIBUTE_*` path variables add these to project level, but
linked frameworks and libraries override this in target level.  Add the
`$(inherited)` macro to keep both in the final list.

Fixes: #21387
2020-11-05 13:48:54 +02:00
Marc Chevrier
1c912056a1 cmake_path: remove new command from 3.19
Defer adding this command until post-3.19 development so that it
has more time to mature before being included in a release.

Issue: #21385
2020-11-03 09:55:35 -05:00
Kyle Edwards
cb2d01c182 CMakePresets.json: Don't warn if no path argument is given
If --preset is specified with no path argument, use the current
directory as the source directory, the preset's binaryDir as the
binary directory, and don't issue the standard warning for no path
specified.

Fixes: #21386
2020-11-02 09:46:08 -05:00
Brad King
f506cc6bb2 CMake 3.19.0-rc2 2020-10-28 08:03:20 -04:00
Brad King
199247c21a Merge topic 'cmake-presets-help-flag' into release-3.19
c619be2784 ccmake: Don't list --preset in --help

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5428
2020-10-28 07:47:37 -04:00
Brad King
fe310851a8 Merge topic 'cmake-gui-manual-argument' into release-3.19
ef03124237 CMake GUI: Add --browse-manual argument

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5417
2020-10-28 07:37:07 -04:00
Brad King
15caa11da5 Merge topic 'xcode-fix-source-linking' into release-3.19
5dc23300b1 Xcode: Fix regression that automatically links libraries in source list

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5432
2020-10-28 07:26:46 -04:00