Commit Graph

16010 Commits

Author SHA1 Message Date
Rolf Eike Beer 2622bc3f65 Clean up usage of if(... MATCHES regex) followed string(REGEX REPLACE regex)
The matches have already been calculated and can simply be taken from
CMAKE_MATCH_n variables. This avoids multiple compilations of the same or very
similar regular expressions.
2014-04-14 18:16:58 +02:00
Kitware Robot b8fd66f31c CMake Nightly Date Stamp 2014-04-14 00:01:05 -04:00
Kitware Robot 99514c7e9c CMake Nightly Date Stamp 2014-04-13 00:01:07 -04:00
Kitware Robot 973b3e7dcd CMake Nightly Date Stamp 2014-04-12 00:01:13 -04:00
Brad King 0c08da9912 Merge topic 'watcom-link-quoting'
cb9b1e13 Watcom: Use single quote for all file/path items in wlink command
2014-04-11 09:13:07 -04:00
Kitware Robot 6736b3e746 CMake Nightly Date Stamp 2014-04-11 00:01:09 -04:00
Brad King 5c63c13190 Merge topic 'install-prefix-in-interface'
783bce29 Export: Disallow exported interface includes in src/build tree (#14592).
c869984e RunCMake: Allow specifying the source dir and file to test.
2014-04-10 09:53:13 -04:00
Brad King e983ed7c9a Merge topic 'suppress-warning-in-comment'
a9fe65c3 cmSystemTools: Remove unreachable return on HP compiler
72e137ea Re-word comment on unreachable return statements
2014-04-10 09:53:11 -04:00
Brad King 9ac73a8c03 Merge topic 'update-kwsys'
f401b925 Merge branch 'upstream-kwsys' into update-kwsys
c54be583 KWSys 2014-04-07 (8b085635)
2014-04-10 09:53:10 -04:00
Brad King 5e6f279411 Merge topic 'aix-compile'
539b6c58 Fix build on AIX failing because of access to string elements
2014-04-10 09:53:08 -04:00
Brad King c590889310 Merge topic 'optimize-source-file-processing'
4f1c71fd cmTarget: Add all sources traced from custom commands at once.
b1c3ae33 cmTarget: Short-circuit language computation if context independent.
2014-04-10 09:53:05 -04:00
Kitware Robot 22018b6e93 CMake Nightly Date Stamp 2014-04-10 00:01:06 -04:00
Stephen Kelly 783bce295b Export: Disallow exported interface includes in src/build tree (#14592).
Allow directories in the source tree or build tree only if the
install tree is a subdirectory of the source tree or build tree,
as appropriate.

Re-use the test files in the RunCMake.include_directories test
to run in multiple scenarios.  Bump the required CMake version
in the test to 3.0 to ensure that the new policy warnings are
emitted correctly.
2014-04-09 10:38:49 +02:00
Stephen Kelly 4f1c71fdd2 cmTarget: Add all sources traced from custom commands at once.
The AddSource method accepts one file and tries to avoiding adding
it to the sources-list of the target if it already exists.  This
involves creating many cmSourceFileLocation objects for matching
on existing files, which is an expensive operation.

Avoid the searching algorithm by appending the new sources as one
group.  Generate-time processing of source files will ensure
uniqueness.

Add a new AddTracedSources for this purpose.  The existing
AddSources method must process the input for policy CMP0049, but
as these source filenames come from cmSourceFile::GetFullPath(),
we can forego that extra processing.
2014-04-09 10:37:00 +02:00
Stephen Kelly b1c3ae33ea cmTarget: Short-circuit language computation if context independent.
Computing the language involves computing the source files, which
is an expensive operation.  It requires calling
cmMakefile::GetOrCreateSource many times, which involves creating
and matching on many cmSourceFileLocation objects.

Source files of a target may depend on the head-target and the
config as of commit e6971df6 (cmTarget: Make the source files depend
on the config., 2014-02-13).  The results are cached for each context
as of commit c5b26f3b (cmTarget: Cache the cmSourceFiles in
GetSourceFiles., 2014-04-05).

Each target in the build graph causes language computation of all
of its dependents with itself as the head-target.  This means that
for 'core' libraries on which everything depends, the source files
are computed once for every transitive target-level-dependee and
the result is not cached because the head-target is different. This
was observed in the VTK buildsystem.

Short circuit the computation for targets which have a source-list
that is independent of the head-target.  If the source-list has
already been computed and the generator expression evaluation
reports that it was context-independent, return the only source-list
already cached for the target.  Reset the short-circuit logic when
sources are added and when the link libraries are re-computed.
2014-04-09 10:37:00 +02:00
Kitware Robot 8512bb4fff CMake Nightly Date Stamp 2014-04-09 00:01:06 -04:00
Jiri Malak cb9b1e13e4 Watcom: Use single quote for all file/path items in wlink command
Watcom Linker use single quote if necessary for quoting target name,
libraries names and libraries search path.  Object names were already
fixed.
2014-04-08 13:28:54 -04:00
Brad King f401b925cf Merge branch 'upstream-kwsys' into update-kwsys 2014-04-08 13:06:14 -04:00
Brad King a9fe65c316 cmSystemTools: Remove unreachable return on HP compiler
Follow up commit 1de08685 (cmSystemTools: Restore unreachable return to
silence warnings, 2014-04-02) by excluding the unreachable return on the
HP compiler as well as Clang.  Both recognize that it is unreachable and
warn.
2014-04-08 08:48:08 -04:00
Kitware Robot 9b1abc543e CMake Nightly Date Stamp 2014-04-08 00:01:05 -04:00
Brad King 7f7d6a4030 Merge topic 'optimize-source-file-processing'
a4e6bf8e cmTarget: Make GetSourceFiles string overload private.
92e2fbe1 cmGeneratorTarget: Trace cmSourceFile objects instead of strings.
c5b26f3b cmTarget: Cache the cmSourceFiles in GetSourceFiles.
eb163f37 cmTarget: Extract a ProcessSourceItemCMP0049 method.
19b7c22d Ninja: Query custom commands once per target, not once per file.
2014-04-07 10:14:23 -04:00
Brad King 72e137ea7d Re-word comment on unreachable return statements
Do not use the word "warning" in the comment because CTest launchers
match it and CTestCustom.cmake.in does not suppress it.
2014-04-07 10:10:04 -04:00
Kitware Robot 4023bd7b11 CMake Nightly Date Stamp 2014-04-07 00:01:06 -04:00
Stephen Kelly a4e6bf8e36 cmTarget: Make GetSourceFiles string overload private.
Consumers should use the cmSourceFile overload, which is now
always the case.
2014-04-06 10:02:34 +02:00
Stephen Kelly 92e2fbe103 cmGeneratorTarget: Trace cmSourceFile objects instead of strings.
This reverses the decision in commit d38423ec (cmTarget: Add a
method to obtain list of filenames for sources., 2014-03-17).  The
cmSourceFile based API is preferred because that avoids creation of
many cmSourceFileLocation objects for matching strings, and the
result is cached by cmTarget.
2014-04-06 10:02:34 +02:00
Stephen Kelly c5b26f3bec cmTarget: Cache the cmSourceFiles in GetSourceFiles.
Avoid calling GetSourceFiles with the same result container multiple
times when tracing target dependencies.  The result from the previous
configuration is cached and used later otherwise.
2014-04-06 10:02:34 +02:00
Stephen Kelly eb163f37d4 cmTarget: Extract a ProcessSourceItemCMP0049 method.
Avoid calling AddSource for each src filename.  That involves
checking each entry for uniqueness and creating a separate
generator expression for each one.

Instead, add a single entry for the list of sources.  The source
files are passed through a uniqueness filter at generate-time, so
duplicates don't matter so much.
2014-04-06 10:02:34 +02:00
Kitware Robot e6aace96eb CMake Nightly Date Stamp 2014-04-06 00:01:08 -04:00
Stephen Kelly 19b7c22d02 Ninja: Query custom commands once per target, not once per file.
Computing the source files is now more expensive, so the Ninja
generator became very slow with a large number of files.
2014-04-05 14:22:48 +02:00
Kitware Robot d5a32737cf CMake Nightly Date Stamp 2014-04-05 00:01:06 -04:00
Rolf Eike Beer 539b6c58f5 Fix build on AIX failing because of access to string elements
The compilation failed with this error message:

.../Source/cmCryptoHash.cxx: In method `string cmCryptoHash::HashString (const string &)':
.../Source/cmCryptoHash.cxx:41: non-lvalue in unary `&'

This was introduced in 77f60392d9 (stringapi:
Accept strings when MD5 hashing data).
2014-04-04 23:25:33 +02:00
Brad King 079153e98e Merge topic 'compiler-warning-cleanup'
6c190245 Remove extra semicolons from C++ code.
4bef02e7 cmTypeMacro: Add a class to eat the semicolon following the macro use.
ff710539 Remove default labels from fully covered switch statements.
2014-04-04 11:38:06 -04:00
Brad King aeb930fcce Merge topic 'remove-stray-aborts'
c4059a21 cmTarget: Remove abort() after INTERNAL_ERROR reports
2014-04-04 11:38:04 -04:00
Brad King 84487e9159 Merge topic 'update-kwsys'
23b4abb2 Merge branch 'upstream-kwsys' into update-kwsys
eccc425a KWSys 2014-04-02 (39f98b5d)
2014-04-04 11:38:01 -04:00
Brad King 4a227d280b Merge topic 'cmMakefile_IsOn_fix_comment'
a40f57e4 cmMakefile: Revise comment describing IsOn()
2014-04-04 11:37:59 -04:00
Daniele E. Domenichelli a40f57e485 cmMakefile: Revise comment describing IsOn() 2014-04-04 11:36:14 -04:00
Kitware Robot ce0aae7039 CMake Nightly Date Stamp 2014-04-04 00:01:07 -04:00
Stephen Kelly 6c19024570 Remove extra semicolons from C++ code.
Clang based tools running over the code complain about these,
but clang has a fixit for removing them.
2014-04-03 21:53:14 +02:00
Stephen Kelly 4bef02e7aa cmTypeMacro: Add a class to eat the semicolon following the macro use.
Apply the same workaround to the cmCPackTypeMacro. Additionally
change that macro to not use 'class' as a macro parameter.
2014-04-03 21:53:13 +02:00
Stephen Kelly ff710539ab Remove default labels from fully covered switch statements.
Allow compilers to warn when new enum values are added, making
switches no-longer fully-covered.
2014-04-03 21:53:13 +02:00
Brad King c4059a21a9 cmTarget: Remove abort() after INTERNAL_ERROR reports
After reporting an internal error we should continue rather than
aborting.  Remove such statements that are left from debugging.
2014-04-03 14:05:03 -04:00
Brad King 5376151aa1 Merge topic 'target-transitive-sources'
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.
2014-04-03 12:51:53 -04:00
Brad King 93054aa84f Merge topic 'target-sources-refactor'
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.
...
2014-04-03 12:51:51 -04:00
Brad King 1d4366ffac Merge topic 'revise-compiler-id-policies'
13684e2b cmMakefile: Port PolicyOptionalWarningEnabled to string APIs
8018fcca Merge branch 'master' into revise-compiler-id-policies
a41c0a9d Do not warn by default when policy CMP0025 or CMP0047 is not set
d339653e Help: Revise and format policy CMP0025 and CMP0047 docs
2014-04-03 12:51:49 -04:00
Brad King f92f7e8d23 Merge topic 'clang-warnings'
1de08685 cmSystemTools: Restore unreachable return to silence warnings
2014-04-03 12:51:45 -04:00
Brad King 3e87d7cbd0 Merge topic 'simplify-multi-config'
936e00b9 Simplify multiple config handling.
2014-04-03 12:51:42 -04:00
Brad King 8acd2b3ab4 Merge topic 'vs-flag-with-following-value'
e8633e66 VS: Fix /analyze:log flag mapping (#14858)
650199e7 VS: Support mapping flags with values following separately (#14858)
f2a3dd9d cmIDEOptions: Factor FlagMap update out to separate method
2014-04-03 12:51:40 -04:00
Brad King 23b4abb260 Merge branch 'upstream-kwsys' into update-kwsys 2014-04-03 08:43:51 -04:00
Kitware Robot 9f69a34f99 CMake Nightly Date Stamp 2014-04-03 00:01:06 -04:00
Stephen Kelly 9407174b1a target_sources: New command to add sources to target. 2014-04-02 23:14:02 +02:00