Commit Graph

15151 Commits

Author SHA1 Message Date
Kitware Robot 4d6b88d44b CMake Nightly Date Stamp 2013-11-06 00:01:11 -05:00
Brad King e313d397cd Merge topic 'fix-automoc-compile-definitions'
a1b9465 Automoc: Add directory-level COMPILE_DEFINITIONS to command line (#14535)
2013-11-05 13:32:15 -05:00
Stephen Kelly a1b9465bf8 Automoc: Add directory-level COMPILE_DEFINITIONS to command line (#14535)
In commit 18412153 (Refactor cmTarget::GetCompileDefinitions...,
2013-06-06) cmQtAutomoc was refactored to get all compile definitions
from the target instead of separately asking the target and querying the
directory-level COMPILE_DEFINITIONS property value.  While the
generation process does integrate directory-level COMPILE_DEFINITIONS
into the target definitions, this did not happen until after Automoc
targets are constructed.  Therefore the commit regressed use of
directory-level definitions in Automoc targets.

Factor the definition finalization logic out from the
cmGlobalGenerator::CreateGeneratorTargets method into a new
cmGlobalGenerator::FinalizeTargetCompileDefinitions method and call it
before constructing Automoc targets.  This will place the
directory-level definitions into the target in time to use them for the
Automoc targets.

Extend the QtAutomoc test to cover this case.
2013-11-05 12:00:49 -05:00
Brad King 4ab88500ae Merge topic 'cmake-E-autogen-crash'
132c40a cmake: Validate -E cmake_autogen argument count (#14545)
cc52b7d Merge branch 'cmake-E-automoc-crash' into cmake-E-autogen-crash
9ef66f2 cmake: Validate -E cmake_automoc argument count (#14545)
2013-11-05 08:17:10 -05:00
Brad King f506a2efbe Merge topic 'ninja-dont-parse-empty-depsflag'
f212615 Ninja: don't parse empty string
2013-11-05 08:16:47 -05:00
Brad King 132c40a8a8 cmake: Validate -E cmake_autogen argument count (#14545)
Do not access an argument index not known to exist.

Port the change from commit 9ef66f2b (cmake: Validate -E cmake_automoc
argument count, 2013-11-05) to the new location of the code.
2013-11-05 07:39:45 -05:00
Brad King 47694c40e3 Merge topic 'clear-evaluation-files'
2e388cc file(GENERATE): Clear internal records between configures
2013-11-05 07:26:46 -05:00
Kitware Robot f6f7531353 CMake Nightly Date Stamp 2013-11-05 00:01:07 -05:00
Brad King 2e388cc3c2 file(GENERATE): Clear internal records between configures
In the CMake interactive dialogs cmGlobalGenerator::Configure may
run more than once.  Clear the cmGlobalGenerator::EvaluationFiles
data between configures to avoid accessing deleted data.
2013-11-04 16:14:49 -05:00
Brad King b4a1f442bb Merge topic 'policy-CMP0022-fixes-for-master'
b51696f CMP0022: Update target_link_libraries plain signature documentation
25b7f87 Merge branch 'policy-CMP0022-fixes' into policy-CMP0022-fixes-for-master
0a561a0 CMP0022: Warn about a given target at most once
23d21b7 Do not export INTERFACE_LINK_LIBRARIES from non-linkable targets
ef10b87 CMP0022: Plain target_link_libraries must populate link interface
0e06788 CMP0022: Add test for target_link_libraries plain signature
c0f4a61 CMP0022: Add unit test for null pointer check and message.
4b0cfa7 Merge branch 'output-CMP0022-entries' into policy-CMP0022-fixes
2013-11-04 07:54:20 -05:00
Brad King eb3761ae68 Merge topic 'constify'
af4c109 cmGeneratorTarget: Make some accessors const.
6bdea06 cmTarget: Make some accessors const.
2013-11-04 07:54:03 -05:00
Brad King ae57fb8ef6 Merge topic 'robust-ctest_empty_binary_directory'
35fbc10 CTest: more aggressive implementation of ctest_empty_binary_directory()
9d9f102 Tests: added test for ctest_empty_binary_directory()
2013-11-04 07:53:47 -05:00
Brad King f3698f7c4a Merge topic 'cpack-drag-n-drop-rez'
53d6ebb cpack: For DragNDrop generator, add sysroot option when calling Rez.
193029c cpack: For DragNDrop generator, add sysroot option when calling Rez.
2013-11-04 07:53:25 -05:00
Peter Kümmel f212615d3e Ninja: don't parse empty string 2013-11-04 13:20:27 +01:00
Kitware Robot e405380d06 CMake Nightly Date Stamp 2013-11-04 00:01:10 -05:00
Stephen Kelly af4c1096f6 cmGeneratorTarget: Make some accessors const. 2013-11-03 22:27:28 +01:00
Stephen Kelly 6bdea066e6 cmTarget: Make some accessors const. 2013-11-03 22:27:28 +01:00
Brad King 25b7f87eca Merge branch 'policy-CMP0022-fixes' into policy-CMP0022-fixes-for-master
Resolve conflict in Source/cmTarget.cxx by integrating the changes to
the internal copy constructor from both sides.  Also resolve a logical
conflict by dropping the special case for INTERFACE_LIBRARY targets.
Since cmTarget::SetMakefile already forces CMP0022 to NEW for such
targets we need no special handling.

Resolve conflict in Source/cmTargetLinkLibrariesCommand.h by dropping
the documentation change.  We will make the same change in the new
location of the same documentation in a separate commit.

Resolve conflicts in

 Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-stderr.txt
 Tests/RunCMake/CMP0022/RunCMakeTest.cmake

by taking the side from the 'policy-CMP0022-fixes' branch.
2013-11-03 09:20:47 -05:00
Brad King 0a561a0347 CMP0022: Warn about a given target at most once
Since cmTarget::ComputeLinkInterface is called separately for each
"head" target that links a target, the warning we produce when
CMP0022 is not set could be repeated.  Add explicit logic to allow
the warning to appear at most once.  Multiple copies of the warning
for the same target are almost always identical and therefore
redundant.  In the rare case that two copies of the warning are
different, the second can appear in a future run after the first
is fixed.
2013-11-03 09:14:54 -05:00
Kitware Robot defbc2aa2a CMake Nightly Date Stamp 2013-11-03 00:01:08 -04:00
Brad King 23d21b78e1 Do not export INTERFACE_LINK_LIBRARIES from non-linkable targets
When cmExportFileGenerator::SetImportLinkInterface exports the old
LINK_INTERFACE_LIBRARIES property values it skips doing so for
non-linkable targets because target->GetLinkInterface returns NULL for
such targets.

Since cmExportFileGenerator::PopulateInterfaceLinkLibrariesProperty
looks at the INTERFACE_LINK_LIBRARIES property directly instead of using
the computed link interface, teach it to skip exporting the property if
target->IsLinkable returns false.

Extend the RunCMake.CMP0022 test with a case covering this.  Simply
export an executable target that links to a library that is not
exported.
2013-11-02 14:51:07 -04:00
Brad King ef10b87cc1 CMP0022: Plain target_link_libraries must populate link interface
The CMP0022 NEW behavior is that the INTERFACE_LINK_LIBRARIES property
exactly defines the link interface.  The plain target_link_libraries
signature says linking is transitive by default, so it should populate
the property.

Teach the target_link_libraries plain signature to populate the
INTERFACE_LINK_LIBRARIES regardless of the CMP0022 setting.  Refactor
the cmTarget::ComputeLinkInterface checks that warn when the policy is
not set to compare the new property to either the explicitly set old
link interface properties or the link implementation fallback for all
linkable target types, not just static libraries.

This fixes a regression in 2.8.12.0 that caused target_link_libraries to
not implement transitive linking in the plain signature once the policy
CMP0022 is set to NEW.
2013-11-02 12:55:17 -04:00
Brad King 4b0cfa7004 Merge branch 'output-CMP0022-entries' into policy-CMP0022-fixes 2013-11-02 12:47:45 -04:00
Brad King 6f6caee388 Merge topic 'archive-skip-symlink-on-windows'
4c383b5 cmake: Avoid '-E tar' failure to extract symlinks on Windows (#13251)
0d8552c cmSystemTools: Re-order extract_tar logic
2013-11-02 10:54:51 -04:00
Brad King 8ada96a39f Merge topic 'cmake-gui-warning'
82bacea cmake-gui: Rename local variable to avoid shadowing a member
2013-11-02 10:54:47 -04:00
Brad King f61bbf1b90 Merge topic 'ctest-p4'
1b54b1d ctest_update: Do not remove the p4 depot name
2013-11-02 10:54:42 -04:00
Brad King 872a9d6476 Merge topic 'object-library-no-TARGET_FILE'
d960589 Genex: Reject $<TARGET_FILE:...> for object libraries (#14532)
2013-11-02 10:54:23 -04:00
Brad King 53ac9b8d86 Merge topic 'object-library-missing-source'
5a2fc3d Check for OBJECT_LIBRARY source files at start of generation
2013-11-02 10:54:15 -04:00
Brad King 2043a86b6a Merge topic 'doc-rst-note-and-productionlist'
450b515 cmRST: Add support for the note and productionlist directives
2013-11-02 10:54:10 -04:00
Brad King 5b838ed383 Merge topic 'revert-accidental-changes'
13aea6d cmFindCommon: Revert accidental change
4064d6f target_link_libraries: Revert accidental change
2013-11-02 10:54:05 -04:00
Brad King 13aea6d175 cmFindCommon: Revert accidental change
In commit c4373b33 (cmTarget: Make GetProperty() const, 2013-10-29)
we accidentally changed the cmFindCommon.cxx logic in a way that
looks like a local experiment leftover that went unnoticed due to
the size of the other changes in the commit.  Revert it.
2013-11-02 10:45:15 -04:00
Nils Gladitz 35fbc10079 CTest: more aggressive implementation of ctest_empty_binary_directory()
Make sure that CMakeCache.txt is the last file being removed since
the binary directory may be left in a state that is no longer
removable otherwise.

Also retry removal a couple of times which makes this more robust
on windows where file locks may temporarily prevent removal.
2013-11-02 13:05:38 +01:00
Brad King 4064d6f216 target_link_libraries: Revert accidental change
In commit c4373b33 (cmTarget: Make GetProperty() const, 2013-10-29)
we accidentally changed the cmTargetLinkLibrariesCommand.cxx logic
in a way that looks like a local experiment leftover that went
unnoticed due to the size of the other changes in the commit.
Revert it.
2013-11-02 07:11:51 -04:00
Kitware Robot 547c59f000 CMake Nightly Date Stamp 2013-11-02 00:01:11 -04:00
Brad King 4c383b52d0 cmake: Avoid '-E tar' failure to extract symlinks on Windows (#13251)
If a symlink fails to extract and the host system is Windows then report
a warning and skip the entry instead of failing.  This will allow
archives containing symbolic links to be extracted on Windows with
somewhat gracefully degraded behavior.
2013-11-01 16:52:22 -04:00
Brad King 0d8552c459 cmSystemTools: Re-order extract_tar logic
Simplify extraction message logic to be easier to follow and to write a
newline before any error messages that may be produced.  Also flip
handling of the archive_write_header return code to handle success in
the "then" case and failure in the "else" case.
2013-11-01 16:52:18 -04:00
Brad King 5a2fc3d696 Check for OBJECT_LIBRARY source files at start of generation
Teach cmGlobalGenerator::CheckTargets to include OBJECT_LIBRARY targets
in the check for source file existence.

Extend the RunCMake.ObjectLibrary test to cover this case.
2013-11-01 14:46:58 -04:00
Brad King 82baceaa60 cmake-gui: Rename local variable to avoid shadowing a member
Address warnings:

 Source/QtDialog/CMakeSetupDialog.cxx:1233:15:
 warning: declaration of 'cursor' shadows a member of 'this' [-Wshadow]
 Source/QtDialog/CMakeSetupDialog.cxx:1260:15:
 warning: declaration of 'cursor' shadows a member of 'this' [-Wshadow]

by renaming the local variable to 'textCursor'.
2013-11-01 12:56:43 -04:00
Brad King d960589778 Genex: Reject $<TARGET_FILE:...> for object libraries (#14532)
Teach the cmGeneratorExpressionEvaluator filesystem artifact logic
to reject OBJECT_LIBRARY targets since they have no main artifact.
Without the explicit rejection evaluation falls through to an
internal CMake error message in cmTarget::GetOutputInfo.

Extend the RunCMake.GeneratorExpression test to cover these cases.
2013-11-01 10:17:01 -04:00
Brad King 20bb609171 Merge topic 'fix-duplicate-test-run'
2eccdbd CTest: prevent tests from being inserted in the cost list twice
2013-11-01 09:40:26 -04:00
Brad King de5c29890f Merge topic 'constify'
c4373b3 cmTarget: Make GetProperty() const.
cfb6661 Don't call SetProperty from GetProperty.
2013-11-01 09:40:05 -04:00
Brad King a549b68d37 Merge topic 'cmake-syntax-recorded-brackets'
b54dbeb Test foreach/function/macro handling of bracket arguments
ccdf7e0 macro: Do not substitute for placeholders in bracket arguments
999abb9 macro: Add extra indentation to placeholder substitution code
2013-11-01 09:39:56 -04:00
Pedro Navarro 1b54b1d5b7 ctest_update: Do not remove the p4 depot name
Instead of removing the depot name, which causes problems when looking
at the file change list in CDash, make the Update test remove a given
prefix from the files retrieved from Update.xml.
2013-11-01 08:52:26 -04:00
Clinton Stimpson 53d6ebb360 cpack: For DragNDrop generator, add sysroot option when calling Rez. 2013-11-01 05:31:07 -06:00
Kitware Robot 80c3420f30 CMake Nightly Date Stamp 2013-11-01 00:01:14 -04:00
Clinton Stimpson 193029c4aa cpack: For DragNDrop generator, add sysroot option when calling Rez.
Also adding overwrite option (-ov) in case multiple temporary
dmg files are being created.

Fixes bug #14536.
2013-10-31 20:25:12 -06:00
Nils Gladitz 2eccdbdc2a CTest: prevent tests from being inserted in the cost list twice 2013-10-31 22:10:56 +01:00
Stephen Kelly c4373b33b2 cmTarget: Make GetProperty() const.
This has follow-on effects for other methods and classes. Further
work on making the use of const cmTarget pointers common can be
done, particularly with a view to generate-time methods.
2013-10-31 14:52:11 +01:00
Brad King 7a616e75b8 Merge topic 'use-generator-target'
07f5788 Move TraceDependencies to cmGeneratorTarget.
fa03777 Do not populate SourceEntries in AddSourceFile.
2013-10-31 09:40:13 -04:00
Brad King d182a55adb Merge topic 'fix-ninja-launcher-errors-from-custom'
4fcb97e Tests: Add test for CTEST_USE_LAUNCHERS capture of custom commands
05c7042 Ninja: run custom commands through launcher if available
2013-10-31 09:39:54 -04:00