Commit Graph

23875 Commits

Author SHA1 Message Date
Brad King a02c30c294 Merge topic 'hpux-compile'
be53734d CompileFlags: Add -AA +hpxstd98 on HP-UX 11.11 with aCC
f4b9c6bb CompileFlags: Test for C++ features after selecting flags
2014-04-04 13:33:37 -04:00
Rolf Eike Beer be53734d3c CompileFlags: Add -AA +hpxstd98 on HP-UX 11.11 with aCC
These flags are needed to enable support for C++98.  Also teach the
'bootstrap' script to add them if necessary.
2014-04-04 13:31:28 -04:00
Rolf Eike Beer f4b9c6bbeb CompileFlags: Test for C++ features after selecting flags
Some flags we select may affect availability of C++ features.
2014-04-04 13:30:25 -04:00
Brad King a43d82dca4 Merge topic 'fix-CTestTestFailedSubmit-ftp-for-osx-system-curl'
63d864a0 Tests: Fix CTestTestFailedSubmit-ftp with OS X system libcurl
2014-04-04 11:38:10 -04: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 1dc59debcc Merge topic 'Qt4Macros-moc-performance'
7beba986 Qt4Macros: Make QT4_CREATE_MOC_COMMAND a function
2014-04-04 11:38:02 -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
Alex Ciobanu 63d864a026 Tests: Fix CTestTestFailedSubmit-ftp with OS X system libcurl
On OS X 10.9 the system libcurl has a different error message when
failing to connect:

  Failed connect to :21; Connection refused

Match this message to pass the test.
2014-04-03 16:48:37 -04:00
Brad King bc0e9806d7 Merge topic 'ExternalProject_exclude-from-all'
f4fe6322 Help: Add notes for topic 'ExternalProject_exclude-from-all'
2014-04-03 15:56:40 -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 f4fe632297 Help: Add notes for topic 'ExternalProject_exclude-from-all' 2014-04-03 13:14:29 -04:00
Robert Maynard 7beba98652 Qt4Macros: Make QT4_CREATE_MOC_COMMAND a function
QT4_CREATE_MOC_COMMAND is given a moc_flags argument that contains the
COMPILE_DEFINITIONS and a potentially large list of include directories.
Since it is a macro, the ${moc_flags} reference is replaced with this
content and sent through cmMakefile::ExpandVariablesInString (EVIS).
Since commit v3.0.0-rc1~138^2 (Qt4: Use generator expression in
COMPILE_DEFINITIONS, 2014-01-13) the COMPILE_DEFINITIONS value contains
a '$' so the EVIS fast-path is no longer used.  Instead the full
cmCommandArgumentParserHelper is now used on the large input, which is
very slow (since it was originally created for hand-written code).

Change QT4_CREATE_MOC_COMMAND to a function instead of a macro to avoid
passing large content through EVIS.  This makes it significantly faster.
2014-04-03 12:58:58 -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 2ea57eb007 Merge topic 'suppress-conversion-warnings-in-QtWidgets'
391c73db CTestCustom: Suppress conversion warnings in QtWidgets headers
2014-04-03 12:51:48 -04:00
Brad King 40a922cce6 Merge topic 'doc-find-module-development'
fcdf86d0 Help: Rewrite the cmake-developer.7 find module documentation
2014-04-03 12:51:47 -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 7d34041709 Merge topic 'watcom-platform-module-cleanup'
1e22b23c Watcom: Cleanup Windows-wcl386 configuration
2014-04-03 12:51:43 -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 6314188362 Merge topic 'workaround-qt4-assistant'
3a572290 Help: Workaround Qt 4.8 assistant bug in CSS handling.
2014-04-03 12:51:38 -04:00
Brad King 487f7a41ec Merge topic 'ExternalProject_exclude-from-all'
1ddcc582 ExternalProject: Add EXCLUDE_FROM_ALL option to ExternalProject_Add
0a1c0129 ExternalProject: Add EXCLUDE_FROM_MAIN option to ExternalProject_Add_Step
2014-04-03 12:51:37 -04:00
Brad King 7fcf0277c9 Merge topic 'FindGTest-TEST_P'
2e2939c3 FindGTest: Teach GTEST_ADD_TESTS about TEST_P
2014-04-03 12:51:35 -04:00
Brad King 84966ac161 Merge topic 'suppress-lexer-warnings'
065166cf CTestCustom: Suppress Clang "will never be executed" warnings in lexers
2014-04-03 12:51:34 -04:00
Brad King 23b4abb260 Merge branch 'upstream-kwsys' into update-kwsys 2014-04-03 08:43:51 -04:00
KWSys Robot eccc425af6 KWSys 2014-04-02 (39f98b5d)
Extract upstream KWSys using the following shell commands.

$ git archive --prefix=upstream-kwsys/ 39f98b5d | tar x
$ git shortlog --no-merges --abbrev=8 --format='%h %s' a8aa1014..39f98b5d
Brad King (1):
      39f98b5d Encoding: Add self-assignment check to CommandLineArguments

Jiri Malak (1):
      36982798 SystemTools: add Watcom single Quote processing

Change-Id: Ib8e67dc0c29ee62e6489c068987e4206fa4adaf3
2014-04-03 08:43:46 -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
Stephen Kelly 81ad69e056 Make the SOURCES target property writable. 2014-04-02 23:14:02 +02:00
Stephen Kelly 6e636f2eba cmTarget: Make the SOURCES origin tracable. 2014-04-02 23:14:02 +02:00
Stephen Kelly 3676fb4963 cmTarget: Allow transitive evaluation of SOURCES property.
Extend the cmGeneratorExpressionDAGChecker with an interface
returning the name of the top target.  Use that to determine
when there is a DAG violation, as required by the RunCMake.Languages
tests.
2014-04-02 23:14:02 +02:00
Stephen Kelly e6971df6ab cmTarget: Make the source files depend on the config.
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.
2014-04-02 23:14:02 +02:00
Stephen Kelly df753df94b cmGeneratorTarget: Don't add computed sources to the target.
When config-specifig generator expressions are supported, a target
may have SOURCES:

 src1.cpp $<$<CONFIG:Debug>:src2.cpp> $<$<CONFIG:Release>:src3.cpp>

and computation in cmTargetTraceDependencies would add each of the
src2.cpp and src3.cpp sources back to the target without a
config-guard.  That would make the sources be used later when
generating the buildsystem, regardless of the configuration.

Avoid calling AddSource on the target with the result of the
GetSourceFiles call.
2014-04-02 23:14:02 +02:00
Stephen Kelly 869328aac3 cmComputeTargetDepends: Use valid config to compute target depends.
If CMAKE_BUILD_TYPE is set, and user code contains:

 target_link_libraries(myexe prefix_$<$<CONFIG:Debug>:debug>)

then the computation with an empty config was computing a target-level
dependency on a target or library called prefix_, and a dependency
on a target or library called prefix_debug (as expected).

The existing logic skips 'prefix_' because it is not a known target,
and defers to the link-dependencies logic to find the library. The
link-dependencies logic does not incorrectly handle the config as
cmComputeTargetDepends did, and so did not encounter 'prefix_'
during its computation. This likely had no effect on the generated
buildsystem.
2014-04-02 23:14:02 +02:00
Stephen Kelly 5de63265e3 Genex: Only evaluate TARGET_OBJECTS to determine target sources.
The output of this expression may contain macros for IDEs to replace
such as $(Configuration), $(CURRENT_ARCH) etc.  To avoid generating
content which is not usable in other contexts, report an error if
there is an attempt to use it in other contexts.

This commit may be reverted in the future if a solution to the
above difference is implemented.
2014-04-02 23:12:57 +02:00
Stephen Kelly aa0a3562dd cmGeneratorTarget: Compute target objects on demand
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.
2014-04-02 23:12:57 +02:00
Stephen Kelly 042c1c834e cmTarget: Compute languages from object libraries on demand. 2014-04-02 23:12:56 +02:00
Stephen Kelly fdcefe3c42 cmGeneratorTarget: Compute consumed object libraries on demand.
Remove up-front object library computation from cmGlobalGenerator.

Adjust tests for message coming from the generator expression
evaluation.
2014-04-02 23:12:56 +02:00
Stephen Kelly c355d10865 cmComputeTargetDepends: Track object library depends.
Relieve cmGeneratorTarget of that responsibility.
2014-04-02 23:12:56 +02:00
Stephen Kelly e5da9e51d0 cmTarget: Allow any generator expression in SOURCES property.
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.
2014-04-02 23:12:56 +02:00
Stephen Kelly 5702e10677 cmTarget: Include TARGET_OBJECTS genex in target SOURCES property.
Add policy CMP0051 to control this behavior.
2014-04-02 23:12:56 +02:00
Brad King 13684e2b78 cmMakefile: Port PolicyOptionalWarningEnabled to string APIs
This method was added in a commit based on a release branch that
pre-dated the std::string API changes.  Port the implementation to use
the string APIs instead of c_str().
2014-04-02 14:44:45 -04:00