Commit Graph

25220 Commits

Author SHA1 Message Date
Brad King
aab8feeec2 Merge topic 'target-depend-backtraces'
dacbb41455 Track backtraces in target dependencies internally
a6e02f881d add_dependencies: Track backtraces internally
a093b1a4f3 cmLinkItem: Add backtrace
e022e2d873 cmListFileCache: Add ExpandListWithBacktrace helper
f1dd0eeaaf cmListFileCache: Add wrapper template for values with a backtrace

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2498
2018-10-19 10:00:19 -04:00
Kitware Robot
250b8c1662 CMake Nightly Date Stamp 2018-10-19 00:01:08 -04:00
Brad King
dacbb41455 Track backtraces in target dependencies internally
Carry backtraces on target dependency edges to refer to the line in
project code that caused the edge to appear.
2018-10-18 08:11:19 -04:00
Brad King
a6e02f881d add_dependencies: Track backtraces internally
Record backtraces for "utility" dependencies created by
`add_dependencies` calls.
2018-10-18 08:10:55 -04:00
Brad King
a093b1a4f3 cmLinkItem: Add backtrace
Carry a backtrace on every link item, not just link implementation
items.  For now the non-impl items will still have empty backtraces at
runtime, but this will allow us to introduce values over time.
2018-10-18 08:07:46 -04:00
Brad King
5b47557c82 Merge topic 'revert-server-iface-sources'
284a38e42f cmake-server: Revert "Support codemodel filegroups for INTERFACE_SOURCES"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2495
2018-10-18 07:31:18 -04:00
Kitware Robot
aab69ccd9b CMake Nightly Date Stamp 2018-10-18 00:01:07 -04:00
Brad King
e022e2d873 cmListFileCache: Add ExpandListWithBacktrace helper 2018-10-17 14:20:34 -04:00
Brad King
f1dd0eeaaf cmListFileCache: Add wrapper template for values with a backtrace 2018-10-17 14:20:34 -04:00
Brad King
284a38e42f cmake-server: Revert "Support codemodel filegroups for INTERFACE_SOURCES"
Revert commit v3.13.0-rc1~144^2 (cmake-server: Support codemodel
filegroups for INTERFACE_SOURCES, 2018-08-10).  The changes activate
code paths not meant to be used with interface libraries.  Another
approach will be needed to expose this information later.

This revert has to be done by hand because the code in question has been
changed somewhat since the changes were made, and was also factored out
to another source file.

Fixes: #18463
2018-10-17 14:02:39 -04: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
f21d811c7c Merge topic 'gem-string'
b8bb6ba653 cmGeneratorTarget::GetExportMacro: return const std::string*

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2485
2018-10-17 13:26:33 -04:00
Brad King
cd4ed3ecb2 Merge topic 'ctor-remove'
d543eb2260 cmCustomCommand: remove the default constructor

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Brad King <brad.king@kitware.com>
Merge-request: !2486
2018-10-17 13:24:27 -04:00
Brad King
004d9ebbd3 Merge topic 'vs-improve'
1601388212 cmVisualStudio10TargetGenerator: Code improvement

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2484
2018-10-17 13:23:50 -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
Kitware Robot
88ef5737a2 CMake Nightly Date Stamp 2018-10-17 00:01:08 -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
Vitaly Stakhovsky
b8bb6ba653 cmGeneratorTarget::GetExportMacro: return const std::string* 2018-10-16 11:12:19 -04:00
Brad King
73d9d53ed0 Merge topic 'ctest_done_bug_fix'
60ca88d726 ctest_submit: Generate Done.xml at submit time

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2477
2018-10-16 11:02:58 -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
Kitware Robot
92f3ad7cae CMake Nightly Date Stamp 2018-10-16 00:01:11 -04:00
Zack Galbreath
60ca88d726 ctest_submit: Generate Done.xml at submit time
This fixes a bug where calling `ctest_submit()` would result in a Done.xml
file with an empty <buildId> element.

CDash responds with a buildId when CTest submits a file. For this reason,
Done.xml needs to generated after CTest has submitted some other file to
CDash. This change also has the benefit of making Done.xml's timestamp as
late as possible, giving us a more accurate record of how long the entire
build took to complete.
2018-10-15 13:03:34 -04:00
Kitware Robot
6c281138a5 CMake Nightly Date Stamp 2018-10-15 00:01:05 -04:00
Vitaly Stakhovsky
d543eb2260 cmCustomCommand: remove the default constructor
Unused; no longer mandated by STL
2018-10-14 19:26:25 -04:00
Vitaly Stakhovsky
1601388212 cmVisualStudio10TargetGenerator: Code improvement
Disallow incompletely initialized Elem objects
2018-10-14 18:32:53 -04:00
Kitware Robot
f77a9576e5 CMake Nightly Date Stamp 2018-10-14 00:01:05 -04:00
Kitware Robot
fd71ad3715 CMake Nightly Date Stamp 2018-10-13 00:01:08 -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
ced094e22e Merge topic 'revert-install-code-script-genex'
fd0e40f166 Merge branch 'backport-revert-install-code-script-genex' into revert-install-code-script-genex
0f48fbaa72 install: Revert CODE,SCRIPT support for generator expressions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2474
2018-10-12 08:11:49 -04:00
Kitware Robot
aeb24db554 CMake Nightly Date Stamp 2018-10-12 00:01:08 -04:00
Ben Boeckel
bf572ac952 cmListCommand: check list(FILTER) operation before the list
A future commit will make the not-a-list case a success, but invalid
operations should still be diagnosed in that case.
2018-10-11 17:33: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
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
e2dd6ac977 Merge topic 'remove-AddCompileDefinitions'
8f076acdb0 cmLocalGenerator: Remove AddCompileDefinitions method

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2470
2018-10-11 07:44:03 -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
Kitware Robot
8563e29c81 CMake Nightly Date Stamp 2018-10-11 00:01:09 -04:00
Brad King
faf3d7d224 VS: Add workaround for CUDA compiler PDB location with space
CUDA Toolkit Visual Studio Integration for version 9.2 and above does
honor the `ClCompile.ProgramDataBaseFileName` field when telling `nvcc`
how to invoke `cl`.  Unfortunately it does not quote paths with spaces
correctly:

    -Xcompiler "... /Fd"C:\path\with space\foo.pdb" ..."

Work around this by converting the PDB location to a relative path.
Likely we could always do this, but for now make a minimal change
just for CUDA support.

Fixes: #18440
2018-10-10 13:29:47 -04:00
Brad King
592064e026 VS: Drop workaround for CUDA compiler PDB location on CUDA 9.2+
The workaround added by commit v3.12.0-rc1~227^2 (VS: Add workaround for
CUDA compiler PDB location, 2018-04-13) is not necessary on CUDA 9.2+
because the CUDA Toolkit Visual Studio Integration has fixed the
original bug and forwards the `ProgramDataBaseFileName` to the host
compiler itself.  Make the workaround conditional on the CUDA version.

Issue: #18440
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
fc8955e889 add_subdirectory: Run subdirectory install rules in correct order
Before this change, install rules created by add_subdirectory()
would be executed after all of the top-level install rules, even
if they were declared before the top-level rules. This change
adds a new policy, CMP0082, which interleaves the add_subdirectory()
install rules with the other install rules so they are run in the
correct order.
2018-10-10 10:26:39 -04:00
Brad King
8f076acdb0 cmLocalGenerator: Remove AddCompileDefinitions method
This method offers the same definitions as `GetTargetDefines` except
that it excludes the "export" macro on shared libraries.  Update call
sites to use `GetTargetDefines` instead.  Some of them were incorrectly
excluding the export macro.
2018-10-10 09:34:12 -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
Betsy McPhail
f460bbd4c8 ctest_submit: Refactor file list to use a vector instead of a set
Remove duplicates in a way that preserves order.
2018-10-10 06:55:05 -04:00
Kitware Robot
a35981249d CMake Nightly Date Stamp 2018-10-10 00:01:07 -04:00
Brad King
03e381cb8a Merge topic 'string-TIMESTAMP-unset-TZ'
f23760ffac string(TIMESTAMP): Fix unset TZ

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Attila Krasznahorkay <attila.krasznahorkay@gmail.com>
Merge-request: !2464
2018-10-09 07:42:45 -04:00