Commit Graph

5867 Commits

Author SHA1 Message Date
Ben Boeckel
4babc9058a cmTargetPropCommandBase: check keywords after parsing
The following was disallowed:

   add_library(iface INTERFACE)
   target_link_libraries(iface PUBLIC)

just due to the mention of the `PUBLIC` keyword. Instead, only error if
there are actually `PUBLIC` dependencies specified (and analogously for
other restrictions).

Update tests to expect this new behavior.
2018-10-26 12:09:41 -04:00
Ben Boeckel
4201a11c2b Tests: add tests for empty-value keyword arguments in target_*
Not all of these commands accept non-compilable (i.e., IMPORTED)
targets, so those calls are currently just commented out. If they ever
do start to accept them, the tests should be enabled.
2018-10-26 12:08:05 -04:00
Wouter Klouwen
7ddc9e353b ExternalProject: option LOG_MERGED_STDOUTERR to combine stdout and stderr
In some circumstances the user of ExternalProject may not desire the
split log files for stdout and stderr. In particular with a project has
many errors it can be difficult to correlate the output error with the
command that it resulted from.

This commit adds the LOG_MERGED_STDOUTERR option that when enabled
outputs into a unified <name>-<step>.log for each step. If disabled it
will default to the previous behaviour of <name>-<step>-out.log and
<name>-<step>-err.log.
2018-10-19 15:32:51 +01:00
Wouter Klouwen
b6f6cac378 ExternalProject: add LOG_DIR option that allows overriding of log location
In some situations it can be helpful to separate out the location of the
log files from the location of the stamp files. For instance if you have
a continuous integration that exposes the location where log files are
stored.

This commit adds an option that allows a user to override the default
behaviour of putting the log files in STAMP_DIR called LOG_DIR. The
previous behaviour of putting the log files into the STAMP_DIR applies
if LOG_DIR is not specified.
2018-10-19 15:32:51 +01:00
Brad King
7056f91e40 Merge topic 'deployqt4-cmp0080-fix'
31b6825bd2 Merge branch 'master' into deployqt4-cmp0080-fix
15bbff0581 DeployQt4: Do not include BundleUtilities at configure time
65bea5b90b DeployQt4: Convert to 2-space indentation
9bfb63bd42 Help: Convert DeployQt4 to block-style comment

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2494
2018-10-19 10:15:04 -04:00
Kyle Edwards
31b6825bd2 Merge branch 'master' into deployqt4-cmp0080-fix 2018-10-19 10:00:29 -04:00
Brad King
d120ccd193 Merge topic 'find_fontconfig'
84e7920b3a FindFontconfig: Add module to find Fontconfig

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2487
2018-10-19 09:59:27 -04:00
Frederik Gladhorn
84e7920b3a FindFontconfig: Add module to find Fontconfig
This module is inspired by one from KDE's KWin.
2018-10-18 20:32:09 +02:00
Brad King
78681bf001 Merge topic 'better-empty-list-behavior'
121a036f73 cmListCommand: handle empty lists for list(REMOVE_AT)
acfe53c588 cmListCommand: make list(ACTION not_a_list) succeed when idempotent
bf572ac952 cmListCommand: check list(FILTER) operation before the list

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2478
2018-10-17 13:27:56 -04:00
Brad King
275290375d Merge topic 'ctest-coverage-gtm-percent'
f7d92deff4 CTest: Fix GTM coverage handling of entry point named "%"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2489
2018-10-17 13:22:04 -04:00
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
e5e59a1bc6 Merge topic 'document-dollar-in-varnames'
82a4822610 CMP0053: document that `$` is a valid literal variable character

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2479
2018-10-16 11:04:09 -04:00
Brad King
ab0edaabcc Merge branch 'document-dollar-in-varnames' into release-3.13
Merge-request: !2479
2018-10-16 11:03:08 -04:00
Joseph Snyder
f7d92deff4 CTest: Fix GTM coverage handling of entry point named "%"
Removing the "%" character from the name of the routine in the line
parser causes CTest to be unable to find a routine entry point that is
only named "%".  Instead leave it during line parsing and handle routine
names ending in "%" explicitly when loading files.
2018-10-16 10:59:09 -04:00
Ben Boeckel
82a4822610 CMP0053: document that $ is a valid literal variable character
This was overlooked in the initial implementation of CMP0053. However,
an additional policy to reject it again is not worth it. Instead, add
tests and document the behavior.

Fixes: #17883
2018-10-15 13:59:39 -04:00
Brad King
7bacb22955 Merge topic 'cppcheck-exit-code'
3b80cd77fb Fail the build if cppcheck returns a non-zero exit code

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2459
2018-10-12 08:17:58 -04:00
Brad King
1cfe2442c4 Merge topic 'find_libinput'
f76047f34a FindLibinput: Add module to find libinput

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2420
2018-10-12 08:15:25 -04:00
Frederik Gladhorn
f76047f34a FindLibinput: Add module to find libinput
This module is inspired by one from KDE's KWin.
2018-10-11 10:43:45 -04:00
Brad King
fd0e40f166 Merge branch 'backport-revert-install-code-script-genex' into revert-install-code-script-genex 2018-10-11 08:14:48 -04:00
Brad King
d26f5b6889 Merge branch 'backport-revert-install-code-script-genex' into release-3.13
Merge-request: !2474
2018-10-11 08:11:21 -04:00
Harald Brinkmann
3b80cd77fb Fail the build if cppcheck returns a non-zero exit code
This allows the build failure to be tuned with cppcheck's
options --error-exitcode=<n> and --exitcode-suppressions=<file>.
2018-10-11 07:56:05 -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
0f48fbaa72 install: Revert CODE,SCRIPT support for generator expressions
Revert commit v3.13.0-rc1~441^2 (install: Teach CODE,SCRIPT modes to
evaluate generator expressions, 2018-05-29).  Unfortunately it has
been found to break existing code in a real project, e.g.

    install(CODE [[
        message("$<FOOBAR>")
    ]])

Address this regression by reverting support for the 3.13 release
series.  Support can be restored later with a policy for compatibility.

Issue: #15785
Fixes: #18435
2018-10-11 07:05:55 -04:00
Brad King
bcfb245703 Merge branch 'vs-cuda-pdb' into release-3.13
Merge-request: !2473
2018-10-10 13:41:44 -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
Brad King
c2356d60d8 Merge branch 'project-always-set-desc-url' into release-3.13
Merge-request: !2457
2018-10-08 11:21:48 -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
Brad King
a9ff6cefe5 Merge branch 'pkgc-op-lt-gt' into release-3.13
Merge-request: !2435
2018-10-04 10:35:39 -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