Commit Graph

35569 Commits

Author SHA1 Message Date
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 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
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
Kitware Robot f653c6702a CMake Nightly Date Stamp 2017-04-15 00:01:04 -04: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
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 fee011946e VS: Add an environment variable for the Windows 10 kits directory
Define a `CMAKE_WINDOWS_KITS_10_DIR` environment variable to allow
users to tell CMake about a custom Windows 10 SDK directory.  We
choose to make this an environment variable rather than a CMake
variable or cache entry because:

* Using a custom directory also requires custom external MSBuild
  configuration.  Therefore users are already configuring a
  custom environment.

* The custom directory must be set consistently in all parts of
  a build including nested projects.  An environment variable
  avoids requiring users to thread the setting into nested builds.

Fixes: #16743
2017-04-12 10:57:05 -04:00
Brad King b80c6d120c VS: Refactor Win 10 Kits root detection to support multiple roots 2017-04-12 10:38:49 -04:00
Brad King 7f8b93ab0a CheckSymbolExists: Document that intrinsics may not be detected
Fixes: #16794
2017-04-12 09:33:03 -04:00
Brad King 91233d563b CheckSymbolExists: Format documentation 2017-04-12 09:31:37 -04:00
Brad King b416d3e696 CheckSymbolExists: Convert docs to bracket comment syntax 2017-04-12 09:25:46 -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
KWSys Upstream 85841e8bd5 KWSys 2017-04-12 (23a4c211)
Code extracted from:

    https://gitlab.kitware.com/utils/kwsys.git

at commit 23a4c211e90c1cfd399c3632141dbd549a5db8cf (master).

Upstream Shortlog
-----------------

Brad King (2):
      41a9dfef SystemInformation: Fix dynamic loader failure on WinXP SP2
      3ead6158 SystemTools: Fix stat() wrapper compilation with Borland

Daniel Pfeifer (1):
      ce5b0d34 Disable include-what-you-use

Mathieu Westphal (1):
      a2bf6bb3 SystemTools: Add cross-platform stat() wrapper
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
Brad King 9c03f503a7 Merge topic 'update-kwiml'
5a53e18e Merge branch 'upstream-KWIML' into update-kwiml
93542c89 KWIML 2017-04-11 (ffc22537)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !690
2017-04-12 09:04:32 -04:00
Brad King 35d81b69fa Merge topic 'doc-cmake-E-copy-no-wildcards'
6e68d014 Help: Add note about cmake -E copy not supporting wildcards

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !687
2017-04-12 09:04:14 -04:00
Brad King 6f7f567eee Merge topic 'macos-hidpi-qt-dialog'
d9140305 macOS: Enable Hi-DPI support in applications by default

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !682
2017-04-12 09:03:50 -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 5a53e18e24 Merge branch 'upstream-KWIML' into update-kwiml
* upstream-KWIML:
  KWIML 2017-04-11 (ffc22537)
2017-04-11 15:32:48 -04:00
KWIML Upstream 93542c897d KWIML 2017-04-11 (ffc22537)
Code extracted from:

    https://gitlab.kitware.com/utils/kwiml.git

at commit ffc22537fabc40548b3de4a759303caaeea83646 (master).

Upstream Shortlog
-----------------

Daniel Pfeifer (1):
      ffc22537 test: Disable include-what-you-use
2017-04-11 15:32:48 -04:00
Brad King a2e91af99d cmGeneratorTarget: Drop unused GetIDLSources method 2017-04-11 13:36:40 -04:00