| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
30829da506 Unity: Clarify source comments on unity build transformation
87bf1c6c33 Merge branch 'unity-after-compile-features' into restore-pch-with-unity
df08c37a42 cmGlobalGenerator: Add unity/pch sources after computing compile features
004c3c3986 Tests: Add case covering PCH in a unity build
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !9215
|
| |
| |
| |
| | |
Issue: #25650
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Under the policy's NEW behavior, `[CMAKE_]MSVC_DEBUG_INFORMATION_FORMAT`
may be explicitly set to an empty string to tell CMake not to add any
flags for this abstraction. In this case, fall back to checking the
language-wide flags as we do in the OLD behavior.
This revises commit 183b9a9eca (CMP0141: Fix PCH REUSE_FROM under policy
NEW behavior, 2022-10-31, v3.25.0-rc3~4^2).
Issue: #24106
|
|
|
|
|
|
|
|
|
|
|
| |
Under the CMP0141 NEW behavior added by commit 0e96a20478 (MSVC: Add
abstraction for debug information format, 2022-08-25, v3.25.0-rc1~142^2~1),
the `-Zi` and `-ZI` flags do not appear in `CMAKE_<LANG>_FLAGS_<CONFIG>`
anymore. Teach the PCH REUSE_FROM implementation to recognize the
`EditAndContinue` and `ProgramDatabase` debug information formats
through the policy's new abstraction.
Fixes: #24106
|
|
|
|
|
| |
The `CMakeLists.txt` file already calls `cmake_minimum_required` and
`project` before including each case's code.
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
476c6a8910 PCH: Fix Xcode non-pch language exclusion
fcf1fcfd0c Tests: Ignore all classes in Xcode internal objc warnings
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7166
|
| |
| |
| |
| |
| |
| |
| | |
Fix a regression caused by commit bbcdac4e5d (PCH: Fix all-language
precompile header support in Xcode, 2021-08-07, v3.22.0-rc1~140^2).
Fixes: #23138
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Divert LCC compiler as a new one, instead of treating it as GNU.
Since old times, Elbrus C/C++/Fortran Compiler (LCC) by MCST has been
passing checks for GNU compilers, so it has been identified as GNU.
Now, with intent of seriously upstreaming its support, it has been
added as a separate LCC compiler, and its version displays not a
supported GCC version, but LCC version itself (e.g. LCC 1.25.19 instead
of GNU 7.3.0).
This commit adds its support for detection, and also converts basically
every check like 'is this compiler GNU?' to 'is this compiler GNU or
LCC?'. The only places where this check is untouched, is where it
regards other platforms where LCC is unavailable (primarily non-Linux),
and where it REALLY differs from GNU compiler.
Note: this transition may break software that are already ported to
Elbrus, but hardly relies that LCC will be detected as GNU; still such
software is not known.
|
|
|
|
|
|
|
|
| |
The pch object file could cause problems when the reused pch is passed
through an OBJECT library, which would use INTERFACE_LINK_LIBRARIES to
link the pch object file.
Fixes: #22630
|
|
|
|
| |
Fixes: #22384
|
|
|
|
|
|
|
|
| |
Fix logic from commit 9df1f33c9a (VisualStudio: move PCH rules to
projects when possible., 2020-10-15, v3.20.0-rc1~638^2) to explicitly
disable PCH on sources that should not use the target-wide PCH rules.
Fixes: #21827
|
|
|
|
| |
Fixes: #20201
|
|
|
|
|
| |
This reverts commit 9f060971411aca979807f70307d8b9fe1b43ff24.
It was merged accidentally.
|
|
|
|
| |
Fixes: #20201
|
|
|
|
|
|
| |
Update the test added by commit 8c8f03422e (PCH: Template instantiation
support, 2020-08-28) to recognize flags on PCH files whose names include
the architecture. This occurs when `CMAKE_OSX_ARCHITECTURES` is set.
|
|
|
|
|
|
|
|
| |
Adds PCH_INSTANTIATE_TEMPLATES target property for enabling template
instantiation in precompiled headers.
Enabled by default. Currently only supported for Clang 11 and newer.
Implements #21133.
|
|\
| |
| |
| |
| |
| |
| |
| | |
902858367f Merge branch 'backport-3.16-pch-fix-bad-ClearSourcesCache'
fa7b041eca PCH: Fix logic error that incorrectly clears sources during VS generation
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4815
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Since commit 729d997f10 (Precompile Headers: Add REUSE_FROM signature,
2019-08-30, v3.16.0-rc1~101^2), `GetPchFileObject` handles the case that
it is called first for another target's `REUSE_FROM` by calling
`AddSource` to make sure `GetObjectName` can produce the correct object
name. However, `AddSource` causes `ClearSourcesCache` to be called,
which since commit a9f4f58f0c (cmGeneratorTarget: Clear AllConfigSources
in ClearSourcesCache, 2020-05-15, v3.16.7~2^2) now correctly erases the
`AllConfigSources` structure. This is okay during `AddPchDependencies`,
but there is another code path in which it is problematic.
When the Visual Studio generator's `WriteAllSources` method is looping
over the sources, the `cmake_pch.cxx` source is encountered first. This
causes `OutputSourceSpecificFlags` to call `GetPchCreateCompileOptions`,
which calls `GetPchFile`, which under MSVC with `CMAKE_LINK_PCH` calls
`GetPchFileObject`. That leads to `ClearSourcesCache` erasing the
structure over which `WriteAllSources` is iterating!
This bug is caught by our `RunCMake.PrecompileHeaders` test when run
with the VS generator as of the commit that exposed it by fixing
`ClearSourcesCache`. However, that change was backported to the CMake
3.16 series after testing only with later versions versions that contain
commit a55df20499 (Multi-Ninja: Add precompile headers support,
2020-01-10, v3.17.0-rc1~136^2). By adding proper multi-config support
for PCH, that commit taught `cmLocalGenerator::AddPchDependencies` to
call `GetPchFile` with the real set of configurations instead of just
the empty string. This allows the `GetPchFile` cache of PCH sources to
be populated up front so that the later calls to it in the
`WriteAllSources` loop as described above do not actually call
`GetPchFileObject` or `ClearSourcesCache`. That hid the problem.
Fix this by re-ordering calls to `AddPchDependencies` to handle
`REUSE_FROM` targets only after the targets whose PCH they re-use.
Remove the now-unnecessary call to `AddSource` from `GetPchFileObject`
so that `ClearSourcesCache` is never called during `WriteAllSources`.
Update the PchReuseFrom test case to cover an ordering of targets that
causes generators to encounter a `REUSE_FROM` target before the target
whose PCH it re-uses.
Fixes: #20770
|
| |\ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
6b2fb4ffd2 VS: Fix using PCH from source with COMPILE_OPTIONS
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4734
|
| |\ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
b204bae261 target_precompile_headers: Fix documented example using genex
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Cristian Adam <cristian.adam@gmail.com>
Merge-request: !4678
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Some RunCMake tests fail with this warning due to extra stderr content:
warning: this old-style function definition is not preceded by a prototype
Convert `foo()` to `foo(void)` in `.c` sources of affected tests.
|
|\ \ \ \ \
| | |_|/ /
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | | |
6b2fb4ffd2 VS: Fix using PCH from source with COMPILE_OPTIONS
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4734
|
| | |_|/
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | | |
If a source file gets per-source flags from both PCH and custom
`COMPILE_OPTIONS`, combine them correctly.
Fixes: #20694, #20456
|
|\ \ \ \
| | |_|/
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | | |
b204bae261 target_precompile_headers: Fix documented example using genex
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Cristian Adam <cristian.adam@gmail.com>
Merge-request: !4678
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When the path to a header file is specified using a generator
expression, evaluation of the genex must produce an absolute path.
Update our documented example and add a test covering the case.
Fixes: #20617
|
| | |
| | |
| | |
| | | |
Fixes: #20497
|
| |/
|/|
| |
| | |
Fixes: #20295
|
|/
|
|
| |
Fixes: #19789
|
|
|
|
|
|
|
|
| |
Also copy the REUSE_FROM pdb file only if the file is newer than the
existing one.
Fixes: #19731
Fixes: #20068
|
|
|
|
| |
Fixes: #19970
|
|
|
|
| |
Fixes: #19952
|
|
|
|
| |
Fixes: #19839
|
| |
|
|
|
|
|
|
|
|
|
| |
If the target has C files, it will get a C PCH file.
The same for C++ files. The linker language is no
longer used to determine which language to use for
PCH.
Fixes: #19790
|
|
|
|
|
| |
Run the `clang-format.bash` script to update our C and C++ code to a new
include order `.clang-format`. Use `clang-format` version 6.0.
|
|
|
|
|
|
|
| |
Teach `target_precompile_headers` to treat relative paths the
same way as `target_sources`.
Fixes: #19733
|
|
|
|
|
|
|
| |
Add the ability to share precompiled headers artifacts between
targets.
Fixes: #19659
|
|
|