Commit Graph

35789 Commits

Author SHA1 Message Date
Robert Maynard
eec93bceec Allow OBJECT libraries to be installed, exported, and imported
Teach install() and export() to handle the actual object files.
Disallow this on Xcode with multiple architectures because it
still cannot be cleanly supported there.

Co-Author: Brad King <brad.king@kitware.com>
2017-04-18 11:36:10 -04:00
Robert Maynard
93c89bc75c Genex: Allow TARGET_OBJECTS to be used everywhere
Previously the `TARGET_OBJECTS` generator expression was limited
only to use in a buildsystem context so that Xcode's placeholders
in object file paths can be evaluated.  Lift this restriction so
that the expression can at least be used in most settings.

Co-Author: Brad King <brad.king@kitware.com>
2017-04-18 11:36:09 -04:00
Brad King
ac0cf7ff4f Genex: Reject TARGET_OBJECTS on non-object libraries earlier
Move the diagnostic that rejects the TARGET_OBJECTS generator expression
in non-buildsystem context until after the check for whether the named
target is an object library.  This order will makes more sense than the
previous order once TARGET_OBJECTS is allowed in non-buildsystem
context.
2017-04-18 10:29:36 -04:00
Robert Maynard
8577978c58 Tests: ExportImport C code should use explicit (void) in prototypes 2017-04-18 09:03:34 -04:00
Brad King
26cfd039a9 cmInstallTargetGenerator: Re-order GenerateScriptForConfig logic
Do not populate some local variables before switching on the target
type.
2017-04-18 09:03:33 -04:00
Brad King
25f3f22a1a cmGlobalGenerator: Add method to check if object file location is known
Add a `HasKnownObjectFileLocation` method returning whether we know the
exact location of object files produced by the native build system.
This is true everywhere except on Xcode when an architecture placeholder
is used.
2017-04-18 09:03:33 -04:00
Brad King
d596c5504e cmGeneratorTarget: Add method to get the object file directory
Add a `GetObjectDirectory` method to get the target's object file
directory for a specific configuration.
2017-04-18 09:03:33 -04:00
Brad King
930042f2d9 cmGeneratorTarget: Factor out a GetTargetObjectNames method 2017-04-18 09:03:32 -04:00
Brad King
afc492d58f Merge topic 'tcc-enable_exports'
11ab003b TinyCC: Support ENABLE_EXPORT property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !711
2017-04-18 08:54:45 -04:00
Brad King
f7e3a34d3c Merge topic 'ipo-var-per-config'
470437f6 Support CMAKE_INTERPROCEDURAL_OPTIMIZATION_<CONFIG>

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !709
2017-04-18 08:54:24 -04:00
Brad King
eedcaf44bc Merge topic 'cpackifw-search-algorithm'
049be8b9 CPackIFW: Added new QtIFW versions for search
d97978b8 CPackIFW: Improved QtIFW search algorithm

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !674
2017-04-18 08:54:04 -04:00
Brad King
59ffd81f17 Merge topic 'findmpi-mark-library-advanced'
d9d280f5 FindMPI: Mark old MPI library entries as advanced

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !708
2017-04-18 08:53:21 -04:00
Brad King
a3636dde57 Merge topic 'fix-CMP0026-old'
5e616fcf CMP0026: Fix OLD behavior with file written during configure step

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !710
2017-04-18 08:51:54 -04:00
Kitware Robot
c6a41a13bc CMake Nightly Date Stamp 2017-04-18 00:01:04 -04:00
Clinton Stimpson
86787633f8 cmake-gui: Fix display of icon under Wayland.
Fixes: #16797
2017-04-17 16:48:25 -06:00
Ruslan Baratov
470437f6f9 Support CMAKE_INTERPROCEDURAL_OPTIMIZATION_<CONFIG> 2017-04-18 03:10:34 +08:00
hsc
11ab003b3a TinyCC: Support ENABLE_EXPORT property
Replace the default -Wl,--export-dynamic with -rdynamic.
2017-04-17 17:34:52 +02:00
Brad King
3ab4681efa cmGeneratorTarget: Drop default GetLinkerLanguage config argument
Update one remaining call site to avoid using the default.
2017-04-17 10:54:00 -04:00
Brad King
be2c45f2a9 Merge topic 'prepare-per-config-objects'
ca697bfc cmGeneratorTarget: Drop obj libs from GetConfigCommonSourceFiles
e44a8d2c Xcode: Refactor loop over all sources
97cc29c7 VS: Teach generators how to mark per-config source files
2f6f6f0c Xcode: Use config-specific object library files on link lines
888c8af6 VS: List config-specific object library files on link lines
40aa6c05 cmGeneratorTarget: Add method to collect all sources for all configs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !701
2017-04-17 10:31:02 -04:00
Brad King
c003f1b996 Merge topic 'file-copy-relative-from'
99b90dbf file: Add COPY/INSTALL option for fixed layout relative to a directory
dadf1570 file: Refactor COPY/INSTALL relative path handling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !703
2017-04-17 10:30:25 -04:00
Brad King
ddd2b02455 Merge topic 'iwyu-mapping'
d2b0a47c Add include-what-you-use mapping

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !692
2017-04-17 10:30:10 -04:00
Brad King
d4db7a2ec0 Merge topic 'simpler-import-lib-check'
9a5dcc32 cmExportBuildFileGenerator: use HasImportLibrary

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !699
2017-04-17 10:29:37 -04:00
Brad King
c0323cbf5f Merge topic 'vs-custom-kits-dir'
fee01194 VS: Add an environment variable for the Windows 10 kits directory
b80c6d12 VS: Refactor Win 10 Kits root detection to support multiple roots

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !696
2017-04-17 10:29:15 -04:00
Brad King
5e616fcf9a CMP0026: Fix OLD behavior with file written during configure step
Refactoring in commit 60307c5056 (cmGeneratorTarget: Replace source
classifier implementation, 2017-04-07) accidentally regressed support
for CMP0026's OLD behavior in the case of a source file written by
project code during the configure step after getting a LOCATION.  We
should not perform full source classification until the generate step
because files written by the project's configure step may not exist yet.

Add special logic to support this case.  Add a test case for it.

Reported-by: David Stoup <david.stoup@kitware.com>
2017-04-17 10:10:15 -04:00
Kitware Robot
eb974170cb CMake Nightly Date Stamp 2017-04-17 00:01:02 -04:00
Kitware Robot
f23bede8b5 CMake Nightly Date Stamp 2017-04-16 00:01:03 -04:00
Christian Pfeiffer
86979bb533 FindMPI: Add IMPORTED targets 2017-04-16 01:12:55 +02:00
Christian Pfeiffer
d9d280f531 FindMPI: Mark old MPI library entries as advanced 2017-04-16 00:24:10 +02:00
Konstantin Podsvirov
049be8b95f CPackIFW: Added new QtIFW versions for search 2017-04-15 07:02:11 +03:00
Kitware Robot
f653c6702a CMake Nightly Date Stamp 2017-04-15 00:01:04 -04:00
Konstantin Podsvirov
d97978b887 CPackIFW: Improved QtIFW search algorithm
Improvements:
- Added new hint CPACK_IFW_ROOT variable;
- Extend documentation.
2017-04-15 06:52:13 +03:00
Kitware Robot
286e4f1087 CMake Nightly Date Stamp 2017-04-14 00:01:09 -04:00
Brad King
99b90dbf3c file: Add COPY/INSTALL option for fixed layout relative to a directory
Add a `FILES_FROM_DIR` option to install a specific set of files
specified relative to a given directory and preserve their layout
in the destination.  Currently we intend to use this internally
to implement other things so we don't provide an `install()`
porcelain or documentation yet.
2017-04-13 16:32:51 -04:00
Brad King
dadf1570d9 file: Refactor COPY/INSTALL relative path handling
Delay conversion to absolute path until the last moment.
2017-04-13 16:32:46 -04:00
Brad King
ca697bfc26 cmGeneratorTarget: Drop obj libs from GetConfigCommonSourceFiles
Call sites such as those in the VS global generator that are used only
to reject per-config sources will now allow per-config object library
objects.  The corresponding generators have already been taught to deal
with per-config object library files.  Remaining call sites do not need
object library files anyway.

This will later allow `$<TARGET_OBJECTS:...>` generator expressions to
evaluate to values that vary by configuration (e.g. because each
configuration has its own object files).
2017-04-13 16:10:33 -04:00
Brad King
e44a8d2c32 Xcode: Refactor loop over all sources
Switch from `GetConfigCommonSourceFiles` to `GetAllConfigSources`.
This will allow us to drop object library files from the former.
2017-04-13 16:10:33 -04:00
Brad King
97cc29c766 VS: Teach generators how to mark per-config source files
Add internal infrastructure for looping over all sources for all
configurations and generating each source with exclusion marks
for configurations in which they do not participate.  This does
not yet make per-config sources available in general but does
set up some of the needed infrastructure.

Unfortunately doing this cleanly will require major refactoring of both
the VS 7-9 generators and the VS 10+ generators (for separate reasons).
Instead add some extra internal structures to carry information where we
need it.
2017-04-13 16:10:32 -04:00
Brad King
2f6f6f0c15 Xcode: Use config-specific object library files on link lines
We can do this only with Xcode 5 and above where we list the object
library files in the per-config link line value.  On older Xcode
versions we list the object files as sources so that dependencies work
correctly, but that does not allow per-config objects.  (Xcode may allow
per-config source exclusion but only by base name.)
2017-04-13 16:10:32 -04:00
Brad King
888c8af6cb VS: List config-specific object library files on link lines
In cases that we need to list object library files on link lines,
look up the set of files matching the configuration of each link
line.
2017-04-13 16:10:32 -04:00
Brad King
40aa6c059c cmGeneratorTarget: Add method to collect all sources for all configs
Multi-config generators like VS and Xcode need to loop over all the
source files first and then handle per-config information within
each one.  Teach cmGeneratorTarget to provide such a view.
2017-04-13 16:10:31 -04:00
Daniel Pfeifer
d2b0a47c6f Add include-what-you-use mapping 2017-04-13 16:04:10 +02:00
Brad King
e155fba644 Merge topic 'xcode-remove-UseObjectLibraries'
229abfc8 cmGeneratorTarget: Drop unused UseObjectLibraries method
63fbf587 Xcode: Inline relevant parts of UseObjectLibraries
1afacebe Xcode: Do not add Object Libraries source group on Xcode >= 5

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !698
2017-04-13 08:15:25 -04:00
Brad King
0d928d2fed Merge topic 'CheckSymbolExists-update-docs'
7f8b93ab CheckSymbolExists: Document that intrinsics may not be detected
91233d56 CheckSymbolExists: Format documentation
b416d3e6 CheckSymbolExists: Convert docs to bracket comment syntax

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !695
2017-04-13 08:14:41 -04:00
Brad King
2cb98329f1 Merge topic 'project-description'
3b484871 project: Add `DESCRIPTION` parameter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !679
2017-04-13 08:14:23 -04:00
Brad King
26b5f7defe Merge topic 'update-kwsys'
ada8e0ca Merge branch 'upstream-KWSys' into update-kwsys
85841e8b KWSys 2017-04-12 (23a4c211)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !694
2017-04-13 08:13:12 -04:00
Ben Boeckel
9a5dcc3267 cmExportBuildFileGenerator: use HasImportLibrary 2017-04-13 08:12:55 -04:00
Brad King
8456ec833a Merge topic 'include-style'
1d829c86 Use quotes for non-system includes
26ee9e42 CPack: drop CPack prefix for includes
5afac50f cmConfigure: Ensure separate include block in headers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !691
2017-04-13 08:12:40 -04:00
Kitware Robot
f79b8fad09 CMake Nightly Date Stamp 2017-04-13 00:01:14 -04:00
Brad King
229abfc8f9 cmGeneratorTarget: Drop unused UseObjectLibraries method 2017-04-12 15:38:54 -04:00
Brad King
63fbf58750 Xcode: Inline relevant parts of UseObjectLibraries 2017-04-12 15:38:35 -04:00