Commit Graph

21824 Commits

Author SHA1 Message Date
Brad King 67fd61b061 Merge branch 'xcode-storyboard-file-type-2.8.12' into release 2014-01-09 14:06:05 -05:00
Ruslan Baratov 93fc5a53a6 Xcode: Fix storyboard view
Since commit 56831461 (Xcode: Use explicitFileType to mark source types,
2013-04-16) the Xcode generator prefers to use explicitFileType to tell
Xcode about each source file type.  This works better than
lastKnownFileType for some file types, but not for "file.storyboard".

If storyboard file has attribute 'explicitFileType' it is displayed
incorrectly (as raw xml).  Switch it back to 'lastKnownFileType'.
2014-01-07 14:10:55 -05:00
Brad King 5e3458830e Merge branch 'fix-compile-OBJECT_DIR' into release 2014-01-06 09:46:55 -05:00
Brad King 1ab31dc2eb Merge branch 'xcode-5.1' into release 2014-01-06 09:46:48 -05:00
Brad King 3401c72c44 Merge branch 'vs9-map-Fd' into release 2014-01-06 09:46:42 -05:00
Brad King 03f3b4e727 Replace <OBJECT_DIR> rule placeholder consistently (#14667)
The <OBJECT_DIR> placeholder is supposed to be the base intermediate
files directory for the current target.  This is how it gets replaced
during link line generation.  However, during compile line generation
we replace it with the directory containing the current object file
which may be a subdirectory.  Fix replacement of <OBJECT_DIR> in the
generated compile lines to be the base intermediate files directory.

This was expoxed by commit 42ba1b08 (VS: Separate compiler and linker
PDB files, 2013-04-05) when we added a "/Fd<OBJECT_DIR>/" flag to the
MSVC compile line in order to match the VS IDE default compiler program
database location in the intermediate files directory.  For source files
in a subdirectory relative to the current target this caused the wrong
location to be used for the compiler program database.  This becomes
particularly important when using precompiled headers.

While at it, use the cmTarget::GetSupportDirectory method to compute the
intermediate files directory for the current target instead of repeating
the logic in a few places.
2014-01-02 13:45:41 -05:00
Ted Kremenek 65ee85d0c5 CMakeDetermineCompilerId: Fix compiler line match for Xcode 5.1
Xcode 5.1 output no longer puts "./" in the path to the linker output
for the CompilerId test binary.  Update our regex to match the path
with or without the component.
2013-12-09 10:40:42 -05:00
Brad King bf1db4963f VS: Map /Fd to ProgramDataBaseFileName for VS 7,8,9 (#14577)
Since commit 42ba1b08 (VS: Separate compiler and linker PDB files,
2013-04-05) the VS generators no longer add ProgramDataBaseFileName.
Therefore we should allow projects to do so by mapping the /Fd option.
For VS >= 10 our flag tables map /Fd to ProgramDataBaseFileName already.
Add the mapping for VS 7, 8, and 9.
2013-11-18 11:48:38 -05:00
Rolf Eike Beer ebf70b037d FindOpenMP: fix detecting compilers that do not need any special flag (#14567) 2013-11-13 21:41:33 +01:00
Brad King 4abdee6ba3 CMake 2.8.12.1 2013-11-05 12:30:20 -05:00
Brad King 3063011352 Merge branch 'fix-automoc-compile-definitions' into release 2013-11-05 12:06:28 -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 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