Commit Graph

784 Commits

Author SHA1 Message Date
Joerg Bornemann
f8c505d4b3 Add a parser for GCC-style depfiles
Introduce the function cmReadGccDepfile that parses a GCC-style depfile
and returns its content. The implementation uses a lexer that is
modeled after the re2c implementation in Ninja.

The sample files of the autotest have been created with gcc 8.3.0.

This depfile reader is to be used by the Autogen facility to make use
of the depfiles that are generated by Qt's meta object compiler.
2020-01-28 11:16:11 -05:00
Isuru Fernando
5ff1d7bd90 Add support for WINDOWS_EXPORT_ALL_SYMBOLS when cross-compiling to Windows
Implement `__create_def` using `llvm-nm` (when given as `CMAKE_NM`).
2019-12-06 09:30:25 -05:00
Kyle Edwards
bea26f5aa0 Merge topic 'ctest-resource-groups'
016601e5e6 Merge branch 'backport-ctest-resource-groups'
c1435d9812 Help: Fix error in resource allocation example
eb9d945f14 CTest: Rename hardware -> resources for RunCMake tests
c544cb6698 CTest: Rename hardware -> resources for source code
6ce27d3a2e cmCTestMultiProcessHandler: Rename resource locking functions
a7c1e15cc4 CTest: Rename hardware -> resources for CMake variables, command options
73a40b19ff CTest: Rename "Processes" lexer to "ResourceGroups"
af9ed543b0 CTest: Rename PROCESSES test property to RESOURCE_GROUPS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3994
2019-11-07 13:10:57 -05:00
Brad King
15feb5d3f8 Merge topic 'llvm-rc-fix'
f0c00bec1d CMakeVersion.rc: Fix build with llvm-rc

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4003
2019-11-07 10:25:45 -05:00
Cristian Adam
f0c00bec1d CMakeVersion.rc: Fix build with llvm-rc
llvm-rc expects versioning as having four items, it fails otherwise.
2019-11-06 10:07:01 -05:00
Brad King
016601e5e6 Merge branch 'backport-ctest-resource-groups' 2019-11-05 12:59:16 -05:00
Craig Scott
c544cb6698 CTest: Rename hardware -> resources for source code 2019-11-05 12:08:35 -05:00
Brad King
73a40b19ff CTest: Rename "Processes" lexer to "ResourceGroups"
The corresponding test property `PROCESSES` has been renamed to
`RESOURCE_GROUPS`.
2019-11-05 12:08:35 -05:00
Brad King
5417737fac Merge topic 'graphviz'
553658393c Graphviz: added test suite, fixes, enhancements

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: slodki <slodki_dom@poczta.onet.pl>
Merge-request: !3766
2019-10-17 13:54:26 -04:00
Brad King
b7509dd674 Add option to configure Ninja link job pool for CMake's own binaries
Create an undocumented `CMake_JOB_POOL_LINK_BIN` option that builders
can set to avoid linking too many of our binaries at once.
2019-10-10 13:28:45 -04:00
Corentin Plouet
553658393c Graphviz: added test suite, fixes, enhancements
* Added a fairly comprehensive test suite
* Separated the graph traversal logic from the Graphviz generation
  code by introducing a new class, cmLinkItemsGraphVisitor{.h,cxx}
* Made the graph traversal logic less ad-hoc by using existing
  methods in the GlobalGenerator; this fixed a few bugs
* Added support for new target types: custom targets, object
  and unknown libraries
* Improved support for ALIAS libraries by showing the alias(es)
  in the graph
* Introduced new flags to control those new libraries (consistent
  with existing flags)
* Updated the documentation
* Removed useless setting to set graph type in dot file
* Improved the node/edge shapes (nicer, more consistent)
* Added a legend to the graph
* Some refactoring and cleanup of the Graphviz generation code
* Added test and fix for issue 19746
2019-10-08 13:45:56 +11:00
Kyle Edwards
aee0964851 CTest: Add bin-packing algorithm
This algorithm is used to determine whether or not a test can
execute with the available resources. It uses a recursive largest-
first algorithm to try to place the tests into their respective
slots.
2019-10-02 09:33:54 -04:00
Kyle Edwards
c494b2973a CTest: Add cmCTestHardwareAllocator class 2019-10-02 09:33:54 -04:00
Kyle Edwards
c8f4806943 CTest: Add parser for hardware spec file 2019-10-02 09:33:54 -04:00
Kyle Edwards
bb4a141059 CTest: Add lexer for PROCESSES property 2019-10-02 09:33:54 -04:00
Brad King
45507eeb6a Merge topic 'smart_ptr/cmCurses'
7d6e08b438 cmCursesMainForm: change Entries to object vector
0833486d62 cmCursesStringWidget: remove manual delete
bc71b253cb cmCursesCacheEntryComposite: default destructor
36875ff419 cmCursesMainForm: cleanup manual allocation
2b16071149 CursesDialog: modernize CMake usage

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3849
2019-09-30 10:21:38 -04:00
Daniel Eiband
f151a57705 cmMakefile: Move enumerations into new header
The enumerations will also be used in cmLocalGenerator.
2019-09-26 10:02:06 -04:00
Tushar Maheshwari
2b16071149 CursesDialog: modernize CMake usage 2019-09-26 13:50:58 +05:30
Daniel Eiband
a1cc6b4447 add_custom_target: Add output checks for custom target byproducts
Use the output checks for byproducts of add_custom_command also for byproducts
of add_custom_target.
2019-09-23 22:18:36 +02:00
Brad King
ebb9346490 Merge topic 'cmake-system-headers'
4a08690ccf cmstd: Extend header <cm/iterator>
c688b401d3 cmstd: Modernize CMake system headers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3776
2019-09-20 10:38:43 -04:00
Marc Chevrier
c688b401d3 cmstd: Modernize CMake system headers
Provide a standardized way to handle the C++ "standard" headers
customized to be used with current CMake C++ standard constraints.
Offer under directory `cm` headers which can be used as direct
replacements of the standard ones.  For example:

    #include <cm/string_view>

can be used safely for CMake development in place of the `<string_view>`
standard header.

Fixes: #19491
2019-09-20 10:01:37 -04:00
Tushar Maheshwari
71f088f53a cmExportSet: subsume cmExportSetMap source files 2019-09-19 19:20:30 +05:30
Daniel Eiband
7f3ecbe7d7 cmCustomCommandLine: Provide command line make functions
Reduce boilerplate necessary to create custom command lines by introducing and
applying cmMakeCommandLine and cmMakeSingleCommandLine functions.
2019-09-16 20:45:41 +02:00
Regina Pfeifer
f7085d7b0a cmCPackArchiveGenerator: Code cleanup 2019-09-04 13:05:22 -04:00
Brad King
fa36e2151d Merge topic 'precompile-headers'
8da78d4efe Precompile headers: Update documentation
5772930164 Precompile headers: Add unit tests
519606704e Precompile headers: Add support for Visual Studio generators
28be170fbc Precompile headers: Add support for Xcode generator
b8626261e9 Precompile headers: Add methods to generate PCH sources
375d01c680 PCH: add example/test
9b6797e71d PCH: add target_precompile_headers command
0467a2f91b PCH: add PRECOMPILE_HEADERS to special properties

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
Acked-by: Ivan171 <heavenandhell171@gmail.com>
Acked-by: Stanislav Ershov <digital.stream.of.mind@gmail.com>
Acked-by: Steve Mokris <smokris@softpixel.com>
Acked-by: Evgeniy Dushistov <dushistov@mail.ru>
Acked-by: Danila Malyutin <flashmozzg@gmail.com>
Acked-by: Viktor Kirilov <vik.kirilov@gmail.com>
Acked-by: Lucas Zhao <zhaopf6@163.com>
Merge-request: !3553
2019-08-29 09:38:21 -04:00
Daniel Pfeifer
9b6797e71d PCH: add target_precompile_headers command 2019-08-27 12:49:53 +02:00
Gabor Bencze
54872b73b9 cmCommand refactor: remove cmDisallowedCommand class 2019-08-26 11:48:47 -04:00
Kyle Edwards
d4d5053c30 Refactor: Finish replacing CMAKE_BUILD_WITH_CMAKE with CMAKE_BOOTSTRAP
Remove -DCMAKE_BUILD_WITH_CMAKE from Source/CMakeLists.txt. Remove
CMAKE_BOOTSTRAP from bootstrap's cmConfigure.h. Add -DCMAKE_BOOTSTRAP
to all bootstrap sources, and remove the Unix specialization of
CMAKE_BOOTSTRAP in libuv (a review of the libuv code suggests that
this will not have an effect on the Windows build.)
2019-08-09 10:42:02 -04:00
Regina Pfeifer
b66b7464ab Introduce cmSubcommandTable 2019-08-06 17:21:52 +02:00
Brad King
2327cc0e05 Merge topic 'control-block3'
41364824ad cmFunctionBlocker: Recycle functions
6491270e0d cmFunctionBlocker: Move check for matching args
af24e4ef6e cmFunctionBlocker: Move common logic to base
ef38ff22f7 cm*FunctionBlocker: Extract function Replay
b51fba6298 cmMakefile: Add OnExecuteCommand callback
c76500949d cm*FunctionBlocker: Move to source file

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3632
2019-08-05 10:42:50 -04:00
Sebastian Holtermann
e5d3ea22d4 cmStringAlgorithms: Add cmCatViews and cmStrCat functions 2019-08-01 11:45:04 +02:00
Regina Pfeifer
af24e4ef6e cmFunctionBlocker: Move common logic to base 2019-07-31 00:03:17 +02:00
Kyle Edwards
89dc04af1d Merge topic 'cmStringAlgorithms'
f71f7ce3f0 cmStringAlgorithms: Move string functions to the new cmStringAlgorithms.h

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3618
2019-07-30 10:04:40 -04:00
Sebastian Holtermann
f71f7ce3f0 cmStringAlgorithms: Move string functions to the new cmStringAlgorithms.h
This adds the `cmStringAlgorithms.h` header and moves all string functions
from `cmAlgorithms.h` to `cmStringAlgorithms.h`.
2019-07-29 21:13:56 +02:00
Brad King
8cf4aec5ac CMakeVersion.rc: Compute resource components only on Windows 2019-07-29 11:25:43 -04:00
Regina Pfeifer
0101ace131 cmUnexpectedCommand: Replace with lambda expression 2019-07-21 09:25:32 +02:00
Brad King
c1580ecc13 Merge topic 'cmPropertyMap_unordered_map'
00d265e3c8 cmPropertyMap: Use std::unordered_map as container instead of std::map
1b945f95ba cmPropertyMap: Add RemoveProperty method
e0a8ff3148 cmPropertyMap: Use std::string as value container class
8d934d861b cmPropertyMap: Make std::map container private
026f65d284 cmPropertyMap: Add GetList method
9e64e617eb cmPropertyMap: Rename GetPropertyList method to GetKeys

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3435
2019-06-12 12:46:18 -04:00
Kyle Edwards
1f9ef25130 file: Add GET_RUNTIME_DEPENDENCIES mode
Co-Authored-by: Bryon Bean <bryon.bean@kitware.com>
2019-06-10 14:35:28 -04:00
Sebastian Holtermann
e0a8ff3148 cmPropertyMap: Use std::string as value container class 2019-06-08 12:25:35 +02:00
Brad King
d1a570f18c Merge topic 'cmFileTimes'
5b53cfda24 cmSystemTools: Remove cmSystemToolsFileTime interface
9c576a88d9 Use cmFileTimes instead of cmSystemToolsFileTime interface
4b45a5d5c7 cmFileTimes: New RAII based cmFileTimes class

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3358
2019-05-23 08:53:17 -04:00
Sebastian Holtermann
4b45a5d5c7 cmFileTimes: New RAII based cmFileTimes class
This adds a new RAII based cmFileTimes class.
It is supposed to replace the C style cmSystemToolsFileTime interface.
2019-05-22 10:57:10 +02:00
Robert Maynard
3205c7c950 cmNinjaLinkLineDeviceComputer now lives in the correct source file 2019-05-20 11:05:16 -04:00
Kyle Edwards
26025d6e10 cmUVProcessChain: Add cmUVProcessChain
This class is ultimately intended as a replacement for cmsys::Process.
It spawns a series of processes using libuv, piping the output of each
command into the next.

Note: input support has not yet been implemented because write
support has not yet been implemented on cmUVStreambuf.
2019-05-07 13:40:06 -04:00
Kyle Edwards
c74698cb75 cmUVStreambuf: Add std::streambuf implementation for uv_stream_t
This will allow std::istream/std::ostream-based interaction with
processes spawned by libuv.
2019-04-25 12:14:00 -04:00
Kyle Edwards
c0e6b22d0a Refactor: Move/rename cmProcessGetPipes() to cmGetPipes() 2019-04-25 12:03:08 -04:00
Sebastian Holtermann
a3f062091f Autogen: Rename cmQtAutoGeneratorMocUic class to cmQtAutoMocUic
The class name `cmQtAutoGeneratorMocUic` is long and cumbersome.  This renames
it to `cmQtAutoMocUic`.
2019-04-15 16:07:13 +02:00
Sebastian Holtermann
8cb26a0a2a Autogen: Factor out concurrency framework to cmWorkerPool class
This factors out the concurrency framework in `cmQtAutoGeneratorMocUic` to a
dedicated class `cmWorkerPool` which might be reused in other places.

`cmWorkerPool` supports fence jobs that require that
- all other jobs before in the queue have been processed before the fence
  job processing gets started,
- no jobs later in the queue will be processed before the fence job processing
  has been completed.
Fence jobs are needed where the completion of all previous jobs in the queue
is a requirement for further processing.  E.g. in `cmQtAutoGeneratorMocUic`
the generation of `mocs_compilation.cpp` requires that all previous
source file parse jobs have been completed.
2019-04-15 16:07:13 +02:00
Brad King
aa0692de67 Merge topic 'argument-parser'
b783e62533 cmExecuteProcessCommand: Port to cmArgumentParser
9bddb03f31 cmParseArgumentsCommand: Port to cmArgumentParser
45edf1ad66 Retire cmCommandArgumentsHelper
f5acecaa6f cmExportCommand: Port to cmArgumentParser
e6b6bb0618 cmInstallCommand: Port to cmArgumentParser
4336a29edd cmFileCommand: Port to cmArgumentParser
4359fe133b Introduce cmArgumentParser

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Leonid Pospelov <pospelovlm@yandex.ru>
Merge-request: !3137
2019-04-09 08:27:31 -04:00
Sebastian Holtermann
7b98a6eb68 Autogen: Rename cmQtAutoGeneratorRcc to cmQtAutoRcc
The class name `cmQtAutoGeneratorRcc` is long and cumbersome.  This shortens
it to `cmQtAutoRcc`.
2019-04-06 17:37:12 +02:00
Regina Pfeifer
45edf1ad66 Retire cmCommandArgumentsHelper 2019-04-04 13:24:40 -04:00