Commit Graph

231 Commits

Author SHA1 Message Date
Kyle Edwards
830a4b37aa cmUVProcessChain::Wait(): Treat timeout of 0 as no timeout 2023-07-26 13:08:27 -04:00
Marc Chevrier
945b9b8132 cmCMakePath: workarounds for Sunpro/sparc compiler 2023-07-18 11:50:07 -04:00
Brad King
c9b1ce71f6 Merge topic 'debugger-breakpoints'
60b6383993 Debugger: Always clear existing breakpoints on setBreakpoints

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8624
2023-07-14 08:34:30 -04:00
Ben McMorran
60b6383993 Debugger: Always clear existing breakpoints on setBreakpoints
Fixes: #25063
2023-07-13 08:44:52 -04:00
Brad King
dab61cf1aa Merge topic 'debugger-no-supportsVariableType'
e02cf3f190 Debugger: Correctly handle clients without supportsVariableType

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Garrett Campbell <gcampbell@microsoft.com>
Merge-request: !8620
2023-07-13 08:36:25 -04:00
Ben McMorran
e02cf3f190 Debugger: Correctly handle clients without supportsVariableType
Fixes: #25057
2023-07-12 10:09:21 -04:00
Brad King
d2a28d185a Tests: Improve order of CMakeLibTests link libraries
Avoid repeating `libCMakeLib.a` multiple times on the link line.
2023-07-07 10:23:31 -04:00
Brad King
7417495de5 Merge topic 'debugger-segfault'
764258771a Debugger: Fix threads request segfault after thread exited event

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8604
2023-06-30 09:30:21 -04:00
Ben McMorran
764258771a Debugger: Fix threads request segfault after thread exited event
Fixes: #25041
2023-06-29 13:25:51 -04:00
Clemens Wasser
90dec6e9cc CMakeLibTests: Precompile common expensive headers 2023-06-22 18:11:45 +02:00
Kyle Edwards
0878306386 cmUVStream: Add cmUVStreamRead() function 2023-06-14 11:53:55 -04:00
Kyle Edwards
b8fd273ed7 cmUVProcessChain: Return output and error streams as file descriptors 2023-06-14 11:53:55 -04:00
Kyle Edwards
ec81d40be4 cmUVPipeIStream: Add cmUVPipeIStream 2023-06-14 11:53:55 -04:00
Kyle Edwards
e329704546 cmUVProcessChain: Add support for SetExternalStream(Stream_INPUT) 2023-06-12 10:34:04 -04:00
Kyle Edwards
891b60d691 cmUVProcessChain: Add Status::SpawnResult field 2023-06-08 14:56:27 -04:00
Kyle Edwards
154fe00ca5 cmUVProcessChain: Add Status::GetException() method 2023-06-05 11:27:45 -04:00
Kyle Edwards
22e5775cde cmUVProcessChain: Add Finished() method 2023-05-31 17:21:52 -04:00
Glen Chung
a9a592f96e cmake: Add debugger
- Depends on cppdap and jsoncpp.
- Add --debugger argument to enable the Debugger.
- Add --debugger-pipe argument for DAP traffics over named pipes.
- Support breakpoints by filenames and line numbers.
- Support exception breakpoints.
- Call stack shows filenames and line numbers.
- Show Cache Variables.
- Show the state of currently defined targets,
  tests and directories with their properties.
- Add cmakeVersion to DAP initialize response.
- Include unit tests.

Co-authored-by: Ben McMorran <bemcmorr@microsoft.com>
2023-05-30 09:46:12 -04:00
Kyle Edwards
ec80090ce3 cmUVProcessChain: Add option for merged output and error 2023-05-26 15:52:01 -04:00
Kyle Edwards
67bb1ee50c cmUVProcessChain: Add working directory option 2023-05-26 11:25:32 -04:00
Ben Boeckel
e8efcbec8c iwyu: ignore std::remove_reference requirements
This removes some includes from some existing files.
2023-05-15 22:26:36 -04:00
Marc Chevrier
375e6fdbbe Link step: use linker dependency linker file
Based on work done by @ben.boeckel (!8051)

Fixes: #22217
2023-05-03 17:08:07 +02:00
Marc Chevrier
241304190f CMake code rely on cmList class for CMake lists management (part. 2) 2023-04-29 09:54:31 +02:00
Marc Chevrier
87fe031a07 cmList class: various enhancements 2023-04-29 09:54:22 +02:00
Marc Chevrier
9f60f19ee9 cmList: CMake list implementation
Fixes: #24548
2023-04-05 17:54:55 +02:00
Brad King
4901fdb201 Merge topic 'presets-json-errors'
19305afd8a presets: Improve JSON parser and error messages

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !8290
2023-03-30 08:51:18 -04:00
Martin Duffy
19305afd8a presets: Improve JSON parser and error messages 2023-03-29 10:41:19 -04:00
Matthew Woehlke
302f5171d8 Utilities/Sphinx: Add 'cref' role
Add a role that can be used to create local links (a la '`LINK`_'), but
that also applies literal style. This is particularly useful for
referring to subcommands within the command's documentation in a style
that is consistent with ':command:`BAR <foo(BAR)>`' but is much less
verbose.

Although this is intended for subcommands, it works with any local
reference.

Co-authored-by: Brad King <brad.king@kitware.com>
2023-03-14 15:20:47 -04:00
Brad King
8c52458a9e cmRST: Fix cmake domain directives with newline before argument
The `signature` directive added by commit 74e3c1d313 (Utilities/Sphinx:
Add a directive to document command signatures, 2023-02-24) will be
commonly used with the form:

    .. signature::
       some_command(SOME_SIGNATURE)

      Docs for this signature.

Drop the assumption that all CMake domain directives are immediately
followed by their argument on the same line.
2023-03-09 16:10:03 -05:00
Matthew Woehlke
74e3c1d313 Utilities/Sphinx: Add a directive to document command signatures
Add a `signature` directive to offer a CMake version of Sphinx's
`function` directive, similar to that found in other domains (py, cpp,
etc.).  Like others, this takes one or more signatures as arguments and
creates dt/dd nodes from the signatures and the directive contents.
2023-03-03 17:05:02 -05:00
David Gobbi
aa86e8ddfd Remove component size limit for version comparisons
The VersionCompare() function converted version components to
'unsigned long' prior to comparing them.  Any version components
too large for 'unsigned long' were treated as equal to ULONG_MAX.
This impacted operators like VERSION_GREATER, VERSION_LESS, and
VERSION_EQUAL.  The new code does not limit the length of the
version components for valid comparisons.
2023-02-20 12:54:43 -05:00
David Gobbi
7e730d8f7f Tests: Add cases for cmSystemTools::VersionCompare 2023-02-20 12:54:04 -05:00
Brad King
0abeb3e394 Tests: Remove references to dropped KWSys SharedForward component 2023-02-07 10:50:17 -05:00
Kitware Robot
33abef7416 Revise C++ coding style using clang-format-15
Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`.  Use `clang-format` version 15.

* If you reached this commit for a line in `git blame`, re-run the blame
  operation starting at the parent of this commit to see older history
  for the content.

* See the parent commit for instructions to rebase a change across this
  style transition commit.

Fixes: #24315
2023-01-18 16:20:47 -05:00
Kyle Edwards
1cca051470 cmStrCat(): allow any argument to be an rvalue string
This will allow us to re-use any rvalue allocation that is
available, not just from the first argument.
2022-12-06 13:54:42 -05:00
Kyle Edwards
beba50bd61 cmStrCat(): optimize when first argument is an rvalue string 2022-11-30 00:05:09 -05:00
Brad King
87b9a31489 Merge topic 'modernize-build-self'
9629be8080 Build: Use `CMAKE_CURRENT_XXX_DIR` instead of top dirs
e6fb5a1feb Build: Sort linked libraries list of `CMakeLib`
aa7290e8dc Build: Use imported target `Threads::Threads` instead of variable
df8ad72ffa Build: Use imported target `kwiml::kwiml` instead of variables
eeebf31e54 Build: Use imported target `LibRHash::LibRHash` instead of variables
08be01a181 Build: Use imported target `LibUV::LibUV` instead of variables
ddac6dcbe8 Build: Use imported target `JsonCpp::JsonCpp` instead of variables
ac76c53d33 Build: Use imported target `CURL::libcurl` instead of variables
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7570
2022-09-23 08:46:08 -04:00
Alex Turbov
0aed435b35 Build: Simplify configure_file() calls 2022-09-22 09:24:47 -04:00
Alex Turbov
a509602699 Build: Modernize some foreach calls to use IN LISTS/IN ITEMS 2022-09-22 09:24:46 -04:00
Brad King
ef1d34b20d Merge topic 'parse-large-int'
8fc822e13a file: Avoid strange istringstream crash in cmake.org binaries on Alpine Linux
31f158e4c8 cmStringAlgorithms: Add functions to parse strings to long long integers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7698
2022-09-21 10:12:11 -04:00
Brad King
31f158e4c8 cmStringAlgorithms: Add functions to parse strings to long long integers 2022-09-20 12:00:08 -04:00
Marc Chevrier
02c067dee5 cm::enum_set: fix various bugs 2022-08-22 16:25:53 +02:00
Matthew Woehlke
f2ef60ca54 cmArgumentParser: Ignore positional after keyword
Tweak cmArgumentParser to ignore positional arguments once a keyword
argument has been seen. This prevents mingling of keyword arguments
being able to effectively skip positional arguments, with later
arguments being picked up again; this seems highly likely to lead to
user confusion. This is also consistent with how other languages (e.g.
Python) handle a mix of "named" and positional arguments.
2022-08-17 11:03:51 -04:00
Brad King
7ca8d9f0f8 cmArgumentParser: Model non-empty strings with wrapper type
Some clients have been explicitly checking whether the string specified
after a keyword is empty.  Offer them a way to specify that the string
must be non-empty as part of the binding type.
2022-07-28 08:24:47 -04:00
Brad King
236bacc244 cmArgumentParser: Offer bindings for positional arguments 2022-07-27 07:03:32 -04:00
Brad King
1f2eb63d1c cmArgumentParser: Add callback bindings 2022-07-27 07:03:32 -04:00
Brad King
77fcb00a2b cmArgumentParser: Propagate constructors through binding wrapper types 2022-07-27 07:03:31 -04:00
Brad King
f7e81802f2 cmArgumentParser: Offer binding for list of parsed keywords
Some clients ask for this list in their `Parse()` call.
Offer them a way to express this request as a binding.
2022-07-25 13:52:01 -04:00
Brad King
f95a5832c7 cmArgumentParser: Drop unused keywordsMissingValue argument to Parse()
All clients have been converted to encoding this requirement in their
bindings.
2022-07-25 13:51:43 -04:00
Brad King
b7c82b26b0 cmArgumentParser: Capture keyword errors in parse results
Since commit f46b2e9142 (cmArgumentParser: Model maybe-missing string
with wrapper type, 2022-07-06) we know during parsing whether or not it
is an error for a keyword to be missing a value.  Record such errors in
the parse results structure.  Offer clients a helper method to report
them.  This provides clients with an alternative to manually checking
`keywordsMissingValue` and generating their own error message.
2022-07-22 10:32:24 -04:00