Commit Graph

21812 Commits

Author SHA1 Message Date
Brad King 850276d2b4 Merge branch 'cmake-E-automoc-crash' into release 2013-11-05 07:47:36 -05:00
Brad King 9ef66f2b0f cmake: Validate -E cmake_automoc argument count (#14545)
Do not access an argument index not known to exist.
2013-11-05 07:37:23 -05:00
Brad King b84854676b Merge branch 'clear-evaluation-files' into release 2013-11-04 16:35:30 -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 17bc96d336 Merge branch 'policy-CMP0022-fixes' into release 2013-11-04 08:40:03 -05:00
Brad King 603fe9253f Fix summary documentation of INTERFACE_LINK_LIBRARIES
The property applies to all library types, not just shared libraries.
2013-11-04 08:29:00 -05:00
Modestas Vainius 0aa97b6bb7 Fix spelling in INTERFACE_LINK_LIBRARIES documentation (#14542)
s/overriden/overridden/
2013-11-04 08:26:09 -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
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 e996b4e6dc Merge branch 'object-library-no-TARGET_FILE' into release 2013-11-02 13:41:54 -04:00
Brad King 71eee316c2 Merge branch 'object-library-missing-source' into release 2013-11-02 13:41:47 -04:00
Brad King 922876b0c0 Merge branch 'vs12-parallel-cl-FS' into release 2013-11-02 13:41:42 -04:00
Brad King 81eab21eb5 Merge branch 'FindCUDA-NPP-5.5' into release 2013-11-02 13:40:57 -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
Stephen Kelly 0e06788c0a CMP0022: Add test for target_link_libraries plain signature 2013-11-02 12:48:48 -04:00
Stephen Kelly c0f4a61074 CMP0022: Add unit test for null pointer check and message. 2013-11-02 12:48:40 -04:00
Brad King 4b0cfa7004 Merge branch 'output-CMP0022-entries' into policy-CMP0022-fixes 2013-11-02 12:47:45 -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 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
Stephen Kelly 239b0c6b0e Don't add invalid content to static lib INTERFACE_LINK_LIBRARIES.
Only valid target names or generator expressions may appear in
the target field of a LINK_ONLY expression.

Other content like link flags should still be added to that property
(wrapped in config-specific generator expressions), but not wrapped
in LINK_ONLY. Otherwise undue warnings would be issued for the
policy CMP0022.

The LINK_ONLY expression only has an effect for actual target
names anyway, so there is no logical deficit.
2013-10-26 10:10:20 -04:00
Stephen Kelly 0b3b3368fb CMP0022: Output link interface mismatch for static library warning
Other warnings for the same policy already have similar output since
commit 81d2793e (Add differing target property content to policy CMP0022
warning, 2013-09-11).
2013-10-23 08:18:02 -04:00
Brad King 216afc8a81 MSVC: Add /FS flag for cl >= 18 to allow parallel compilation (#14492)
In generators such as Ninja that can run multiple "cl" processes that
refer to the same compiler .pdb file (/Fd) at the same time, MSVC from
Visual Studio 2013 complains:

 fatal error C1041: cannot open program database '.../vc120.pdb';
 if multiple CL.EXE write to the same .PDB file, please use /FS

According to "cl /?":

 /FS force to use MSPDBSRV.EXE

Add the flag to compilation lines for this compiler version just after the
/Fd option.
2013-10-18 10:28:28 -04:00
Vladislav Vinogradov 50762188e1 FindCUDA: Fix NPP library search for CUDA 5.5
In CUDA 5.5 NPP was divided onto 3 separate libraries: nppc, npps, nppi.
2013-10-11 08:41:45 -04:00
Brad King ffff99c58e CMake 2.8.12 2013-10-07 08:28:26 -04:00
Brad King c515dc5748 Merge topic 'fix-install-include-dirs-processing'
6f98f4a Genex: Fix processing multiple include directories for relative paths
2013-10-07 08:26:46 -04:00
Brad King 431eaf3783 Merge branch 'release' 2013-10-07 08:26:01 -04:00
Stephen Kelly 6f98f4ac92 Genex: Fix processing multiple include directories for relative paths
Re-insert the semicolon which was removed during splitting.

Commit d777b8e7 (Genex: Allow relative paths in INSTALL_INTERFACE.,
2013-07-25) introduced the prefixItems method to allow relative paths
in the argument of the INSTALL_INTERFACE expression. That method was
buggy in that it did not re-introduce the semicolon separator in
the result.

This bug also affects paths which are already absolute in user code.
2013-10-07 08:17:12 -04:00
Kitware Robot d85b06602a CMake Nightly Date Stamp 2013-10-07 00:01:10 -04:00
Kitware Robot 5b98d09e80 CMake Nightly Date Stamp 2013-10-06 00:01:10 -04:00
Kitware Robot dc92741d03 CMake Nightly Date Stamp 2013-10-05 00:01:06 -04:00
Kitware Robot e20edcdb3d CMake Nightly Date Stamp 2013-10-04 00:01:07 -04:00
Brad King e27523a834 Merge topic 'xcode-5'
a3194ff Xcode: Fix OBJECT library support for Xcode 5 (#14254)
dff8d11 Xcode: Drop XCODE_DEPEND_HELPER for Xcode >= 5
1180322 Xcode: Teach Tests/BuildDepends to allow LINK_DEPENDS_NO_SHARED failure
765b46d Xcode: Fix test architecture selection for Xcode >= 5
2013-10-03 08:17:43 -04:00
Kitware Robot a9a48ff9f4 CMake Nightly Date Stamp 2013-10-03 00:01:05 -04:00
Brad King a3194ff4a7 Xcode: Fix OBJECT library support for Xcode 5 (#14254)
Xcode 2.1 through 4 supported $(CURRENT_ARCH) in a PBXFileReference
'path' value used in the "Link Binary with Libraries" build phase.
CMake uses this to reference object file locations on link lines to
bring in OBJECT library content.  However, Xcode 5 now evaluates the
$(CURRENT_ARCH) reference in this context as "undefined_arch" so the
wrong path is given to the linker.  There seems to be no alternative way
to produce an architecture-specific value in a PBXFileReference.

Fortunately Xcode 5 now also handles link dependencies for paths linked
through OTHER_LDFLAGS.  For Xcode >= 5, move the OBJECT library object
file references from the link build phase to OTHER_LDFLAGS.  We can
still show the object files in the source group listing in either case.
2013-10-02 13:03:21 -04:00
Brad King dff8d113b4 Xcode: Drop XCODE_DEPEND_HELPER for Xcode >= 5
Xcode 5.0 now computes dependencies from files linked through
OTHER_LDFLAGS, so we no longer need the XCODE_DEPEND_HELPER hack to
re-link dependents when targets change.
2013-10-02 12:49:09 -04:00
Brad King 118032247c Xcode: Teach Tests/BuildDepends to allow LINK_DEPENDS_NO_SHARED failure
Xcode 5.0 now relinks targets when their shared libraries dependencies
are modified, and there seems to be no way to stop it.  Report this as a
known limitation in the test output and do not fail.
2013-10-02 12:49:09 -04:00
Brad King 765b46d1e1 Xcode: Fix test architecture selection for Xcode >= 5
In Tests/Architecture and Tests/BuildDepends/Project we select a set of
OS X cpu architectures to use for the test.  Prior to Xcode 4 we always
used i386 and ppc.  Starting with Xcode 4, the tools do not support ppc
but do support x86_64, so we switch to that.  Fix the version check to
recognize Xcode >= 5 as at least Xcode 4 and use the new architectures.
2013-10-02 12:48:20 -04:00
Kitware Robot c0133a58e8 CMake Nightly Date Stamp 2013-10-02 00:01:07 -04:00
Brad King c33a38fe22 CMake 2.8.12-rc4 2013-10-01 08:05:44 -04:00
Brad King cc329e97e0 Merge topic 'osx-find-sdk-frameworks'
1fce189 OS X: Search system SDKs for frameworks
2013-10-01 08:05:24 -04:00
Brad King e02e56c4a6 Merge topic 'fix-duplicate-custom-commands'
dccd494 Use first custom command for the same output (#14446)
2013-10-01 08:05:17 -04:00
Brad King 204a54774c Merge branch 'release' 2013-10-01 08:03:41 -04:00
Kitware Robot fa97f43c81 CMake Nightly Date Stamp 2013-10-01 00:01:06 -04:00
Brad King dccd4949c0 Use first custom command for the same output (#14446)
In buggy code like

 add_custom_command(
   OUTPUT  ${CMAKE_CURRENT_BINARY_DIR}/out.h
   MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/out.h.in
   ...)
 add_custom_command(
   OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/out.h
   ...)

that has more than one rule to generate the same output CMake has always
used the first rule.  However, since commit 2268c41a (Optimize custom
command full-path dependency lookup, 2013-08-06) we update the map from
output to cmSourceFile for every rule generating an output, effectively
keeping the last command instead of the first.

Fix this regression by checking for each map update if the output
already has an entry.  If so, keep only the original entry.  The VS 8
generator triggers this with a special case for generate.stamp rules
that differ between ZERO_CHECK and normal targets, so do not warn for
now.  Leave a TODO comment for warning in the future.
2013-09-30 15:03:00 -04:00
Kitware Robot 6a3958b374 CMake Nightly Date Stamp 2013-09-30 00:01:04 -04:00
Kitware Robot 6f74212360 CMake Nightly Date Stamp 2013-09-29 00:01:07 -04:00
Kitware Robot 1bf010ae98 CMake Nightly Date Stamp 2013-09-28 00:01:10 -04:00
Brad King 1fce189e53 OS X: Search system SDKs for frameworks
In Modules/Platform/Darwin.cmake set CMAKE_SYSTEM_FRAMEWORK_PATH to
include framework directories from inside the system SDK corresponding
to CMAKE_OSX_SYSROOT.

Suggested-by: Sean McBride <sean@rogue-research.com>
2013-09-27 10:18:46 -04:00
Kitware Robot 6ed8504ea5 CMake Nightly Date Stamp 2013-09-27 00:01:08 -04:00
Brad King 71c0eb9cd8 Merge topic 'wince-archfam'
0b15ffc MSVC: Fix WinCE arch family preprocessor symbol (#14436)
2013-09-26 08:51:36 -04:00