This was accidentally left out of commit 0467a2f91b (PCH: add
PRECOMPILE_HEADERS to special properties, 2015-03-12). Also add a test
case for `install(EXPORT)` and `export()` propagation of precompiled
headers.
Fixes: #19741
We used to store information for the _autogen target in a CMake script
file AutogenInfo.cmake, which was imported by a temporary cmake instance in
the _autogen target. This introduced the overhead of creating a temporary
cmake instance and inherited the limitations of the CMake language which
only supports lists.
This patch introduces JSON files to pass information to AUTORCC and
autogen_ targets. JSON files are more flexible for passing data, e.g. they
support nested lists.
The patch has the side effects that
- AutogenInfo.cmake is renamed to AutogenInfo.json
- AutogenOldSettings.txt is renamed to AutogenUsed.txt
- RCC<qrcBaseName><checksum>Info.cmake is renamed to
AutoRcc_<qrcBaseName>_<checksum>_Info.json
- RCC<qrcBaseName><checksum>.lock is renamed to
AutoRcc_<qrcBaseName>_<checksum>_Lock.lock
- RCC<qrcBaseName><checksum>Settings.txt is renamed to
AutoRcc_<qrcBaseName>_<checksum>_Used.txt
VS 16.4 introduces an additional check on `CustomBuild` rules that warns
if the outputs of the command are not created. However, CMake supports
marking outputs with the `SYMBOLIC` property to indicate that they will
not actually be generated. That property is used by Makefile and Ninja
generators but has not been needed by the VS generators before. Teach
the VS generator to disable `VerifyInputsAndOutputsExist` in custom
build rules that have a symbolic output.
Fixes: #19737
f4afcd5c6b VS: Remove call to ConvertToWindowsExtendedPath with result discarded
61fdf326d8 cmState: Avoid lowering command name twice
0965bd9c06 Generators: Remove function declarations which do not have a definition
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3847
920f0dd83a cmInstallCommand: Port away from cmCommand
1dd31297ca cmTargetLinkLibrariesCommand: Port away from cmCommand
d5c63f073f cmSourceGroupCommand: Port away from cmCommand
42e413bcbb cmSetTargetPropertiesCommand: Port away from cmCommand
77aa75b8dc cmProjectCommand: Port away from cmCommand
9c521088df cmLoadCacheCommand: Port away from cmCommand
fcfec154ac cmLinkDirectoriesCommand: Port away from cmCommand
d038beec21 cmIncludeDirectoryCommand: Port away from cmCommand
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3829
Add a test to verify the content of generated UWP app package - appx/msix.
MSIX format was introduced Visual Studio 2017 version 15.9.0 and
Windows SDK version 17763.
cmGeneratorExpression::Evaluate is a shortcut when only the evaluated string is
needed or an instance of cmCompiledGeneratorExpression cannot be cached.
Fixes: #19686
When not using the `-pthread` flag we instead return a library to link
by name. Previously we hard-coded the `-l` flag before the library
name. When used with `target_link_libraries`, the hard-coded `-l` flag
is preserved rather than transformed into the link option preferred by
the toolchain in use. Drop the explicit `-l` part to let CMake's
generators produce the proper way to link the threads library for the
current toolchain.
Fixes: #19747
Simplify by re-ordering parameters of cmCompiledGeneratorExpression::Evaluate
so that frequently used parameters are before less frequently used parameters.
This allows with little extra arguments to get rid of one Evaluate overload,
which makes it easier to implement the cmGeneratorExpression::Evaluate utility.
The latter would otherwise need four overloads.
The quiet flag is false for all but one call to Evaluate. Make the quiet flag
a setter of cmCompiledGeneratorExpression to be able to remove it from the
Evaluate function signature.
Manipulating the property map of cmSourceFile directly may invalidate the class
invariant of the cached value IsGenerated. Provide the setter SetProperties
which also updates IsGenerated.