| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
The "cmakexbuild" wrapper is not needed for Xcode 4 and above, and the
path to it may change when CMake moves. Avoid storing a specific path
to a build program in CMakeCache.txt and instead compute the value for
CMAKE_MAKE_PROGRAM on demand. However, if a user does set the value
explicitly then honor it.
This does for Xcode what commit v3.0.0-rc1~260^2~4 (VS: Switch to
internal CMAKE_MAKE_PROGRAM lookup by generators, 2013-11-15) did for
Visual Studio generators.
|
|
|
|
|
|
|
|
|
|
| |
This will make them use the 'console' pool with the Ninja generator.
Impacted targets are:
- Built-in targets: install, install/local, install/strip, tests,
package, package_source, rebuild_cache
- Targets provided by the CTestTargets module: Nightly, Continuous,
Experimental,
and all their variants (*Start, *Configure, ...)
|
|
|
|
|
|
|
|
|
| |
In each internal target directory we generate a "Labels.txt" file
containing labels for that target and its sources, but it uses an
internal format. In order to make the list of labels easier to
publish, use a json format and call it "Labels.json".
Since we now use jsoncpp headers, link CMakeLib to the jsoncpp library.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
5f69314e Replace foo.length() pattern with !foo.empty().
fd0c036c Replace 'foo.length() >= 1' pattern with !foo.empty()
f09fde2d Replace 'foo.length() > 0' pattern with !foo.empty().
86b5bdfa Replace 'foo.length() == 0' pattern with foo.empty().
fd7b3712 Replace foo.size() pattern with !foo.empty().
aa773035 Replace !foo.size() pattern with foo.empty().
64592633 cmListCommand: Use empty() and expand whitespace.
607e1938 Replace 'foo.size() != 0' pattern with !foo.empty().
930bd478 Replace 'foo.size() == 0' pattern with foo.empty().
d92887ef Replace 'foo.size() > 0' pattern with !foo.empty().
|
| | |
|
| | |
|
| | |
|
|/ |
|
| |
|
|
|
|
| |
All compilers hosting CMake support the std class.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We use cmGlobalGenerator::GetDirectoryContent to avoid repeating
directory listings. However, GetDirectoryContent loads content from
disk at most once. This breaks find_library calls that occur when disk
content has changed since preceding find_library calls.
Teach cmGlobalGenerator::GetDirectoryContent to save the directory
modification time when content is loaded and re-load content if it
changes.
Create a RunCMake.find_library test with a case covering this.
|
|\
| |
| |
| |
| | |
5eb4d759 Remove some unneeded c_str calls.
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|\
| |
| |
| |
| | |
15f55cca Do not use just-built CMake to install itself when cross-compiling (#15248)
|
| |
| |
| |
| |
| |
| | |
The special case added by commit v2.4.0~3051 (When building CMake
itself, use the new cmake to install so that the current cmake can be
overwritten, 2004-06-09) does not make sense when cross-compiling.
|
|\ \
| | |
| | |
| | |
| | |
| | | |
b80557c7 file(GENERATE): Evaluate early to allow generating source files
0019d54b Genex: Fix whitespace issue.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The evaluation files must be known before cmTargetTraceDependencies
attempts to find them, but we must actually generate the files after
cmTargetTraceDependencies, as that can add to target SOURCES. The
limitation is that the generated output name must not depend on the
SOURCES of a target if the generated file is used by that target.
Mark the output files as GENERATED so that trace dependencies does
not expect them to already exist in the filesystem.
Move the invokation of ForceLinkerLanguage in the Generate logic
to after the generated file names are known. ForceLinkerLanguage
tries to determine the sources of a target (in order to determine
an already-known language) and otherwise fails to get information
about the generated file.
Test that the output of file(GENERATE) can be used as a target source
file and that accessing the target SOURCES in the name of the output
file is an error. Accessing the TARGET_OBJECTS would be a similar
error if it was legal to use that generator expression in this
context. That is not currently possible and is a different error
condition, so test the current error output as a reminder to change
the expected output if that becomes possible in the future. Test
that generated rule files resulting from cmTargetTraceDependencies
appear in the SOURCES generated in the output file.
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Visual Studio 12 (2013) deprecated GetVersionEx:
warning C4996: 'GetVersionExW': was declared deprecated
in favor of either "versionhelpers.h" or VerifyVersionInfo, neither of
which exist in some of the older compilers we support. Rather than
try to port conditionally to VerifyVersionInfo, simply suppress the
warning for now.
|
| |
| |
| |
| |
| | |
Replacements were detected and performed by the clang tool
remove-cstr-calls on a linux build.
|
|/ |
|
|
|
|
|
|
| |
In cmGlobalGenerator::EnableLanguage, fix error messages for missing
module files to actually name the missing module instead of using the
empty string returned by GetModulesFile.
|
|
|
|
|
|
| |
Call SetSystemName, SetGeneratorPlatform, and SetGeneratorToolset
exactly once after reading CMakeSystem.cmake, and not again on another
call to enable_language() or project().
|
|
|
|
|
|
|
|
|
|
|
| |
Reject the option by default. It will be implemented on a per-generator
basis. Pass the setting into try_compile project generation. Add cache
entry CMAKE_GENERATOR_PLATFORM and associated variable documentation to
hold the value persistently.
Add a RunCMake.GeneratorPlatform test to cover basic use cases for the
option. Verify that CMAKE_GENERATOR_PLATFORM is empty by default, and
that it is rejected when the generator does not support a user setting.
|
|
|
|
|
|
| |
Move handling of an empty toolset name into the implementation of the
method. This simplifies the VS 10 implementation of default toolset
selection because it has one code path that is always called.
|
|
|
|
|
| |
The compiler detection modules for this language do not yet know how
to find the full path to 'ml' or 'ml64', so do not require it.
|
|
|
|
|
|
|
|
|
| |
The implementation of CMP0047 detects the QNX compiler id internally,
then changes it to GNU after the language is fully enabled. This is too
late to correctly set the old IS_GNU variables, so set them as part of
the policy OLD behavior.
Reported-by: Mike Lattanzio <mlattanzio@blackberry.com>
|
|
|
|
|
|
| |
No call sites pass NULL to the output argument, so take it by
reference to avoid the if(output) conditions. Propagate the
change through the TryCompile APIs that call it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The cmGlobalGenerator::ResolveLanguageCompiler method, invoked only by
Makefile generators, contains code originally added by commit v2.4.0~796
(..., add new generators for msys and mingw, 2005-12-22) to compute the
full path to the compiler and save the result back into the cache value.
Since then the CMakeDetermine*Compiler modules have learned to resolve
the full path to the compiler and save it in CMake*Compiler.cmake files
configured in the build tree. The value of CMAKE_<LANG>_COMPILER in the
cache is now only for reference of what the user originally specified.
The full path is now available in a normal variable of the same name,
and this is used by project code and the generators.
When the user specifies -DCMAKE_<LANG>_COMPILER=name on the command-line
of an existing build tree that uses a Makefile generator, it is first
stored in the cache with an uninitialized type. Then later when
ResolveLanguageCompiler updates the cache entry and sets the type to
FILEPATH, cmMakefile::AddCacheDefinition does CollapseFullPath on the
"name" and ends up with something like "$PWD/name" which is unlikely to
be correct. Furthermore, cmMakefile::AddCacheDefinition proceeds to
remove the normal variable of the same name, so the value originally
saved in CMake<LANG>Compiler.cmake is ignored and the generators use the
wrong path to the compiler.
Resolve this by dropping the code from ResolveLanguageCompiler that
touches the cache value of CMAKE_<LANG>_COMPILER. As explained above it
is no longer needed anyway.
|
|
|
|
|
|
|
| |
Make the virtual 'Generate' method protected. Make 'DoGenerate'
the main entry point to generation. This gives cmGlobalGenerator
a chance to do some early operations before the individual
generator-specific implementations take over.
|
|
|
|
|
|
|
|
|
| |
Add a cmGlobalGenerator::SetSystemName virtual method. Call it from
cmGlobalGenerator::EnableLanguage as soon as CMAKE_SYSTEM_NAME is known.
This will give generators a chance to adapt themselves to the target
system. Pass the cmMakefile instance to the method so that the
generator can update it accordingly. Return early from EnableLanguage
if SetSystemName returns false.
|
|
|
|
|
| |
Move the IsDependedOn method to cmGlobalVisualStudio7Generator
since that is the only caller.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Delay use of CMAKE_GENERATOR_TOOLSET until the CMakeSystem.cmake
file has been configured and loaded during the first project() or
enable_language() command. This gives the toolchain file named by
CMAKE_TOOLCHAIN_FILE a chance to set CMAKE_GENERATOR_TOOLSET. This
point is still early enough to set the generator toolset prior to
the initialization of any languages that might use the toolset.
The cmake::GeneratorToolset member variable remains an indication
of what was specified by the -T option or loaded from the cache.
It does not need to be updated based on the toolchain file setting.
The cmMakefile::TryCompile can still pass cmake::GeneratorToolset
into the inner instance because the try-compiled project will do
platform and language initialization using the CMakeSystem module
configured for the outer project.
Extend the RunCMake.GeneratorToolset test with cases that use a
toolchain file to set CMAKE_GENERATOR_TOOLSET.
|
|
|
|
|
|
|
| |
Teach set_property and get_property an "INSTALL" property type to be
associated with install-tree file paths. Make the properties available
to CPack for use during packaging. Add a "prop_inst" Sphinx domain
object type for documentation of such properties.
|
|\
| |
| |
| |
| |
| | |
325599ca cmGlobalGenerator: Store targets in hash maps
ac4106c6 cmMakefile: Use a hashmap for imported targets
|
| | |
|
|\ \
| |/
| |
| |
| | |
Resolve conflict in Source/cmGlobalGenerator.cxx by integrating
changes from both sides.
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
9407174b target_sources: New command to add sources to target.
81ad69e0 Make the SOURCES target property writable.
6e636f2e cmTarget: Make the SOURCES origin tracable.
3676fb49 cmTarget: Allow transitive evaluation of SOURCES property.
e6971df6 cmTarget: Make the source files depend on the config.
df753df9 cmGeneratorTarget: Don't add computed sources to the target.
869328aa cmComputeTargetDepends: Use valid config to compute target depends.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| |\ \
| | |/
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
5de63265 Genex: Only evaluate TARGET_OBJECTS to determine target sources.
aa0a3562 cmGeneratorTarget: Compute target objects on demand
042c1c83 cmTarget: Compute languages from object libraries on demand.
fdcefe3c cmGeneratorTarget: Compute consumed object libraries on demand.
c355d108 cmComputeTargetDepends: Track object library depends.
e5da9e51 cmTarget: Allow any generator expression in SOURCES property.
5702e106 cmTarget: Include TARGET_OBJECTS genex in target SOURCES property.
857d30b5 cmGlobalGenerator: Add interface to call ForceLinkerLanguages
28e1d2f8 cmStringCommand: Add GENEX_STRIP subcommand.
bf98cc25 Genex: Evaluate TARGET_OBJECTS as a normal expression.
8cd113ad cmTarget: Store strings instead of cmSourceFile* to represent SOURCES.
4959f341 cmSourceFileLocation: Collapse full path for directory comparisons.
fcc92878 cmSourceFileLocation: Remove unused Update method.
59e8740a cmTarget: Remove AddSourceFile method
26d494ba cmTarget: Use string API to add sources to cmTarget objects.
d38423ec cmTarget: Add a method to obtain list of filenames for sources.
...
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add a ComputeObjectMapping method to compute the object
names. It takes mapping to populate as an out-parameter so
that it can be extended in the future with parameters
relevant to generator expression evaluation.
Remove the supporting cmGeneratorTarget::AddObject method. It is
no longer needed as the container member is populated directly.
The ComputeObjectMapping method is called whenever objects are
requested from the cmGeneratorTarget. Because the Xcode generator
makes no such request, explicitly invoke the method from that
generator so that the logic of checking for bad sources in object
libraries is executed.
In a follow-up, the UseObjectLibraries usage may be replaced by a
true generator expression evaluator for TARGET_OBJECTS. That
will require generators to use cmGeneratorTarget::GetExternalObjects
which is not currently the case for Xcode and VS generators.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Remove up-front object library computation from cmGlobalGenerator.
Adjust tests for message coming from the generator expression
evaluation.
|
| | |
| | |
| | |
| | |
| | | |
Avoid calling it too early when cmGeneratorTarget instances don't
yet exist.
|
| | |
| | |
| | |
| | | |
Ensure it is populated before tracing dependencies.
|
| |\ \
| | |/ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Implement it in terms of the ComputeObjectFilenames virtual method
on the local generators.
Remove the reimplementation from the global generators which are
now all functionally identical.
|
| | |
| | |
| | |
| | | |
Make it public for future external calls.
|
| | |
| | |
| | |
| | |
| | | |
Use an ad-hoc clang tool for matching the calls which should be
ported.
|