Commit Graph

16596 Commits

Author SHA1 Message Date
Brad King 49bf3e7d8d Merge topic 'target-legacy-depends-only-for-vs6'
8a205b98 cmTarget: Compile old-style link dependencies only for VS 6
d57be904 cmTarget: Run old-style link dependencies only for VS 6
b3b44d13 cmTarget: Rename old-style link dependencies code as "ForVS6"
80cb12bb export_library_dependencies: Use original link libraries internally
2014-07-15 10:48:22 -04:00
Brad King c005d95662 Merge topic 'dev/ison-isoff-performance'
43a8c552 SystemTools: Use a set in Is{On,Off}
9270aa9a IsOff: Use the length for the string construction
2014-07-15 10:48:18 -04:00
Brad King 29abb3dedb Merge topic 'dev/fix-cmake-rule-property'
4b139169 cmMakefile: fix __CMAKE_RULE property setting
2014-07-15 10:48:17 -04:00
Kitware Robot 7bc8450251 CMake Nightly Date Stamp 2014-07-15 00:01:07 -04:00
Brad King 8a205b980c cmTarget: Compile old-style link dependencies only for VS 6
Compile all the "ForVS6" cmTarget members only on Windows.  No other
platforms support the VS 6 generator.
2014-07-14 14:39:20 -04:00
Brad King d57be904ae cmTarget: Run old-style link dependencies only for VS 6
Invoke it at runtime only with the VS 6 generator.  No other generators
need it.
2014-07-14 14:38:58 -04:00
Brad King b3b44d138e cmTarget: Rename old-style link dependencies code as "ForVS6"
The old link dependency analysis is now needed only for the VS 6
generator code delimited by CM_USE_OLD_VS6 to support project-provided
project templates.  Rename the related cmTarget members to be "ForVS6".
2014-07-14 14:37:04 -04:00
Brad King 80cb12bb8b export_library_dependencies: Use original link libraries internally
This command was using the cmTarget::GetLinkLibraries method with a
comment explaining how execution order gives it the dependencies before
analysis.  Just use cmTarget::GetOriginalLinkLibraries instead.
2014-07-14 14:29:26 -04:00
Ben Boeckel 4b13916970 cmMakefile: fix __CMAKE_RULE property setting
It got put into the condition by mistake.
2014-07-14 12:55:04 -04:00
Brad King 1ca0c0e94a cmTarget: Refactor internal imported LinkInterface map
Create the map entry up front and store in it a boolean value indicating
whether the LinkInterface structure has been populated.  This approach
leads to shorter code that is easier to follow too.
2014-07-14 10:21:46 -04:00
Brad King 102eea60cd cmTarget: Simplify internal ComputeLinkInterfaceLibraries method
Now that the method can see the full OptionalLinkInterface structure,
store information there instead of passing it through arguments.
2014-07-14 10:00:51 -04:00
Brad King b0f5740851 cmTarget: Move ComputeLinkInterfaceLibraries to internals
There are no external callers, and this will allow the method to see
the full OptionalLinkInterface internal structure.
2014-07-14 09:55:52 -04:00
Brad King c69e8a5580 cmTarget: Refactor internal LinkInterface map
Create the map entry up front and store in it boolean values indicating
which pieces of the LinkInterface structure have been populated.
This approach leads to shorter code that is easier to follow too.
2014-07-14 09:51:51 -04:00
Brad King 4db3990e9f cmTarget: Drop 'head' argument from processSources
No call sites need it to be anything but 'this'.
2014-07-14 09:46:53 -04:00
Brad King 4b8130b8de cmTarget: Drop 'head' argument from GetSourceFiles
No call sites need it to be anything but 'this'.
2014-07-14 09:46:53 -04:00
Brad King 4c763dd1f1 cmTarget: Drop 'head' argument from GetLanguages
No call sites need it to be anything but 'this'.
2014-07-14 09:46:53 -04:00
Brad King 190cabe7c1 cmTarget: Drop 'head' argument from ComputeLinkImplementationLanguages
No call sites need it to be anything but 'this'.
2014-07-14 09:46:53 -04:00
Brad King 5ba3cbbd24 Merge topic 'refactor-link-internals'
f45ede61 cmTarget: Fix CMP0022 OLD breakage from recent refactoring
2014-07-14 09:38:00 -04:00
Brad King f1b33fccd1 Merge topic 'vs-RC-flags'
5d873846 VS: Fix handling of non-preprocessor flags in CMAKE_RC_FLAGS
2014-07-14 09:37:59 -04:00
Brad King 5fc50479bf Merge topic 'install-cfbundle-directory'
a3ac67cc OS X: Install CFBundles as complete directories
2014-07-14 09:37:54 -04:00
Brad King 47bf22e121 Merge topic 'interface-sources-target-objects'
affe9d56 Allow INTERFACE_SOURCES to specify $<TARGET_OBJECTS> (#14970)
2014-07-14 09:37:52 -04:00
Brad King affe9d56a2 Allow INTERFACE_SOURCES to specify $<TARGET_OBJECTS> (#14970)
Fix cmTarget::GetSourceFiles to set EvaluateForBuildsystem on the
$<TARGET_PROPERTY:...,INTERFACE_SOURCES> generator expression so that
the $<TARGET_OBJECTS> generator expression is allowed within an
INTERFACE_SOURCES value.

Extend the InterfaceLibrary test to cover this case.  Extend the
RunCMake.TargetObjects test to cover failure of $<TARGET_OBJECTS>
when used through $<TARGET_PROPERTY:...,INTERFACE_SOURCES> in a
non-buildsystem context.
2014-07-14 09:09:32 -04:00
Kitware Robot edf94b6588 CMake Nightly Date Stamp 2014-07-14 00:01:07 -04:00
Kitware Robot 6ac04aee51 CMake Nightly Date Stamp 2014-07-13 00:01:06 -04:00
Kitware Robot 2eadd127e9 CMake Nightly Date Stamp 2014-07-12 00:01:18 -04:00
Kitware Robot c9b5e34187 CMake Nightly Date Stamp 2014-07-11 00:01:07 -04:00
Brad King f45ede61a1 cmTarget: Fix CMP0022 OLD breakage from recent refactoring
In commit 7b0834e9 (cmTarget: Refactor internal LinkImplementation map,
2014-06-19) cmTarget::GetLinkImplementationLibrariesInternal was changed
accidentally to pass "this" to ComputeLinkImplementation instead of
"head".  Change it back.
2014-07-10 16:01:04 -04:00
Martin Mitas 5d8738468f VS: Fix handling of non-preprocessor flags in CMAKE_RC_FLAGS
Teach the VS >= 10 generator to honor flags other than -I and -D
in the CMAKE_RC_FLAGS[_<CONFIG>] variable.  Place them within the
ResourceCompile .vcxproj element under AdditionalOptions.

Also add a rudimentary flag map to map '-n' to 'NullTerminateStrings'.
2014-07-10 14:33:27 -04:00
Tim Blechmann a3ac67cc3f OS X: Install CFBundles as complete directories
Install CFBundles as directories just like frameworks and application
bundles.
2014-07-10 12:54:10 -04:00
Kitware Robot 7e5c9c1526 CMake Nightly Date Stamp 2014-07-10 00:01:08 -04:00
Brad King 55d3e88fb7 Merge topic 'thread-sanitizer'
7c80ce6f Help: Add notes for topic 'thread-sanitizer'
49948f72 ctest_memcheck: Add support for ThreadSanitizer
2014-07-09 10:02:48 -04:00
Brad King aaea11e353 Merge topic 'dev/custom-target-performance'
6208c285 cmMakefile: Defer dependency calculations
dc2e26df cmMakefile: Avoid excess source files
d2803fba cmMakefile: Add a CreateSource method
2014-07-09 10:02:47 -04:00
Brad King e187351c5f Merge topic 'allow-OBJECT-library-extra-sources'
2c470b77 add_library: Allow arbitrary non-linked sources in OBJECT libraries
de4f3e2c Tests: Fix broken dependency in ObjectLibrary test
54bf5858 Tests: Resolve TODO comment left in ObjectLibrary test
2014-07-09 10:02:45 -04:00
Brad King d30acf347b Merge topic 'update-kwsys'
5f525da0 Merge branch 'upstream-kwsys' into update-kwsys
3d127627 KWSys 2014-07-02 (c2a329ce)
2014-07-09 10:02:39 -04:00
Bill Hoffman 49948f7221 ctest_memcheck: Add support for ThreadSanitizer
This commit adds support for ThreadSanitizer to ctest.  ThreadSanitizer
is part of the clang compiler and also gcc 4.8 and later. You have to
compile the code with special flags. Then your code gets the the
ThreadSanitizer ability built into it. To pass options to the
ThreadSanitizer you use an environment variable. This commit teaches
ctest to parse the output from ThreadSanitizer and send it to CDash.
2014-07-09 09:48:35 -04:00
Brad King 2c470b775a add_library: Allow arbitrary non-linked sources in OBJECT libraries
Loosen this restriction on OBJECT libraries to allow source files of any
name to be generated by custom commands or listed for reference in IDE
projects so long as they would not affect linking of a normal library.
Update the rejection message to be more specific about the looser
restriction.

Extend the ObjectLibrary test to cover a ".cmake" file generated by a
custom command in an OBJECT library.
2014-07-09 09:43:42 -04:00
Kitware Robot 0e5c7aefe3 CMake Nightly Date Stamp 2014-07-09 00:01:07 -04:00
Ben Boeckel 43a8c5526d SystemTools: Use a set in Is{On,Off}
Also check before calling toupper() umpteen million times.
2014-07-08 11:18:15 -04:00
Ben Boeckel 9270aa9a2d IsOff: Use the length for the string construction
No need to waste the calculation and force the string to call strlen
again.
2014-07-08 11:16:16 -04:00
Ben Boeckel 6208c285c8 cmMakefile: Defer dependency calculations 2014-07-08 10:13:51 -04:00
Ben Boeckel dc2e26df01 cmMakefile: Avoid excess source files
When there are no commands, a main_dependency is not required and when
there are also no dependencies, nothing is required.
2014-07-08 10:13:51 -04:00
Ben Boeckel d2803fbac6 cmMakefile: Add a CreateSource method
The GetOrCreateSource searches the source file listing again, but some
callers know that it already didn't exist.
2014-07-08 10:13:50 -04:00
Kitware Robot 49c830d597 CMake Nightly Date Stamp 2014-07-08 00:01:13 -04:00
Brad King 5f525da0e3 Merge branch 'upstream-kwsys' into update-kwsys 2014-07-07 09:04:27 -04:00
Brad King 61be345115 Merge topic 'refactor-usage-requirement-evaluation'
93790506 cmTarget: Simplify INTERFACE_INCLUDE_DIRECTORIES usage requirement lookup
b5b098eb cmTarget: Simplify CMP0027 logic in processIncludeDirectories
5e07dcf7 cmTarget: Add to LinkImplementation whether each library was a genex
f77b384c cmTarget: Simplify INTERFACE_COMPILE_FEATURES usage requirement lookup
61ef8daa cmTarget: Simplify INTERFACE_COMPILE_DEFINITIONS usage requirement lookup
d9586f83 cmTarget: Simplify INTERFACE_COMPILE_OPTIONS usage requirement lookup
3156275b cmTarget: Simplify INTERFACE_SOURCES usage requirement lookup
363cd33e cmTarget: Add method to add usage requirements from linked interfaces
251e835b cmTarget: Add to LinkImplementation a backtrace for each library
848c8ccf cmTarget: Refactor LinkImplementation to allow more information
f85ccf23 cmGeneratorExpressionEvaluator: Shorten some long lines
82e91e34 cmComputeLinkDepends: Convert AddLinkEntries to a template
2014-07-07 08:54:40 -04:00
Brad King dcac4a3ff4 Merge topic 'ctest-S-message-STATUS'
f33d875a CTest: Implement message(STATUS) output for 'ctest -S' scripts
2014-07-07 08:54:28 -04:00
Brad King 93790506f5 cmTarget: Simplify INTERFACE_INCLUDE_DIRECTORIES usage requirement lookup
Use the AddInterfaceEntries helper to avoid duplication.  In
TargetPropertyEntry, replace the TargetName string member with a
reference to the full cmLinkImplItem that produced the entry.  This is
possible because the cmLinkImplItem is available in AddInterfaceEntries
(it was not available in GetIncludeDirectories).  Having the full
cmLinkImplItem allows processIncludeDirectories to implement CMP0027 OLD
behavior without repeating the target name lookup.

Update the RunCMake.CompatibleInterface test DebugProperties case
expected output for the new order of the messages.
2014-07-07 08:52:42 -04:00
Brad King b5b098ebb3 cmTarget: Simplify CMP0027 logic in processIncludeDirectories
Evaluate and lookup the target name only once per TargetPropertyEntry
instead of repeating it for each include directory entry.  Use a local
checkCMP0027 variable to record whether the policy should be checked.
Evaluate the target name as a generator expression only if it looks like
one.  Lookup the target by name only after evaluation of generator
expressions.
2014-07-07 08:52:41 -04:00
Brad King 5e07dcf7c8 cmTarget: Add to LinkImplementation whether each library was a genex
Implementation of CMP0027 OLD behavior needs to know whether each entry
in LinkImplementation::Libraries came from a generator expression or
not.  Add a FromGenex member to cmLinkImplItem to record this.
2014-07-07 08:52:41 -04:00
Brad King f77b384cf6 cmTarget: Simplify INTERFACE_COMPILE_FEATURES usage requirement lookup
Use the AddInterfaceEntries helper to avoid duplication.
2014-07-07 08:52:41 -04:00
Brad King 61ef8daad5 cmTarget: Simplify INTERFACE_COMPILE_DEFINITIONS usage requirement lookup
Use the AddInterfaceEntries helper to avoid duplication.
2014-07-07 08:52:41 -04:00
Brad King d9586f83f1 cmTarget: Simplify INTERFACE_COMPILE_OPTIONS usage requirement lookup
Use the AddInterfaceEntries helper to avoid duplication.
2014-07-07 08:52:40 -04:00
Brad King 3156275bc7 cmTarget: Simplify INTERFACE_SOURCES usage requirement lookup
Use the AddInterfaceEntries helper to avoid duplication.
2014-07-07 08:52:40 -04:00
Brad King 363cd33ebe cmTarget: Add method to add usage requirements from linked interfaces
Create a cmTargetInternals::AddInterfaceEntries method to construct a
$<TARGET_PROPERTY:tgt,INTERFACE_XYZ> generator expression and evaluate
it for every target in the link implementation.  This will be useful to
de-duplicate such evaluation for each usage requirement separately.

The new method will soon be used in the implementation of the
INTERFACE_* usage requirement lookup methods (GetSourceFiles,
GetCompileOptions, GetCompileDefinitions, GetCompileFeatures,
GetIncludeDirectories).  It is necessary for these methods to determine
whether an expression in LinkImplementationPropertyEntries evaluates to
a target or not because generator expression evaluation reports an error
for non-targets and we construct a $<TARGET_PROPERTY:tgt,INTERFACE_XYZ>
expression for each entry that is a target.

The implementation of each usage requirement currently processes the
LinkImplementationPropertyEntries and evaluates all generator
expressions to determine targets.  That is no longer necessary because
GetLinkImplementationLibraries now returns resolved and cached targets
together with their name.  Use it to implement AddInterfaceEntries.
2014-07-07 08:52:40 -04:00
Brad King 251e835b3f cmTarget: Add to LinkImplementation a backtrace for each library
Allow clients to provide backtrace context on evaluation diagnostics.
2014-07-07 08:52:40 -04:00
Brad King 848c8ccf18 cmTarget: Refactor LinkImplementation to allow more information
Create a cmLinkImplItem class derived from cmLinkItem so more
information can be added to link implementation entries than link
interface entries.  Convert the LinkImplementation Libraries member to
hold it.  Update client sites accordingly.
2014-07-07 08:52:39 -04:00
Brad King f85ccf23ee cmGeneratorExpressionEvaluator: Shorten some long lines
Adjust the definitions of getLinkedTargetsContent to avoid long lines.
2014-07-07 08:52:39 -04:00
Brad King 82e91e3487 cmComputeLinkDepends: Convert AddLinkEntries to a template
Allow the method to be called with a vector of any type that can be
converted to cmLinkItem.
2014-07-07 08:52:36 -04:00
Kitware Robot d39e7f1259 CMake Nightly Date Stamp 2014-07-07 00:01:07 -04:00
Kitware Robot fdfb3a1e86 CMake Nightly Date Stamp 2014-07-06 00:01:13 -04:00
Kitware Robot aafef594bf CMake Nightly Date Stamp 2014-07-05 00:01:08 -04:00
Kitware Robot 256bf34ef9 CMake Nightly Date Stamp 2014-07-04 00:01:24 -04:00
Kitware Robot 6d1ad67077 CMake Nightly Date Stamp 2014-07-03 00:01:12 -04:00
Brad King f33d875a84 CTest: Implement message(STATUS) output for 'ctest -S' scripts
Send status messages to the CTest HANDLER_OUTPUT log since they are part
of the script handler output.  This also ensures they appear inline with
other test command handler output.
2014-07-02 10:39:30 -04:00
Brad King 2ea0d6ba27 Merge topic 'fix-circular-transitive-properties-segfault'
65aa5442 Target: Return null when a transitive property is not defined.
61ce6547 Genex: Fix stack overflow in transitive property evaluation.
2014-07-02 09:54:50 -04:00
Brad King e2a12b8a58 Merge topic 'ninja-link-order-only-dependencies'
ac8879ce Ninja: Add order-only dependencies to link commands (#14728)
2014-07-02 09:54:49 -04:00
Brad King 94fbf33ad1 Merge topic 'encoding-bugs'
9571214e Encoding: Replace some system calls with kwsys calls which handle unicode.
2014-07-02 09:54:47 -04:00
Brad King 2eed2fd2bb Merge topic 'libarchive-encoding'
71c981a2 Encoding: Fix potential encoding issues with libarchive on Windows.
2014-07-02 09:54:44 -04:00
Clinton Stimpson 71c981a213 Encoding: Fix potential encoding issues with libarchive on Windows.
Because the 8bit string encoding in libarchive can be different than
the 8bit string encoding in CMake, change to call the wide version
of libarchive functions.  They are different if CMake is configured
to use UTF-8 as the internal encoding.

Create helper functions for some libarchive calls to use wstring
internally on platforms supporting it.
2014-07-02 09:49:45 -04:00
Kitware Robot 3597c3b986 CMake Nightly Date Stamp 2014-07-02 00:01:12 -04:00
Stephen Kelly 65aa5442b7 Target: Return null when a transitive property is not defined.
Commit v2.8.11~310^2~1 (Keep track of INCLUDE_DIRECTORIES as a vector of
structs., 2012-11-19) added special case of INCLUDE_DIRECTORIES
for the purpose of origin-tracking of individual entries in the property. It
introduced a bug in that it returned an empty string instead of '0' in the
case that no includes have been set.

Commit v2.8.11~289^2~2 (Handle INTERFACE properties transitively for includes
and defines., 2012-09-23) introduced transitive handling of the property
through the link implementation, together with a whitelist of properties
which would be evaluated transitively. Because of the bug introduced
previously, the 'prop' in TargetPropertyNode is non-null,
meaning that the content (the empty string) would be evaluated as a generator
expression.  This was harmless as the follow-up code was only for 'INTERFACE_'
variants of target properties, so the effect was the same.

Commits v2.8.11~280^2~2 (Keep track of properties used to determine linker
libraries., 2012-11-05) and v2.8.11~280^2~1 (Add API to calculate
link-interface-dependent bool properties or error., 2013-01-06) added a way
to track and report errors on properties which both determine and are
determined by the link implementation.  This was later used in generator
expression evaluation by commit v2.8.11~252^2~2 (Make INTERFACE determined
properties readable in generator expressions., 2013-01-19).  If a property
is unset (null), and the link implementation of the target was not being
evaluated, this commit made it possible to evaluate the property from the
link implementation instead.  If the link implementation was being evaluated,
an empty string was returned from the generator expression evaluation, which
might be later reported as an error.

The above logic was written for 'compatible interface' properties, but in
fact it should have also included other properties.  Because of the
empty-string-instead-of-null bug, this code block is not entered for the
INCLUDE_DIRECTORIES property.  At this point, however, the bug still does
not significantly affect behavior, because the follow-up code is still a
no-op for the INCLUDE_DIRECTORIES property, and an empty string is returned
regardless. Commit v2.8.11~189^2~6 (Use the link information as a source of
compile definitions and includes., 2013-02-12) refactored the logic, but also
without a change in behavior.

Commit v2.8.11~156^2~2 (Expand includes and defines transitively
in 'external' genexes., 2013-02-13) refactored the logic again, this time with
a change of behavior. The INCLUDE_DIRECTORIES property was then mapped to
INTERFACE_INCLUDE_DIRECTORIES during transitive generator expression
evaluation.  Because the transitive evaluation involved evaluation of the
link implementation, this introduced a recursive loop and a segfault with
code like:

  add_library(empty1 ...)
  add_library(empty2 ...)
  target_link_libraries(empty1
    PRIVATE
      $<$<STREQUAL:$<TARGET_PROPERTY:INCLUDE_DIRECTORIES>,/foo/bar>:empty2>
  )

As there is no real use-case for reading a target property like that while
evaluating the link implementation, this went unnoticed.  The same pattern
was followed for other special-cased reads of transitive target properties
such as COMPILE_DEFINITIONS.

The segfault was fixed in the parent commit, but change the property to
return null when appropriate for other future uses.
2014-07-02 00:10:58 +02:00
Stephen Kelly 61ce654742 Genex: Fix stack overflow in transitive property evaluation.
Commit v2.8.11~156^2~2 (Expand includes and defines transitively
in 'external' genexes., 2013-02-13) introduced a recursive loop
and a stack overflow during evaluation of a link implementation
which depends on a transitive property, such as

 add_library(empty1 ...)
 add_library(empty2 ...)
 target_link_libraries(empty1
   PRIVATE
     $<$<STREQUAL:$<TARGET_PROPERTY:INCLUDE_DIRECTORIES>,/foo/bar>:empty2>
 )

There is no use-case for code like that currently, but it should not
cause a stack overflow.

Avoid the recursion by reporting an error early if a case like this
is found.
2014-07-02 00:09:38 +02:00
Ben Boeckel ac8879ce91 Ninja: Add order-only dependencies to link commands (#14728)
A library or executable target that consists only of a reference to an
object library may have no sources to compile or custom commands to run.
The command in the target is the link (or archive) command.  Add missing
order-only dependencies to link commands so that target ordering
dependencies are satisfied for it without depending on an intermediate
compilation rule.

Extend the ObjectLibrary test to cover this case.

Co-Author: Brad King <brad.king@kitware.com>
2014-07-01 10:14:28 -04:00
Brad King e4767a2b6d Merge topic 'ninja-no-phony-sources'
93371ed5 Ninja: Skip generating empty phony rules
7243c951 Ninja: Don't limit custom cmd side-effects to build folder (#14972)
a33cf6d0 Ninja: Consider only custom commands deps as side-effects (#14972)
2014-07-01 09:23:19 -04:00
Clinton Stimpson 9571214e55 Encoding: Replace some system calls with kwsys calls which handle unicode. 2014-07-01 06:38:35 -06:00
Kitware Robot 949715f027 CMake Nightly Date Stamp 2014-07-01 00:01:07 -04:00
Brad King 1563668fd0 Merge topic 'vs14-generator'
f0e298ad Help: Add notes for topic 'vs14-generator'
5c105140 Tests: Simplify LoadCommand tests
b1cbd577 FindBoost: Add -vc140 mangling for VS 14
bdc7d9c8 VS14: Fix Cl and Link flag tables as previous versions
d96b3f68 VS14: Generate flag tables from MSBuild v140 tool files
65624c39 VS14: Add Visual Studio 14 generator (#14982)
8635ac23 Tests/Preprocess: Remove unnecessary VS version tests
2014-06-30 14:50:34 -04:00
Adam Strzelecki 93371ed592 Ninja: Skip generating empty phony rules
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.
2014-06-30 09:33:37 -04:00
Adam Strzelecki 7243c95129 Ninja: Don't limit custom cmd side-effects to build folder (#14972)
Actually custom command can write wherever it wants to, such as temporary
folder or source folder, possibly violating rules that only build folder should
be affected. Therefore we should consider custom command dependency at any path
as possible side effect adding phony rule.

We avoid adding phony rules for regular source files (since the paraent
commit) so we no longer need the in-build-tree test to avoid them.
2014-06-30 09:33:37 -04:00
Adam Strzelecki a33cf6d088 Ninja: Consider only custom commands deps as side-effects (#14972)
Since commit v2.8.12~248^2 (Ninja: Custom Command file depends don't
need to exist before building, 2013-06-07) all explicit dependencies
inside build folder were considered as possible build command
side-effects and phony rules were produced for them in case they don't
exist when starting to build. This is unnecessary since regular compile
inputs need to exist or cmake will fail.  Moreover the exception for
sources having GENERATED property that can be missing is already handled
by WriteAssumedSourceDependencies.

This fixes unwanted phony rules for all regular source files when doing
in-source build, causing Ninja not complain when such files gets missing,
i.e. during development. Also this reduces number of rules in ninja.build.

Now only custom command dependencies are considered as possible side-effects.
2014-06-30 09:33:37 -04:00
Kitware Robot ad8442075d CMake Nightly Date Stamp 2014-06-30 00:01:08 -04:00
Kitware Robot 34f25e4f8c CMake Nightly Date Stamp 2014-06-29 00:01:09 -04:00
Kitware Robot c7cf28ae35 CMake Nightly Date Stamp 2014-06-28 00:01:08 -04:00
Brad King a87e8056ac Merge topic 'bootstrap-cmake-locations'
6650b0fa bootstrap: Fix "make test" and "make package" targets (#14989)
bc151757 bootstrap: Clarify name of configured source directory
2014-06-27 09:42:50 -04:00
Brad King 55bba3a197 Merge topic 'refactor-link-internals'
24637979 cmTarget: Refactor ComputeLinkImplementation
7812d2a9 cmTarget: Pre-indent a block in ComputeLinkImplementation
f48d8bd6 cmTarget: Shorten a long line in ComputeLinkImplementation
7b0834e9 cmTarget: Refactor internal LinkImplementation map
b8651d97 cmTarget: Remove unnecessary 'mutable' markup
0192be51 cmTarget: De-duplicate link interface evaluation for $<LINK_ONLY>
6ead631b cmTarget: Teach GetLinkInterfaceLibraries to support $<LINK_ONLY>
b030a7f1 cmTarget: De-duplicate link interface genex code for $<LINK_ONLY>
1001490d cmTarget: Teach ExpandLinkItems how to support $<LINK_ONLY>
2014-06-27 09:42:46 -04:00
Brad King 4fc453c420 Merge topic 'stringapi-crash-cleanup'
3bae343f cmCPackGenerator: Avoid crash on undefined CMAKE_MAKE_PROGRAM
2014-06-27 09:42:44 -04:00
Brad King 3138da6e67 Merge topic 'install-messages'
d19b64d6 install(DIRECTORY): Add MESSAGE_NEVER option to avoid output (#13761)
c9568de5 install: Add CMAKE_INSTALL_MESSAGE variable (#13761)
ec7cf7ea install: Thread message level setting through internal API
abebcd23 file(INSTALL): Add undocumented options to control output verbosity
464567a5 file(INSTALL): Report existing DIRECTORY as Up-to-date
f701b0b7 file(INSTALL): Do not pre-create DESTINATION for DIRECTORY
f0a01962 cmInstallTargetGenerator: Drop default constructor arguments
67815894 Help: Add install() command document section headers
2014-06-27 09:42:42 -04:00
Kitware Robot feb44093bc CMake Nightly Date Stamp 2014-06-27 00:01:09 -04:00
Kitware Robot ed7f3b81a8 CMake Nightly Date Stamp 2014-06-26 00:01:16 -04:00
Brad King bdc7d9c8d9 VS14: Fix Cl and Link flag tables as previous versions
Apply the flag table fixes from:

 commit 9c7f234c (VS: Fix /MANIFESTUAC:NO linker option mapping, 2014-05-07)
 commit e8633e66 (VS: Fix /analyze:log flag mapping, 2014-04-01)
 commit f2caf795 (VS: Fix /MAP:mapfile flag mapping, 2013-07-09)

to the VS 14 flag tables.
2014-06-25 14:51:23 -04:00
Brad King d96b3f68f4 VS14: Generate flag tables from MSBuild v140 tool files
Run cmparseMSBuildXML.py on cl.xml, lib.xml, and link.xml to generate
our flag tables:

 python cmparseMSBuildXML.py -x ".../MSBuild/Microsoft.Cpp/v4.0/V140/1033/cl.xml" > cmVS14CLFlagTable.h
 python cmparseMSBuildXML.py -x ".../MSBuild/Microsoft.Cpp/v4.0/V140/1033/lib.xml" > cmVS14LibFlagTable.h
 python cmparseMSBuildXML.py -x ".../MSBuild/Microsoft.Cpp/v4.0/V140/1033/link.xml" > cmVS14LinkFlagTable.h

Fix up the declaration names at the top of each file.  Finally, teach
cmVisualStudio10TargetGenerator to select the version of the table
matching the version of VS.

Co-Author: Pawel Stopinski <diokhan@go2.pl>
2014-06-25 14:51:21 -04:00
Brad King 65624c39e3 VS14: Add Visual Studio 14 generator (#14982)
Call the generator "Visual Studio 14" without any year because this
version of VS does not provide a year in the product name.

Copy cmGlobalVisualStudio12Generator to cmGlobalVisualStudio14Generator
and update version numbers accordingly.  Add the VS14 enumeration value.
Teach the platform module Windows-MSVC to set MSVC14 and document the
variable.  Teach module InstallRequiredSystemLibraries to look for the VS
14 runtime libraries.

Teach tests CheckCompilerRelatedVariables, VSExternalInclude, and
RunCMake.GeneratorToolset to treat VS 14 as they do VS 10, 11, and 12.

Co-Author: Pawel Stopinski <diokhan@go2.pl>
2014-06-25 14:51:19 -04:00
Brad King 6650b0fa43 bootstrap: Fix "make test" and "make package" targets (#14989)
Since commit v3.0.0-rc1~374^2 (Refactor internal resource location APIs
and initialization, 2013-11-07) a bootstrap-built "cmake" tries to
reference "ctest" and "cpack" executables next to itself, which never
exist.  Teach cmSystemTools::FindCMakeResources, when bootstrap-built,
to refer to the "ctest" and "cpack" executables in the location where
they will be built after "make".
2014-06-25 13:37:46 -04:00
Brad King bc1517579d bootstrap: Clarify name of configured source directory
Rename CMAKE_ROOT_DIR to CMAKE_BOOTSTRAP_SOURCE_DIR to clarify both that
it is only for bootstrap and that it refers to the source directory.
2014-06-25 13:37:46 -04:00
Brad King cbf0107977 Merge topic 'refactor-link-internals'
f5c18c9c cmTarget: Drop GetDirectLinkLibraries methods
281eb3d8 cmTarget: Improve HaveBuildTreeRPATH implementation
d912220e cmTarget: Lookup targets in LinkInterface and LinkImplementation
edce4351 cmExportFileGenerator: Make SetImportLinkProperty a template
097be413 cmTarget: Add GetUtilityItems to get target ordering dependencies
4dad5fd2 cmTarget: Add cmLinkItem to refer to a target by name and pointer
a2723442 Fix scope of transitive target name lookups
069d60fe cmTarget: Add method to lookup other targets in a target's scope
47ab3ca6 cmTarget: Constify GetLinkImplementationClosure results
9f3ed029 cmTarget: Constify GetTransitivePropertyTargets results
6f0951af cmTarget: Drop 'head' target from GetImportInfo
0dc9e88d cmTarget: Remove 'head' argument from GetLinkImplementation
4ac72455 cmTarget: Drop 'head' argument from GetLinkClosure
bcdb7ff9 cmTarget: Remove 'head' argument from GetLinkerLanguage
bd9b667b cmComputeLinkInformation: Remove 'head' argument
06328dd5 cmTarget: Remove 'head' argument from GetLinkInformation
...
2014-06-25 13:11:50 -04:00
Brad King 4c27c51f25 Merge topic 'launcher-limit-warnings-errors'
f7303131 CTest: Teach the launchers to honer the max warnings and errors
2014-06-25 10:53:09 -04:00
Bill Hoffman f730313143 CTest: Teach the launchers to honer the max warnings and errors
The ctest launcher code did not respect the number of errors and
warnings limits.  Limit the number of launcher report fragments that we
report in the final submission.
2014-06-25 10:53:34 -04:00
Brad King 1b40fc835e Merge topic 'style-fix'
3c5eac1f cmCTestMemCheckHandler: Fix coding style in this class
2014-06-25 10:53:07 -04:00
Bill Hoffman 3c5eac1fbb cmCTestMemCheckHandler: Fix coding style in this class
This class had a method that started with lower case, and also
was called without this->.
2014-06-25 10:51:45 -04:00
Brad King 2463797996 cmTarget: Refactor ComputeLinkImplementation
Use LinkImplementationPropertyEntries directly instead of asking
GetProperty to construct a string for LINK_LIBRARIES.  This gives us
access to the entry backtraces.
2014-06-25 10:33:36 -04:00