| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
The "/showIncludes" flag is only available with MS C and C++ compilers,
and on compilers that "simulate" them (like Intel for Windows). Fix our
logic to choose this type only for MS tools with these languages. All
other cases need to use "deps = gcc" and define DEP_FILE in the build
rule.
|
|\
| |
| |
| |
| | |
9259d778 Normalize OBJECT_DEPENDS paths to match custom commands (#15366)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Custom command path normalization added in commit v3.1.0-rc1~471^2
(add_custom_command: Normalize OUTPUT and DEPENDS paths, 2014-05-28)
broke use of OBJECT_DEPENDS to bring in custom commands because the
latter paths were not normalized too. Normalize them and add a test
case.
Reported-by: Daniel v. Gerpen
|
| |
| |
| |
| |
| | |
Update the Makefile and Ninja generators to use the config when
requesting the include flags.
|
| |
| |
| |
| | |
All compilers hosting CMake support the std class.
|
|\ \
| |/
| |
| |
| | |
9a13fcbf Ninja: Do not crash when CMAKE_<LANG>_COMPILE_OBJECT is empty (#15325)
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A common idiom in CMake-based build systems is to have custom commands
that generate files not listed explicitly as outputs so that these
files do not have to be newer than the inputs. The file modification
times of such "byproducts" are updated only when their content changes.
Then other build rules can depend on the byproducts explicitly so that
their dependents rebuild when the content of the original byproducts
really does change.
This "undeclared byproduct" approach is necessary for Makefile, VS, and
Xcode build tools because if a byproduct were listed as an output of a
rule then the rule would always rerun when the input is newer than the
byproduct but the byproduct may never be updated.
Ninja solves this problem by offering a 'restat' feature to check
whether an output was really modified after running a rule and tracking
the fact that it is up to date separately from its timestamp. However,
Ninja also stats all dependencies up front and will only restat files
that are listed as outputs of rules with the 'restat' option enabled.
Therefore an undeclared byproduct that does not exist at the start of
the build will be considered missing and the build will fail even if
other dependencies would cause the byproduct to be available before its
dependents build.
CMake works around this limitation by adding 'phony' build rules for
custom command dependencies in the build tree that do not have any
explicit specification of what produces them. This is not optimal
because it prevents Ninja from reporting an error when an input to a
rule really is missing. A better approach is to allow projects to
explicitly specify the byproducts of their custom commands so that no
phony rules are needed for them. In order to work with the non-Ninja
generators, the byproducts must be known separately from the outputs.
Add a new "BYPRODUCTS" option to the add_custom_command and
add_custom_target commands to specify byproducts explicitly. Teach the
Ninja generator to specify byproducts as outputs of the custom commands.
In the case of POST_BUILD, PRE_LINK, and PRE_BUILD events on targets
that link, the byproducts must be specified as outputs of the link rule
that runs the commands. Activate 'restat' for such rules so that Ninja
knows it needs to check the byproducts, but not for link rules that have
no byproducts.
|
| |
| |
| |
| |
| | |
This will allow values other than "" and "1" to be generated in
the rules.ninja file.
|
|/
|
|
|
| |
Replacements were detected and performed by the clang tool
remove-cstr-calls on a linux build.
|
|
|
|
|
|
|
|
|
| |
Ninja generator ensures that all custom commands being target
dependencies are run before other source compilations. However in case
there are no such dependencies it currently generates empty phony rules
which clutter the build graph.
Teach the Ninja generator to produce such rules only when necessary.
|
|
|
|
|
|
|
|
|
| |
Some compilers do not offer an option to specify the path to the object
file, but rather only to the directory in which to place the object
file. See issue 14876 for some examples. Add a new OBJECT_FILE_DIR
placeholder to specify the directory containing the object file for the
current compilation. This may differ from the main target OBJECT_DIR
when the object corresponds to a source in a subdirectory.
|
|
|
|
| |
Return the GetFeature method result converted to a boolean value.
|
|\
| |
| |
| |
| | |
54535f47 Ninja: Fix deptype for Intel compiler on Linux
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since commit v3.0.0-rc1~305^2 (Ninja: deptype msvc for Intel's compiler
on Windows, 2013-11-25) we used "deps = msvc" for the Intel compiler.
This is correct only on Windows. On Linux we still want "deps = gcc".
Fix the logic to use "deps = msvc" when the compiler id or the "simulate
id" is "MSVC". This will preserve the behavior on Intel for Windows and
fix the behavior on Intel for Linux. In the future this should be
converted to a platform information module variable.
|
| |
| |
| |
| |
| | |
This makes WebKitGTK's CMake build.ninja file go from 165M to 11M and
configure/generate in 5 seconds.
|
| |
| |
| |
| |
| |
| | |
This reduces ninja file output even more for projects with lots of
libraries with entangled transitive dependencies. ParaView goes from the
previous 58M to about 45M.
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
Computing the source files is now more expensive, so the Ninja
generator became very slow with a large number of files.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Disallow the use of config-specific source files with
the Visual Studio and Xcode generators. They don't have
any way to represent the condition currently.
Use the same common-config API in cmQtAutoGenerators. While
it accepts config-specific files, it doesn't have to support
multiple configurations yet.
Loop over the configs in cmTargetTraceDependencies
and cmGlobalGenerator::WriteSummary and consume all source
files.
Loop over the configs in cmComputeTargetDepends and compute the
object library dependencies for each config.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Remove use of UseObjectLibraries from Makefile and Ninja generators. It
is not needed now because those generators use GetExternalObjects
which already contains the objects from object libraries.
The VS10 generator calls both the UseObjectLibraries and the GetExternalObjects
methods. Ensure that duplicates are not created by skipping objects
from object libraries in handling of GetExternalObjects.
Similarly, fix VS6, VS7 and Xcode object handling by skipping
external objects from OBJECT_LIBRARY usage as appropriate.
The error message in the BadSourceExpression1 test is now reported
by the generator expression evaluator, so it has different text.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Not everything that isn't MSVC is GCC. I have support for LDC's depfile
format on its way upstream[1], but its future is uncertain. CMake should
at least support this for future depfile formats.
[1]https://github.com/martine/ninja/pull/721
|
| |
| |
| |
| |
| | |
Some of them will be used with other APIs which require value_type
to be cmSourceFile const*.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Until now the cmCustomCommandGenerator was used only to compute the
command lines of a custom command. Generalize it to get the comment,
working directory, dependencies, and outputs of custom commands. Update
use in all generators to support this.
|
| |
| |
| |
| |
| |
| | |
Use the clang RemoveCStrCalls tool to automatically migrate the
code. This was only run on linux, so does not have any positive or
negative effect on other platforms.
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
fba51b09 MSVC: Add properties to configure compiler PDB files (#14762)
3737860a cmTarget: Add per-config compilation info
718a9532 cmTarget: Refactor ComputePDBOutputDir interface
aae5184c Help: Refactor PDB_NAME and PDB_OUTPUT_DIRECTORY docs
b4aac0ca Makefile: Fix per-config linker PDB output directory
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since commit v2.8.12~437^2~2 (VS: Separate compiler and linker PDB files
2013-04-05) we no longer set /Fd with the PDB_NAME or PDB_OUTPUT_DIRECTORY
properties. Those properties now exclusively handle linker PDB files.
Since STATIC libraries do not link their compiler PDB file becomes more
important. Add new target properties "COMPILE_PDB_NAME[_<CONFIG>]" and
"COMPILE_PDB_OUTPUT_DIRECTORY[_<CONFIG>]" to specify the compiler PDB
file location and pass the value to the MSVC /Fd option.
|
|/ |
|
|
|
|
|
|
| |
Instead of figuring out target flags per-source file, cache the flags
that are being used. This results in a *much* faster generate time for
Ninja.
|
|
|
|
|
| |
These methods and others will be able to get a config parameter
later to implement the INTERFACE_SOURCES feature.
|
|\
| |
| |
| |
| | |
03f3b4e Replace <OBJECT_DIR> rule placeholder consistently (#14667)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The <OBJECT_DIR> placeholder is supposed to be the base intermediate
files directory for the current target. This is how it gets replaced
during link line generation. However, during compile line generation
we replace it with the directory containing the current object file
which may be a subdirectory. Fix replacement of <OBJECT_DIR> in the
generated compile lines to be the base intermediate files directory.
This was expoxed by commit 42ba1b08 (VS: Separate compiler and linker
PDB files, 2013-04-05) when we added a "/Fd<OBJECT_DIR>/" flag to the
MSVC compile line in order to match the VS IDE default compiler program
database location in the intermediate files directory. For source files
in a subdirectory relative to the current target this caused the wrong
location to be used for the compiler program database. This becomes
particularly important when using precompiled headers.
While at it, use the cmTarget::GetSupportDirectory method to compute the
intermediate files directory for the current target instead of repeating
the logic in a few places.
|
|\ \
| | |
| | |
| | |
| | | |
7605e37 Ninja: job pool support for compiling and linking
|
| | |
| | |
| | |
| | |
| | | |
Could be tested by setting the environment
variable NINJA_STATUS=[%r]
|
|\ \ \
| |/ /
|/| |
| | |
| | | |
76a8888 Ninja: deptype msvc for Intel's compiler on Windows
|
| | | |
|
|/ /
| |
| |
| |
| |
| |
| | |
Just enough to reach the BuildMacContentDirectory method and the
NeedRelinkBeforeInstall methods.
In the future, those methods can be moved to cmGeneratorTarget.
|
| | |
|
|/
|
|
| |
cmcldeps is now only used for .rc file processing
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
9cf3547 Add the INTERFACE_SYSTEM_INCLUDE_DIRECTORIES target property.
1925cff Add a SYSTEM parameter to target_include_directories (#14180)
286f227 Extend the cmTargetPropCommandBase interface property handling.
83498d4 Store system include directories in the cmTarget.
f1fcbe3 Add Target API to determine if an include is a system include.
2679a34 Remove unused variable.
|
| |
| |
| |
| |
| | |
The implementation can be modified later so that system includes
can be determined on a per-target basis.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
d7dd010 Add target property debugging for COMPILE_DEFINITIONS
1841215 Refactor cmTarget::GetCompileDefinitions to use an out-vector, not a string.
afc9243 Add an overload of cmIDEOptions::AddDefines taking a vector of strings.
d95651e Overload cmLocalGenerator::AppendDefines to add a list.
|
| |/
| |
| |
| | |
Refactor to create AddCompileDefinitions.
|
|/
|
|
|
|
|
| |
This reverts commit de4da665d3205afa239749c41513a315c3831f51.
This feature is not yet ready for release. It needs to be
merged with the CMAKE_OSX_SYSROOT feature.
|