1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-14 02:08:27 +08:00
Commit Graph

49688 Commits

Author SHA1 Message Date
Kitware Robot
bdca8b01d2 Modernize: Use #pragma once in all header files
#pragma once is a widely supported compiler pragma, even though it is
not part of the C++ standard. Many of the issues keeping #pragma once
from being standardized (distributed filesystems, build farms, hard
links, etc.) do not apply to CMake - it is easy to build CMake on a
single machine. CMake also does not install any header files which can
be consumed by other projects (though cmCPluginAPI.h has been
deliberately omitted from this conversion in case anyone is still using
it.) Finally, #pragma once has been required to build CMake since at
least August 2017 (7f29bbe6 enabled server mode unconditionally, which
had been using #pragma once since September 2016 (b13d3e0d)). The fact
that we now require C++11 filters out old compilers, and it is unlikely
that there is a compiler which supports C++11 but does not support
#pragma once.
2020-09-03 09:30:21 -04:00
Kyle Edwards
093ba4061d Utilities/Scripts: Add temporary #pragma once conversion script 2020-09-03 09:26:57 -04:00
Brad King
ca5babfd7a Merge topic 'getdef'
11425041f0 cmMakefile::GetDefinition: return cmProp

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5179
2020-09-03 09:18:05 -04:00
Brad King
85e52ea704 Merge topic 'Fortran-visibility-var'
76cc687e98 Fortran: Initialize Fortran_VISIBILITY_PRESET property from variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5182
2020-09-03 09:16:57 -04:00
Brad King
e9dc7f3b2d Merge branch 'release-3.18' 2020-09-03 08:47:33 -04:00
Brad King
0b6a007419 Merge topic 'ninja-multi-automoc-regression'
2a6471dd7b Merge branch 'master' into ninja-multi-automoc-regression
a9fd3a107d Ninja Multi-Config: Fix dependencies of utility targets
f1199bdc96 Ninja Multi-Config: Fix cleaning of utility targets with commands
657047cd24 Ninja Multi-Config: Fix clean:all target
c35d1927a5 Tests: Pass additional Qt information to Ninja and NMC tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5177
2020-09-03 08:47:33 -04:00
Brad King
fff360c60c Merge topic 'ninja-multi-automoc-regression' into release-3.18
a9fd3a107d Ninja Multi-Config: Fix dependencies of utility targets
f1199bdc96 Ninja Multi-Config: Fix cleaning of utility targets with commands
657047cd24 Ninja Multi-Config: Fix clean:all target
c35d1927a5 Tests: Pass additional Qt information to Ninja and NMC tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5177
2020-09-03 08:47:33 -04:00
Brad King
c86c500352 Merge branch 'release-3.18' 2020-09-03 08:46:36 -04:00
Brad King
be66f2e24f Merge topic 'FindPython-include-dir-ABI-checks' into release-3.18
6fdfe2428d FindPython: enhance ABI checks against include directory

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5181
2020-09-03 08:46:36 -04:00
Brad King
7658d5c52d Merge topic 'FindPython-include-dir-ABI-checks'
6fdfe2428d FindPython: enhance ABI checks against include directory

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5181
2020-09-03 08:46:36 -04:00
Kitware Robot
0782a69037 CMake Nightly Date Stamp 2020-09-03 00:01:11 -04:00
Kyle Edwards
2a6471dd7b Merge branch 'master' into ninja-multi-automoc-regression 2020-09-02 14:39:04 -04:00
Thomas G
76cc687e98 Fortran: Initialize Fortran_VISIBILITY_PRESET property from variable
The `CMAKE_Fortran_VISIBILITY_PRESET` variable is documented to
initialize the property.  Fix it.
2020-09-02 13:48:42 -04:00
Kyle Edwards
a9fd3a107d Ninja Multi-Config: Fix dependencies of utility targets
Fixes: #21118
2020-09-02 12:59:59 -04:00
Kyle Edwards
f1199bdc96 Ninja Multi-Config: Fix cleaning of utility targets with commands 2020-09-02 12:59:59 -04:00
Kyle Edwards
657047cd24 Ninja Multi-Config: Fix clean:all target 2020-09-02 12:59:59 -04:00
Marc Chevrier
6fdfe2428d FindPython: enhance ABI checks against include directory
Fixes: #21149
2020-09-02 15:41:16 +02:00
Brad King
68b674b8bc Merge topic 'xcode-custom-commands'
e33f8f078a Xcode: Avoid unnecessary duplication of custom commands across targets
8c60c49ae2 Xcode: Refactor custom command dependency expansion

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5176
2020-09-02 09:21:22 -04:00
Brad King
913855f9e6 Merge topic 'xcode-tests-prep'
d1688ff300 Tests: Tell Xcode to disallow signing altogether in relevant cases
266f97315b Tests: Update RunCMake.CommandLine to avoid duplicate custom commands
7678fcd577 Tests: Remove workaround from RunCMake.ExternalProject MultiCommand case

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5174
2020-09-02 09:20:43 -04:00
Brad King
f1047fcb52 Merge topic 'armclang-asm-defines'
fa7ba5fbf5 ARMClang: Pass defines to assembler

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Osama Moharam <osama.moharam.uw@renesas.com>
Acked-by: Martin Kojtal <martin.kojtal@arm.com>
Merge-request: !5175
2020-09-02 09:19:48 -04:00
Vitaly Stakhovsky
11425041f0 cmMakefile::GetDefinition: return cmProp 2020-09-02 07:27:32 -04:00
Kitware Robot
99b21e58e0 CMake Nightly Date Stamp 2020-09-02 00:01:11 -04:00
Kyle Edwards
c35d1927a5 Tests: Pass additional Qt information to Ninja and NMC tests 2020-09-01 16:58:58 -04:00
Brad King
e33f8f078a Xcode: Avoid unnecessary duplication of custom commands across targets
Do not attach a custom command to a target if it is already attached to one of
the target's dependencies.  The command's output will be available by the time
the target needs it because the dependency containing the command will have
already been built.

Since commit fb45559e09 (Xcode: Process targets in depth-first order during
generation, 2018-07-19, v3.13.0-rc1~293^2) we generate a target only after
generating its dependencies.  Therefore when visiting the custom commands in a
target, we can assume that custom commands in its dependencies have already
been visited.
2020-09-01 14:05:57 -04:00
Brad King
8c60c49ae2 Xcode: Refactor custom command dependency expansion
Compute and store the "real" dependencies earlier.
2020-09-01 14:05:47 -04:00
Hugues Kamba
fa7ba5fbf5 ARMClang: Pass defines to assembler
This is useful when the assembly file(s) is passed to
the pre-processor.
2020-09-01 18:03:49 +01:00
Brad King
d1688ff300 Tests: Tell Xcode to disallow signing altogether in relevant cases
The Xcode 'new build system' rejects empty signing identities unless
signing is explicitly marked as not allowed.  Update test cases where we
turn off signing to explicitly disallow it too.

Also turn off signing in the XCTest test.
2020-09-01 10:38:22 -04:00
Brad King
266f97315b Tests: Update RunCMake.CommandLine to avoid duplicate custom commands
This test does not need to have the same custom command output generated
by multiple independent targets.  Revise the test to avoid that.
2020-09-01 10:32:45 -04:00
Brad King
7678fcd577 Tests: Remove workaround from RunCMake.ExternalProject MultiCommand case
Since commit 7249ba9677 (ExternalProject: Enforce that patch depends on update,
2020-04-03, v3.18.0-rc1~403^2) we do not need the workaround in the
MultiCommand case.
2020-09-01 10:21:47 -04:00
Brad King
8f73ff0c37 Merge topic 'target_genex_dependency'
f14b390198 GenEx: Remove unneeded dependencies from target info queries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Raul Tambre <raul@tambre.ee>
Merge-request: !5127
2020-09-01 09:59:08 -04:00
Craig Scott
3001e8b5d9 Merge topic 'xcode-link-phase-all'
525464ed2a Xcode: Use "Link Binary With Libraries" build phase in some cases
dc0898205c Xcode: Add special case for file type extension map for .xcassets
7b3d8411a2 Xcode: Refactor build setting append code and attribute getter naming

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5036
2020-09-01 09:38:05 -04:00
Robert Maynard
f14b390198 GenEx: Remove unneeded dependencies from target info queries
Only generate a graph dependency between a custom command and
a target when the custom command queries for the file path
of an artifact of the target.

This makes generator expressions such as `TARGET_FILE_DIR`
behave the same way as `TARGET_PROPERTY` which never generated
a graph dependency.
2020-09-01 09:25:19 -04:00
Brad King
2d723e66f1 Merge topic 'cuda_host_compiler_fail'
01428c5560 CUDA: Fail fast if CMAKE_CUDA_ARCHITECTURES doesn't work during detection
9f81aa0f69 CUDA: Fail if compiler detection using the host compiler fails

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5155
2020-09-01 09:20:23 -04:00
Brad King
f7fbe40513 Merge topic 'file_chmod'
7de60beddf file: Add CHMOD and CHMOD_RECURSE subcommands

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Marc Chevrier <marc.chevrier@gmail.com>
Merge-request: !5122
2020-09-01 09:19:18 -04:00
Brad King
4a80483750 Merge topic 'file-RENAME-windows'
e39e9c4043 cmSystemTools: Teach RenameFile to disable Windows Search Indexing
b54190a406 cmSystemTools: Teach RenameFile to try for longer on directories
2f8ef095da cmSystemTools: Add more error handling to RenameFile on Windows
d78c22aa64 cmSystemTools: Improve RenameFile on Windows with MOVEFILE_WRITE_THROUGH
73f8240ae7 cmSystemTools: Factor out RenameFile wstring conversion on Windows
97fc44f70e cmSystemTools: Factor out MoveFileExW call in RenameFile
35039286eb cmSystemTools: Define directory-specific Windows filesystem retry settings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5161
2020-09-01 09:17:49 -04:00
Brad King
f10682b796 Merge topic 'ispc_lang_support'
5ece12b7e4 gitlab-ci: add ISPC to the Fedora CI image
8976817d6d ISPC: Update help documentation to include ISPC
2368f46ba4 ISPC: Support building with the MSVC toolchain
e783bf8aa6 ISPC: Support ISPC header generation byproducts and parallel builds
34cc6acc81 Add ISPC compiler support to CMake
419d70d490 Refactor some swift only logic to be re-used by other languages

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5065
2020-09-01 09:15:39 -04:00
Brad King
cd2f894052 Merge branch 'release-3.17' into master 2020-09-01 09:11:26 -04:00
Brad King
7da3c744e3 Merge topic 'automoc-depend-project-file' into release-3.18
776059ef0f Merge branch 'backport-3.17-automoc-depend-project-file'
6b20bbd2dd AutoMoc: Restore support for re-running after project file changes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5166
2020-09-01 09:09:30 -04:00
Brad King
e1dbb7c2d8 Merge branch 'release-3.18' 2020-09-01 09:09:30 -04:00
Brad King
94964b60a0 Merge topic 'automoc-depend-project-file'
776059ef0f Merge branch 'backport-3.17-automoc-depend-project-file'
6b20bbd2dd AutoMoc: Restore support for re-running after project file changes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5166
2020-09-01 09:09:30 -04:00
Brad King
1e37ac64ce Merge branch 'release-3.18' 2020-09-01 09:08:07 -04:00
Brad King
cb70145b36 Merge topic 'UseSWIG-interface-option' into release-3.18
d264685bee UseSWIG: Update option -interface usage

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5172
2020-09-01 09:08:06 -04:00
Brad King
ec0d621e36 Merge topic 'UseSWIG-interface-option'
d264685bee UseSWIG: Update option -interface usage

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5172
2020-09-01 09:08:06 -04:00
Kitware Robot
8c833ff0e1 CMake Nightly Date Stamp 2020-09-01 00:01:10 -04:00
Gusts Kaksis
525464ed2a Xcode: Use "Link Binary With Libraries" build phase in some cases
OBJECT and STATIC libraries (framework or non-framework) do not use
this build phase. Not all items to be linked use this build phase either.

Co-Authored-By: Craig Scott <craig.scott@crascit.com>
2020-09-01 07:38:48 +10:00
Brad King
65a1045d97 Merge topic 'cuda_docs_host_id'
a57beabb78 Help: Reference CMAKE_CUDA_COMPILER_ID not CMAKE_CUDA_COMPILER

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5170
2020-08-31 13:51:15 -04:00
Brad King
30fec0d8a8 Merge branch 'backport-3.17-automoc-depend-project-file' into release-3.17
Merge-request: !5166
2020-08-31 13:44:44 -04:00
Brad King
776059ef0f Merge branch 'backport-3.17-automoc-depend-project-file' 2020-08-31 13:10:31 -04:00
Joerg Bornemann
6b20bbd2dd AutoMoc: Restore support for re-running after project file changes
For Qt >= 5.15.0 and Ninja generators AutoMoc creates a depfile to let
Ninja decide when to run AutoMoc.  This was introduced by commit aebfbcaa46
(AutoGen: Use depfiles for the XXX_autogen ninja targets, 2020-01-14,
v3.17.0-rc1~58^2).

However, AutoMoc was not triggered after adding a new moc-able file to
the project. This patch adds the project file (and potentially included
files) to the dependencies in the depfile.

Now, a re-run of AutoMoc is triggered if the project file changes.

Fixes: #21127
2020-08-31 13:07:23 -04:00
Ron W Moore
e39e9c4043 cmSystemTools: Teach RenameFile to disable Windows Search Indexing
Create RAII class SaveRestoreFileAttributes to manage Windows Search
Indexing.  Turn it off temporarily while renaming a directory.

Issue: #19580
2020-08-31 13:03:36 -04:00