Commit Graph

22555 Commits

Author SHA1 Message Date
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
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
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
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
Brad King
1afacebee9 Xcode: Do not add Object Libraries source group on Xcode >= 5
The group is always empty because on Xcode 5 and above we list
object library files directly on the link line and do not list
sources for them.
2017-04-12 15:30:35 -04:00
Brad King
ada8e0cac4 Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2017-04-12 (23a4c211)
2017-04-12 09:10:22 -04:00
Brad King
fddd559406 Merge topic 'vs-refactor-source-loop'
a2e91af9 cmGeneratorTarget: Drop unused GetIDLSources method
a77158b2 VS: Refactor loop over classified sources

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !689
2017-04-12 09:05:49 -04:00
Brad King
80ea73f288 Merge topic 'xcode-object-arch-dir'
8c346bbc Xcode: Compute a concrete object file arch dir if possible
5f4e26df Xcode: Refactor object directory name computation
5b29fd6d Xcode: Refactor internal architecture list construction
b1eb493c cmGlobalGenerator: Abort generation earlier on export() error

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !688
2017-04-12 09:05:29 -04:00
Kitware Robot
135611176c CMake Nightly Date Stamp 2017-04-12 00:01:04 -04:00
Daniel Pfeifer
1d829c862c Use quotes for non-system includes
Automate with:

git grep -l '#include <cm_' -- Source \
  | xargs sed -i 's/#include <\(cm_.*\)>/#include "\1"/g'

git grep -l '#include <cmsys/' -- Source \
  | xargs sed -i 's/#include <\(cmsys\/.*\)>/#include "\1"/g'

git grep -l '#include <cm[A-Z]' -- Source \
  | xargs sed -i 's/#include <\(cm[A-Z].*\)>/#include "\1"/g'
2017-04-11 22:35:21 +02:00
Daniel Pfeifer
26ee9e4291 CPack: drop CPack prefix for includes
Automate with:

git grep -l '#include <CPack/' -- Source \
  | xargs sed -i 's/#include <CPack\/\(.*\)>/#include "\1"/g'

git grep -l '#include "CPack/' -- Source \
  | xargs sed -i 's/#include "CPack\/\(.*\)"/#include "\1"/g'
2017-04-11 22:35:20 +02:00
Daniel Pfeifer
5afac50f68 cmConfigure: Ensure separate include block in headers
Make sure that `#include <cmConfigure.h>` is followed by an empty line
in header files.  This is necessary to make sure that changing <> to ""
does not affect the include ordering of clang-format.

Automate with:

git grep -l '#include <cmConfigure.h>' | grep -v '.cxx$' \
| xargs sed -i '/#include <cmConfigure.h>/ { N; N; s/\n\{1,2\}/\n\n/ }'
2017-04-11 22:35:20 +02:00
Brad King
a2e91af99d cmGeneratorTarget: Drop unused GetIDLSources method 2017-04-11 13:36:40 -04:00
Brad King
a77158b25f VS: Refactor loop over classified sources
Loop over all sources at once instead of looking up and looping
over each kind of source separately.
2017-04-11 13:36:31 -04:00
Brad King
8c346bbc6e Xcode: Compute a concrete object file arch dir if possible 2017-04-11 11:40:15 -04:00
Brad King
5f4e26dfc8 Xcode: Refactor object directory name computation
Factor out a helper function to compute the object directory name
architecture component.
2017-04-11 11:40:15 -04:00
Brad King
5b29fd6d4d Xcode: Refactor internal architecture list construction
Factor population of the `Architectures` member out into a helper to
avoid duplication.
2017-04-11 11:40:15 -04:00
Brad King
b1eb493c11 cmGlobalGenerator: Abort generation earlier on export() error 2017-04-11 11:40:14 -04:00
Brad King
ff4fa70c20 Merge topic 'vs-remove-UseObjectLibraries'
f4af14ad VS: Simplify logic collecting object library files as sources
10772c51 VS: Simplify use of object libraries in WINDOWS_EXPORT_ALL_SYMBOLS
22829a13 cmMakefile: Create an explicit "Object Libraries" source group

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !686
2017-04-11 11:28:05 -04:00
Alex Turbov
3b4848717a project: Add DESCRIPTION parameter
It is quite often the project description has used in a real world software.
Examples include:

* part of a help screen of the application
* builtin resources (`*.rc` files, data for "About" dialog of a GUI app, & etc)
* most generators for CPack can use it
* it could be used by documentary software (Doxygen, Sphinx) which is usually
  integrated to CMake based projects via `add_custom_target()`

Now `project()` call learned an optional `DESCRIPTION` parameter with a
short string describing a project. Being specified, it would set the
`PROJECT_DESCRIPTION` variable which could be used in `configure_file()`
or whatever user wants.  Also `PROJECT_DESCRIPTION` is a default value
for `CPACK_PACKAGE_DESCRIPTION_SUMMARY`.
2017-04-11 10:17:00 -04:00
Brad King
f4af14add4 VS: Simplify logic collecting object library files as sources
Object library files are already included by `GetExternalObjects`
and `GetConfigCommonSourceFiles` so we don't need to call
`UseObjectLibraries` to get them.
2017-04-11 10:10:28 -04:00
Brad King
10772c51b4 VS: Simplify use of object libraries in WINDOWS_EXPORT_ALL_SYMBOLS
Object library files are already included by `GetExternalObjects`
so we don't need to call `UseObjectLibraries` to get them.
2017-04-11 10:10:27 -04:00
Brad King
22829a1304 cmMakefile: Create an explicit "Object Libraries" source group
The generators should not need special logic to place object library
object files in this group.
2017-04-11 10:09:57 -04:00
Kitware Robot
e086b0e081 CMake Nightly Date Stamp 2017-04-11 00:01:05 -04:00
Brad King
74075b5502 Merge topic 'refactor-source-classification'
60307c50 cmGeneratorTarget: Replace source classifier implementation
a9784d0e cmGeneratorTarget: Remove unnecessary condition

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !677
2017-04-10 09:38:30 -04:00
Kitware Robot
333c565ace CMake Nightly Date Stamp 2017-04-10 00:01:03 -04:00
Kitware Robot
c8208c95a7 CMake Nightly Date Stamp 2017-04-09 00:01:03 -04:00
Kitware Robot
fe81c03ed0 CMake Nightly Date Stamp 2017-04-08 00:01:04 -04:00
Brad King
60307c5056 cmGeneratorTarget: Replace source classifier implementation
Compute and memoize the list of sources with their kinds for each
configuration just once.
2017-04-07 15:35:48 -04:00
Brad King
a9784d0e26 cmGeneratorTarget: Remove unnecessary condition
Remove a condition where the "then" and "else" cases do the same thing.
2017-04-07 14:29:47 -04:00
Kitware Robot
8bb5c14fd8 CMake Nightly Date Stamp 2017-04-07 00:01:04 -04:00
Brad King
da9fe11b98 Merge topic 'include_external_msproject-map-config'
227de0b9 include_external_msproject: Honor MAP_IMPORTED_CONFIG_<CONFIG>
4cd815f0 VS: Pass whole target to WriteProjectConfigurations

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !669
2017-04-06 09:38:36 -04:00
Brad King
0ef6b24988 Merge topic 'codelite-virtual-dirs'
8243fe7c CodeLite: Distribute source files into folders (virtual directories)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !653
2017-04-06 09:38:05 -04:00
Brad King
a6530f3ee2 Merge topic 'bindexplib-format'
c216e803 bindexplib: Run clang-format on header file

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !670
2017-04-06 09:37:19 -04:00
Kitware Robot
5d4db33e70 CMake Nightly Date Stamp 2017-04-06 00:01:04 -04:00
Brad King
c216e80308 bindexplib: Run clang-format on header file 2017-04-05 15:51:38 -04:00
Beeble
227de0b95d include_external_msproject: Honor MAP_IMPORTED_CONFIG_<CONFIG>
This allows projects added via `include_external_msproject` to compile
the preferred configuration despite different naming conventions.
2017-04-05 13:44:03 -04:00
Beeble
4cd815f0b3 VS: Pass whole target to WriteProjectConfigurations 2017-04-05 13:37:45 -04:00
Brad King
d9bd7adfdf Merge topic 'prop-is-multi-config'
01826231 Tests: Add case for GENERATOR_IS_MULTI_CONFIG
38fd5866 Add GENERATOR_IS_MULTI_CONFIG global property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !657
2017-04-05 10:22:23 -04:00
Brad King
4046cb2d10 Merge topic 'bindexplib-arm'
48fa2914 bindexplib: add ARM support
97c605fd bindexplib: remove unused code
7a8860af bindexplib: clang-format

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !604
2017-04-05 10:15:18 -04:00
Kitware Robot
52ffedff1c CMake Nightly Date Stamp 2017-04-05 00:01:06 -04:00