Commit Graph

28435 Commits

Author SHA1 Message Date
Wouter Klouwen 9aa4640792 cmake: add command line options to output script profiling data
For users of CMake who want to optimize their scripts if they take a
while to run, this commit adds the ability to output profiling data.

To enable this output, it adds the two command line parameters
to select the output path and format.

This commit adds the first profiling format of type ``google-trace``,
which is the output is a JSON file containing Duration events as per the
Google Trace Format specification:

https://docs.google.com/document/d/1CvAClvFfyA5R-
PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview#
2020-03-07 13:36:27 +00:00
Kitware Robot 8f122b4557 CMake Nightly Date Stamp 2020-03-07 00:01:12 -05:00
Brad King 41162cbb81 Merge topic 'ConvertMSBuildXMLToJSON-default-mutable'
98e735903a MSBuild: Fix python mutable default data structure

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Drew Dennison <dennison@mit.edu>
Merge-request: !4432
2020-03-06 09:42:20 -05:00
Brad King 74359da1e9 Merge topic 'modernize-memory-management'
9de0355d4f Modernize memory management

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4428
2020-03-06 09:17:39 -05:00
Kitware Robot 4a1baca6f7 CMake Nightly Date Stamp 2020-03-06 00:01:10 -05:00
Brendon Go 98e735903a MSBuild: Fix python mutable default data structure
Change default value of arguments to be None and instantiate new
object inside function.
2020-03-05 20:42:46 -05:00
Kyle Edwards e484b4289d Merge topic 'macos_framework_postfix'
ad3f69c86e Add support for FRAMEWORK_MULTI_CONFIG_POSTFIX_<CONFIG>

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4289
2020-03-05 10:50:15 -05:00
Marc Chevrier 9de0355d4f Modernize memory management
Update internals of various classes.
2020-03-05 07:34:01 -05:00
Brad King fee2b209b8 Merge topic 'objlib-transitive-deps'
a833aa1167 Fix dependencies on targets linked through object libraries
3b3de0fd17 Tests: Extend ObjectLibrary test with case for object lib dependencies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4427
2020-03-05 07:26:18 -05:00
Brad King 9871190dd7 Merge topic 'ninja-multi-custom-command-deps'
081c4679f7 Ninja Multi-Config: Don't build target dependencies for custom commands

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4423
2020-03-05 07:24:49 -05:00
Brad King 612da5775e Merge topic 'update-kwsys'
9e6b07f5ff Merge branch 'upstream-KWSys' into update-kwsys
ec33e3600c KWSys 2020-03-04 (6af2e592)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4424
2020-03-05 07:23:24 -05:00
Kitware Robot b0e34a3160 CMake Nightly Date Stamp 2020-03-05 00:01:10 -05:00
Brad King a833aa1167 Fix dependencies on targets linked through object libraries
When an object library is used via `target_link_libraries`, any targets
listed in the object library's `INTERFACE_LINK_LIBRARIES` closure should
become direct dependencies of the consuming target.  However, these were
accidentally left out by `cmComputeTargetDepends::CollectTargetDepends`
because object libraries are encountered through external object sources
first and then added to the `emitted` set which blocks them from being
processed as link dependencies.

This was not noticed by the test case in commit bab24e782c
(target_link_libraries: Propagate dependencies of object libraries,
2018-12-10, v3.14.0-rc1~260^2) because the relevant dependency appears
transitively through the object library target itself.

Re-order the logic to process link dependencies first, and then external
object sources.  That way object libraries used via
`target_link_libraries` will be treated as such by dependency analysis.

This also adds missing backtrace information for object libraries used
via `target_link_libraries`.  The missing information was mentioned in a
FIXME comment in the RunCMake.FileAPI test added by commit ea0a060168
(fileapi: Add test for codemodel v2, 2018-11-09, v3.14.0-rc1~257^2~7).
That comment itself was dropped by commit a0de350e2f (FileAPI test:
Break gen_check_targets() into JSON files, 2020-02-07), but we can now
update the corresponding location in the `.json` files to have the
now-expected backtrace information.

Fixes: #20421
2020-03-04 13:07:41 -05:00
Alexandru Croitor ad3f69c86e Add support for FRAMEWORK_MULTI_CONFIG_POSTFIX_<CONFIG> 2020-03-04 14:30:54 +01:00
Brad King 26f728ca78 Merge topic 'ninja-multi-spurious-unused-variables'
8b799f80e3 Ninja Multi-Config: Fix spurious unused variable warning

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4421
2020-03-04 08:18:03 -05:00
Brad King 9e6b07f5ff Merge branch 'upstream-KWSys' into update-kwsys
# By KWSys Upstream
* upstream-KWSys:
  KWSys 2020-03-04 (6af2e592)
2020-03-04 08:00:24 -05:00
Kitware Robot d674c3a5bc CMake Nightly Date Stamp 2020-03-04 00:01:11 -05:00
Kyle Edwards 8b799f80e3 Ninja Multi-Config: Fix spurious unused variable warning
Fixes: #20381
2020-03-03 15:52:36 -05:00
Kyle Edwards 081c4679f7 Ninja Multi-Config: Don't build target dependencies for custom commands
If cross-config mode is used, and a target depends on another target
as well as a custom command, we don't want the custom command to also
depend on the depended target, as that would build targets unnecessarily.
Fix this behavior.
2020-03-03 15:15:13 -05:00
Brad King 38ac070ead Merge topic 'cmake_command-eval'
598b676b5e cmake_command: Add command to EVAL a CMake script as a string

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4408
2020-03-03 09:19:39 -05:00
Brad King cabde33ed8 Merge topic 'cmGeneratedFileStream-resource-leak'
59530d9dec cmGeneratedFileStream: File resource leak if oldname not found

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4415
2020-03-03 08:46:44 -05:00
Cristian Adam 598b676b5e cmake_command: Add command to EVAL a CMake script as a string 2020-03-03 08:42:13 -05:00
Kitware Robot 7120ffc994 CMake Nightly Date Stamp 2020-03-03 00:01:08 -05:00
Brad King d1cb554c99 CMake 3.17.0-rc2 2020-03-02 14:15:14 -05:00
Brad King 178a166ae1 Merge topic 'xl-fortran-module-dir-use'
92785ed746 Tests: Enable Fortran submodule tests on XL compilers
210b0b99a9 XL: Fix using Fortran modules from their output directory

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4405
2020-03-02 10:48:05 -05:00
Kitware Robot d016637eef CMake Nightly Date Stamp 2020-03-02 00:01:08 -05:00
Bo Rydberg 59530d9dec cmGeneratedFileStream: File resource leak if oldname not found 2020-03-01 17:40:41 -05:00
Kitware Robot 61596e1cc8 CMake Nightly Date Stamp 2020-03-01 00:01:04 -05:00
Kitware Robot be2f34b9c1 CMake Nightly Date Stamp 2020-02-29 00:01:10 -05:00
Brad King b78a68f98b Merge topic 'csharp-out-of-source-groups'
ac6b18cd90 CSharp: Add support for source groups with out-of-source builds

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4374
2020-02-28 14:15:56 -05:00
Kinan Mahdi ac6b18cd90 CSharp: Add support for source groups with out-of-source builds
This also fixes support for multiple sources of the same name in
different directories.  Add a test for both problems.

Issue: #19505
2020-02-28 11:42:01 -05:00
Brad King 0842a3d030 Merge topic 'modernize-memory-management'
557cecdc3d Modernize memory management

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4402
2020-02-28 11:39:44 -05:00
Brad King f18c72815b Merge topic 'ninja-multi-variable-shuffle-again'
c794b70f19 Ninja Multi-Config: Always generate build.ninja
9590c3a400 Generator: Don't allow Ninja Multi-Config variables on other generators
7a63dafafb Ninja Multi-Config: Remove "NMC" from variable names

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4403
2020-02-28 11:32:07 -05:00
Brad King 5f36f1027b Merge topic 'ninja-multi-variable-shuffle-again' into release-3.17
c794b70f19 Ninja Multi-Config: Always generate build.ninja
9590c3a400 Generator: Don't allow Ninja Multi-Config variables on other generators
7a63dafafb Ninja Multi-Config: Remove "NMC" from variable names

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4403
2020-02-28 11:32:06 -05:00
Brad King d61a99c3ca Merge topic 'foreach-range-issues'
185d1aefaa foreach: Set fatal error on invalid range
a33b3949e5 foreach: Fix crash when parsing invalid integer

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4407
2020-02-28 11:15:31 -05:00
Brad King 210b0b99a9 XL: Fix using Fortran modules from their output directory
The XL Fortran compiler's `-qmoddir=` flag sets the module output
directory but does not add the directory to the search path for using
modules.  This is inconsistent with other compilers like the GNU Fortran
compiler's `-J` flag that does both.  In order to make these consistent,
add the module output directory with a `-I` flag on the XL Fortran
compiler so that it will be searched when using modules too.

This fixes our `FortranModules` test's coverage of submodules on
Ninja + XL.  That test places module files in a subdirectory that with
Ninja is not the current working directory when the compiler runs.

Fixes: #20400
2020-02-28 10:37:11 -05:00
Kitware Robot 2caae28172 CMake Nightly Date Stamp 2020-02-28 00:01:10 -05:00
Kyle Edwards 185d1aefaa foreach: Set fatal error on invalid range
Fixes: #20394
2020-02-27 14:52:06 -05:00
Kyle Edwards a33b3949e5 foreach: Fix crash when parsing invalid integer
Fixes: #20393
2020-02-27 14:52:06 -05:00
Brad King 2a9cf88917 Merge topic 'Genex-LINK_LANGUAGE'
461efa7b51 Genex: Add $<LINK_LANGUAGE:...> and $<LINK_LANG_AND_ID:...>

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4244
2020-02-27 11:18:28 -05:00
Kyle Edwards c794b70f19 Ninja Multi-Config: Always generate build.ninja
If CMAKE_DEFAULT_BUILD_TYPE is not specified, use the first item
from CMAKE_CONFIGURATION_TYPES instead.
2020-02-27 10:39:35 -05:00
Brad King c58b9c5ab9 Merge topic 'cmake_command-command'
54e4f2ad45 cmake_command: Add command to INVOKE other commands by name

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kyle Edwards <kyle.edwards@kitware.com>
Merge-request: !4286
2020-02-27 10:21:21 -05:00
Brad King d6fa231127 Merge topic 'execute_process_exclusive_capture'
6ec274b002 execute_process: Add ECHO_(OUTPUT|ERROR)_VARIABLE options

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Michael Hirsch, Ph.D. <michael@scivision.dev>
Merge-request: !4383
2020-02-27 09:53:07 -05:00
Kyle Edwards 9590c3a400 Generator: Don't allow Ninja Multi-Config variables on other generators
We may want to enable these variables later on with specific
semantics. To avoid breaking backwards compatibility, make it an
error to use them for now.
2020-02-27 09:23:08 -05:00
Kyle Edwards 7a63dafafb Ninja Multi-Config: Remove "NMC" from variable names
Also rename `..._DEFAULT_BUILD_FILE_CONFIG` to `..._DEFAULT_BUILD_TYPE`.
These name changes make the variables meaningful for future use by other
generators.
2020-02-27 09:22:08 -05:00
Brad King 813b289023 Merge topic 'pch-file-time' into release-3.17
7e9b9fe918 PCH: Copy the timestamp from an absolute header file

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4400
2020-02-27 08:48:49 -05:00
Brad King 2b0c6c69c9 Merge topic 'pch-file-time'
7e9b9fe918 PCH: Copy the timestamp from an absolute header file

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4400
2020-02-27 08:48:49 -05:00
Brad King e619d29e76 Merge topic 'update-kwsys' into release-3.17
06702acb28 KWSys: Terminal: Add st-256color to VT100 color support whitelist

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4394
2020-02-27 08:46:04 -05:00
Brad King 7e1f39f251 Merge topic 'update-kwsys'
cbb235efb9 Merge branch 'backport-kwsys-terminal-st' into update-kwsys
06702acb28 KWSys: Terminal: Add st-256color to VT100 color support whitelist
71764b88d6 Merge branch 'upstream-KWSys' into update-kwsys
4e8c4c7ebe KWSys 2020-02-25 (b14ce28a)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4394
2020-02-27 08:46:04 -05:00
Marc Chevrier 557cecdc3d Modernize memory management
Update internals of various classes
2020-02-27 11:11:30 +01:00