Commit Graph

5843 Commits

Author SHA1 Message Date
Ben Boeckel
121a036f73 cmListCommand: handle empty lists for list(REMOVE_AT)
Treat an empty list as a list with no valid bounds and return an error
message indicating that any given indices are out-of-bounds.
2018-10-16 14:31:39 -04:00
Ben Boeckel
acfe53c588 cmListCommand: make list(ACTION not_a_list) succeed when idempotent
The operations changed here all are no-ops on empty lists anyways, so
just have them succeed when given non-extant lists.

  - `list(REMOVE_ITEM)`
  - `list(REMOVE_DUPLICATES)`
  - `list(SORT)`
  - `list(FILTER)`
  - `list(REVERSE)`
2018-10-16 14:31:39 -04:00
Brad King
4f289cdc1e Merge topic 'vs-cuda-pdb'
faf3d7d224 VS: Add workaround for CUDA compiler PDB location with space
592064e026 VS: Drop workaround for CUDA compiler PDB location on CUDA 9.2+
fb378fc4d7 Tests: Fix Cuda test project names

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2473
2018-10-11 07:41:42 -04:00
Brad King
b7cba6ba00 Merge topic 'cmake_policy-get_warning'
0d988f98e5 cmake_policy: Add undocumented GET_WARNING command
f9f96598df Help: Convert FindOpenGL documentation to block comment

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2472
2018-10-11 07:41:06 -04:00
Brad King
7d2ee4cb98 Merge topic 'install-subdirectory-order'
b56f2db87a Testing: Add test for CMP0082
fc8955e889 add_subdirectory: Run subdirectory install rules in correct order
514f0b572e Testing: Update hard-coded line numbers to [0-9]+ in some tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2434
2018-10-11 07:37:59 -04:00
Brad King
2e1fe8fabe Merge topic 'ctest-done'
a6e0158712 ctest_submit: Add support for a "Done" part
f460bbd4c8 ctest_submit: Refactor file list to use a vector instead of a set

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Zack Galbreath <zack.galbreath@kitware.com>
Merge-request: !2405
2018-10-11 07:32:54 -04:00
Brad King
fb378fc4d7 Tests: Fix Cuda test project names
Make them match what `ADD_TEST_MACRO` gives to ctest as the
project name to build so that the `.sln` file will be found.
2018-10-10 13:29:47 -04:00
Kyle Edwards
0d988f98e5 cmake_policy: Add undocumented GET_WARNING command
This command is intended for modules that issue policy warnings so
they can get the warning string from CMake in a uniform manner,
rather than duplicating the string. Several modules been updated
to include an example of the usage of this new command.
2018-10-10 10:56:00 -04:00
Kyle Edwards
b56f2db87a Testing: Add test for CMP0082 2018-10-10 10:26:40 -04:00
Kyle Edwards
514f0b572e Testing: Update hard-coded line numbers to [0-9]+ in some tests 2018-10-10 10:06:27 -04:00
Betsy McPhail
a6e0158712 ctest_submit: Add support for a "Done" part
Teach CTest to submit Done.xml. Submission of this file indicates to
CDash that a build is complete and no more files will be uploaded. It
contains the build id returned by CDash and the current time.

This file is submitted last for a given build when using the
`ctest_submit()` command.

If submitting by PARTS, use `ctest_submit(PARTS Done)`.
2018-10-10 06:55:59 -04:00
Brad King
c3e27c2562 Merge topic 'project-always-set-desc-url'
f8a086a86b project(): Ensure DESCRIPTION and HOMEPAGE_URL variables are set
b27247c8df project(): Add tests verifying variables set by second project() call

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2457
2018-10-08 11:26:21 -04:00
Craig Scott
b27247c8df project(): Add tests verifying variables set by second project() call 2018-10-08 08:28:01 +11:00
Brad King
cf57c27150 Merge topic 'pkgc-op-lt-gt'
aa51bfd74f FindPkgConfig: support also > and < operators for version compares

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2435
2018-10-04 10:36:49 -04:00
Rolf Eike Beer
aa51bfd74f FindPkgConfig: support also > and < operators for version compares
Fixes: #18416
2018-10-04 10:32:13 -04:00
luz.paz
6b4c5a0365 Fix misc. typos
Found via `codespell -q 3 -I ../cmake-whitelist.txt --skip="./Utilities"`
where the whitelist consists of

```
aci
ans
behaviour
buil
convertor
dum
earch
ect
emmited
emmitted
helpfull
iff
isnt
ith
lowercased
mose
nd
nknown
nto
objext
ot
pathes
pevents
splitted
substract
superceded
supercedes
te
tim
todays
uint
upto
whitespaces
```
2018-10-03 15:32:46 -04:00
Brad King
9fc3024f62 Merge topic 'fix-csharp-target-type'
375b420fdf CSharp: Fix regression in VS project type selection
8b21aa0af0 VS: Fix CSharp flag selection when linking to a static C++ library

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2427
2018-10-03 08:04:35 -04:00
Brad King
375b420fdf CSharp: Fix regression in VS project type selection
A that target contains only `.cs` sources should be generated as a
`.csproj` project even if it links to non-CSharp static libraries.
The latter case was broken by refactoring in commit v3.12.0-rc1~160^2~7
(remove TargetIsCSharpOnly() and use methods from cmGeneratorTarget,
2018-03-19).  The reason is that the `HasLanguage` method added by
commit v3.12.0-rc1~239^2~6 (cmGeneratorTarget: add HasLanguage() as
wrapper for GetLanguages(), 2018-03-19) enforces its "exclusive" check
on the combined set of source file languages and the link language.
To restore the original `TargetIsCSharpOnly` semantics, update
`HasLanguage` to enforce exclusiveness only on the list of sources.

Fixes: #18239
2018-10-02 14:58:11 -04:00
Brad King
17653671e4 Merge topic 'no_buildid_for_files'
c49d13f94b ctest: only create buildid when submitting from Testing/ dir

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2423
2018-10-01 09:24:29 -04:00
Pedro Navarro
80e2f8ee0c Ninja,Makefile: Add tests for handling of byproducts by clean operations 2018-09-28 11:30:32 -04:00
Pedro Navarro
9c2b393cb7 Tests: Update CustomCommandWorkingDirectory to handle in-source byproducts
When running an in-source build the CustomCommandWorkingDirectory test
created a copy of a source file in the same directory it was running on.
This breaks when byproducts are cleaned (e.g. via Ninja) because it
deletes one of the source files.
2018-09-28 11:28:36 -04:00
Brad King
cac09cc52c Merge topic 'customcommandworkingdirectory'
f158ac19e1 add_custom_{command,target}: WORKING_DIRECTORY generator expressions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2409
2018-09-28 11:17:09 -04:00
Jon Chronopoulos
f158ac19e1 add_custom_{command,target}: WORKING_DIRECTORY generator expressions
This teaches add_custom_command and add_custom_target WORKING_DIRECTORY
about generator expressions

Fixes: #14089
2018-09-28 11:15:33 -04:00
Brad King
4e98203c6c Merge topic 'vs-global-props-for-all-targets'
36489b85aa VS: Add test for CMAKE_VS_GLOBALS
22e670a306 VS: Add option to set VS_GLOBAL_* for all targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2345
2018-09-28 11:13:59 -04:00
Mikhail Korolev
36489b85aa VS: Add test for CMAKE_VS_GLOBALS 2018-09-28 11:13:03 -04:00
Brad King
9c4445a0dd Merge topic 'addvs2017arm64'
22282d6931 Tests: Add VSWinStore* test for VS 2017 ARM64
57b9a072cb Tests: Teach VSWinStore* tests to pass the architecture as a parameter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2389
2018-09-28 10:58:15 -04:00
Zack Galbreath
c49d13f94b ctest: only create buildid when submitting from Testing/ dir
In 7f530cc we taught CTest to pass extra information to CDash at submit
time.  This extra info is used by CDash to initialize a buildid.

`ctest_submit(FILES)` can be used to send specific files to CDash.
These files are not necessarily associated with the build currently
being performed. For this reason, we modify the behavior of ctest_submit()
to only specify this extra info when we are submitting files from the
current build's Testing directory.
2018-09-28 10:49:45 -04:00
Craig Scott
3181f8405b Merge topic 'link-directories'
f9717725f9 link_directories(): enhance capabilities
b5915744eb LINK_DIRECTORIES target property: add policy for absolute paths check.
a71caab46b LINK_DIRECTORIES: Add new properties and commands
5ca130e223 Refactoring: introduce function to check if a string is a generator expression

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2403
2018-09-26 08:11:40 -04:00
Gilles Khouzam
22282d6931 Tests: Add VSWinStore* test for VS 2017 ARM64 2018-09-26 06:57:43 -04:00
Gilles Khouzam
57b9a072cb Tests: Teach VSWinStore* tests to pass the architecture as a parameter
Instead of specifying the architecture in the generator name, pass it as
the generator platform.  This has been preferred since CMake 3.1.
2018-09-26 06:57:04 -04:00
Brad King
b16b254845 Merge topic 'dbgsym-packaging'
d8a3939aef CPack/Deb: Add ability to split out debug symbols into .ddeb package
42fbff45e4 CPack/Deb: Use CMAKE_COMMAND to set the environment
66ab24a4c5 Help: Fix typo

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2399
2018-09-26 06:52:06 -04:00
Marc Chevrier
f9717725f9 link_directories(): enhance capabilities 2018-09-25 23:59:59 +10:00
Marc Chevrier
b5915744eb LINK_DIRECTORIES target property: add policy for absolute paths check. 2018-09-25 23:59:59 +10:00
Marc Chevrier
a71caab46b LINK_DIRECTORIES: Add new properties and commands
These new capabilities enable to manage link directories

Two new properties:
* target properties: LINK_DIRECTORIES and INTERFACE_LINK_DIRECTORIES

One new command
* target_link_directories(): to populate target properties

Fixes: #17215
2018-09-25 23:59:58 +10:00
Andrew Fuller
d8a3939aef CPack/Deb: Add ability to split out debug symbols into .ddeb package 2018-09-21 20:19:31 +00:00
Craig Scott
fe751ad1fb Merge topic 'deprecate-policy-old'
0c709cb2a2 Add deprecation warnings for policies CMP0063 and below

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2397
2018-09-20 11:30:24 -04:00
Brad King
3523990f7b Merge topic 'bundleutilities-policy'
b69159324a Help: Add release notes for new BundleUtilities policy
eedd91ab08 BundleUtilities: Disallow inclusion at configure time
fd28ea35ca Help: Add note for BundleUtilities usage
3925407e76 Help: Convert BundleUtilities help to block-style comment

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2379
2018-09-20 09:38:04 -04:00
Brad King
f082414107 Merge topic 'vs-2015-max-sdk'
63eb43f131 Tests: Add VSWinStorePhone for VS 15 2017
173d29a379 Tests: Fix VSWinStorePhone to properly identify VS 14 2015
83ddc4d289 VS: Do not select a Windows SDK too high for current VS version

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2388
2018-09-20 09:33:05 -04:00
Kyle Edwards
eedd91ab08 BundleUtilities: Disallow inclusion at configure time
This commit adds a new CMake policy, CMP0080, which prohibits the
inclusion of BundleUtilities at configure time. The old behavior is
to allow the inclusion.
2018-09-19 11:23:08 -04:00
Brad King
a9df54ec31 Merge topic 'symlink'
afb7f6e4ff cmake: Add '-E create_symlink' support on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2144
2018-09-19 10:41:07 -04:00
Brad King
ec9ef691fe Merge topic 'provide_explicit_source_and_build_command_line_options'
638f00117a Add release note for the -S and -B options.
de962cc00d CMake: Internally uses -S instead of -H to specify source directory
a10d63d578 cmake: -S and -B can be used to specify source and build directories

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2358
2018-09-19 10:38:19 -04:00
Brad King
c0cedaa643 Merge topic 'ctest-more_submit_params'
7f530cc54e ctest_submit: pass additional info to CDash

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2380
2018-09-19 10:36:11 -04:00
Brad King
76a19eb6c1 Merge topic 'fix-getsafedef-stdstring'
2428422c02 Fix regression in target output file naming logic
d686f81e58 Restore possibly regressed CMP0018 logic

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2402
2018-09-19 10:33:01 -04:00
Gilles Khouzam
63eb43f131 Tests: Add VSWinStorePhone for VS 15 2017
VS 2017 needs several components installed to support this test, so
enable it only via an explicit option that can be set on specific
builders.
2018-09-19 09:40:17 -04:00
Gilles Khouzam
173d29a379 Tests: Fix VSWinStorePhone to properly identify VS 14 2015
VS 14 2015 was only identified by the Windows 10 SDK. On machines with
only VS 2017 and the Windows 10 SDKs, this would incorrectly identify
that VS 2015 was installed.  Check for VS 14 2015 with its proper
registry entry.
2018-09-19 09:39:25 -04:00
Brad King
2428422c02 Fix regression in target output file naming logic
Refactoring in commit f4ff60a803 (cmMakefile: Make GetSafeDefinition
return std::string const&, 2018-09-05) accidentally changed the logic
for target artifact prefix and suffix names such that setting a PREFIX
or SUFFIX target property would cause an empty value to be used.  Revert
that part of the change and use a simpler alternative.  Add a test case.

Reported-by: Alan W. Irwin <irwin@beluga.phys.uvic.ca>
2018-09-19 08:14:48 -04:00
Jon Chronopoulos
afb7f6e4ff cmake: Add '-E create_symlink' support on Windows
The allows `-E create_symlink` to work on Windows.  It utilizes
`uv_fs_symlink`.  I am still unsure exactly which Windows platforms will
work without requiring Administrator privileges or needing a user/group
with the "Create Symbolic Links" User Rights.  It does work with my
Windows 10 Pro with Developer Mode turned on.  In the test suite check
that the symlink either worked or failed with a permissions error.

Use recent changes in cmSystemTools::FileExists to check that a symlink
is broken.
2018-09-18 11:24:08 -04:00
Brad King
7162630bee Merge topic 'vs-ipo'
bef80e6623 VS: Do not specify incremental linking if LTCG is enabled
567fabe88e IPO: INTERPROCEDURAL_OPTIMIZATION (LTCG) for Visual Studio

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2363
2018-09-18 11:22:41 -04:00
Brad King
0c709cb2a2 Add deprecation warnings for policies CMP0063 and below
The OLD behaviors of all policies are deprecated, but only by
documentation.  Add an explicit deprecation diagnostic for some policies
to encourage projects to port away from setting policies to OLD.
2018-09-17 14:16:48 -04:00
Niels Dekker
567fabe88e IPO: INTERPROCEDURAL_OPTIMIZATION (LTCG) for Visual Studio
Add IPO support for Visual Studio (which is referred to by VS as
"Link Time Code Generation" and "Whole Program Optimization"), for
VS version >= 10.  This allows CMake/VS users to enable IPO by setting
property `INTERPROCEDURAL_OPTIMIZATION`.

Fixes: #16748
2018-09-17 10:53:10 -04:00