CMake merge requestshttps://gitlab.kitware.com/cmake/cmake/-/merge_requests2022-10-17T10:16:17-04:00https://gitlab.kitware.com/cmake/cmake/-/merge_requests/7476CUDA: nvcc always mark cuda toolkit as system include2022-10-17T10:16:17-04:00Robert MaynardCUDA: nvcc always mark cuda toolkit as system includeFixes: #23731Fixes: #237313.25.0Robert MaynardRobert Maynardhttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7477Ninja Multi-Config: Deduplicate compile_commands.json for cross configs2022-07-18T10:19:48-04:00Kyle EdwardsNinja Multi-Config: Deduplicate compile_commands.json for cross configscompile_commands.json was being written for every permutation of
cross configurations. Deduplicate so only one command is output
for each configuration.
Fixes: #23733compile_commands.json was being written for every permutation of
cross configurations. Deduplicate so only one command is output
for each configuration.
Fixes: #237333.25.0Kyle EdwardsKyle Edwardshttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7480Tutorial: Move Step 8 to Step 52022-07-22T10:13:52-04:00Markus FerrellTutorial: Move Step 8 to Step 5Tutorial: Move CDash step 8 to step 5. Shift steps 5-7 to 6-8.Tutorial: Move CDash step 8 to step 5. Shift steps 5-7 to 6-8.3.25.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7481C++ modules: MSVC support2022-08-23T07:52:41-04:00Ben BoeckelC++ modules: MSVC support---
Adds support for MSVC using P1689r5 (at least VS 2022 Update 3 Preview; toolchain version 14.33.31627). Note that partitions do not quite work (reported to Microsoft).---
Adds support for MSVC using P1689r5 (at least VS 2022 Update 3 Preview; toolchain version 14.33.31627). Note that partitions do not quite work (reported to Microsoft).3.25.0Ben BoeckelBen Boeckelhttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7485FindPython: remove unnecessary components interdependence2022-07-20T09:26:01-04:00Marc ChevrierFindPython: remove unnecessary components interdependenceFixes: #23716Fixes: #237163.25.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7486KWSys: Update to version as of 2022-07-222022-07-25T11:54:03-04:00Brad KingKWSys: Update to version as of 2022-07-22Integrate utils/kwsys!259, utils/kwsys!260, and utils/kwsys!261.Integrate utils/kwsys!259, utils/kwsys!260, and utils/kwsys!261.3.25.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7487FindOpenMP: Do not overwrite user-set FLAGS, LIB_NAMES2022-07-22T10:15:24-04:00Balthasar ReuterFindOpenMP: Do not overwrite user-set FLAGS, LIB_NAMESSince !4327 we replace both `OpenMP_${LANG}_FLAGS` and `OpenMP_${LANG}_LIB_NAMES` with detected
flags if either one is not set. That can overwrite user-provided flags.
Update the logic for C, CXX, and Fortran to initialize each
`OpenMP...Since !4327 we replace both `OpenMP_${LANG}_FLAGS` and `OpenMP_${LANG}_LIB_NAMES` with detected
flags if either one is not set. That can overwrite user-provided flags.
Update the logic for C, CXX, and Fortran to initialize each
`OpenMP_${LANG}_{FLAGS,LIB_NAMES}` variable only if it has not already
been set by the user.
Fixes: #23743
Topic-rename: FindOpenMP-no-force-flags3.25.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7488cmArgumentParser: Add structure to capture operational results2022-07-25T11:53:42-04:00Brad KingcmArgumentParser: Add structure to capture operational resultsCreate a way for the parser to record errors or incidental information
about the argument parsing operation that clients can inspect afterward.
Offer clients a way to hold the structure as part of their arguments
structure.
Since !7459 ...Create a way for the parser to record errors or incidental information
about the argument parsing operation that clients can inspect afterward.
Offer clients a way to hold the structure as part of their arguments
structure.
Since !7459 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.3.25.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7491Tasking: Add support for several compiler toolsets2022-10-08T22:41:26-04:00Christoph SeitzTasking: Add support for several compiler toolsetsThis MR adds support for the Tasking compiler toolset. It supports the following toolset versions:
* TriCore Compiler Toolset 6.3 (with TriCore, ARM, MCS, 8051 and PCP architecture compilers)
* SmartCode Compiler Toolset 10.1 (with TriCo...This MR adds support for the Tasking compiler toolset. It supports the following toolset versions:
* TriCore Compiler Toolset 6.3 (with TriCore, ARM, MCS, 8051 and PCP architecture compilers)
* SmartCode Compiler Toolset 10.1 (with TriCore, ARC, MCS, 8051 architecture compilers)
* ARM Compiler 6.0
* MCS Complier 3.3
* 8051 Compiler 7.2
Fixes: #237563.25.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7495presets: Add basic error forwarding from json parser2022-08-04T09:38:37-04:00Sankhesh Jhaveripresets: Add basic error forwarding from json parser3.25.0Kyle EdwardsKyle Edwardshttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7497Tutorial: Add Step 1 background info2022-08-16T13:00:58-04:00Markus FerrellTutorial: Add Step 1 background infoAdd learning material to Step 1. Collapse answers so that viewers can try exercises on their own first.
~~Add collapse extension in sphinx extensions (Note: this will require people building documentation to have sphinx_toolbox).~~Add learning material to Step 1. Collapse answers so that viewers can try exercises on their own first.
~~Add collapse extension in sphinx extensions (Note: this will require people building documentation to have sphinx_toolbox).~~3.25.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7506Tutorial: Move step 10 to step 42022-08-10T09:21:36-04:00Markus FerrellTutorial: Move step 10 to step 4Step 10 (Generator Expressions) becomes step 4. Steps 4-9 become steps 5-10.Step 10 (Generator Expressions) becomes step 4. Steps 4-9 become steps 5-10.3.25.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7508cmArgumentParser: Convert some Parse() arguments to bindings2022-07-26T09:27:47-04:00Brad KingcmArgumentParser: Convert some Parse() arguments to bindingsConvert the `parsedKeywords` argument to a binding used by the few clients that need it.
Convert the `keywordsMissingValue` argument to a private binding for the `cmake_parse_arguments()` implementation. All internal uses of the argume...Convert the `parsedKeywords` argument to a binding used by the few clients that need it.
Convert the `keywordsMissingValue` argument to a private binding for the `cmake_parse_arguments()` implementation. All internal uses of the argument have already been converted to bindings with wrapper types.3.25.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7512cmArgumentParser: Model non-empty strings with wrapper type2022-07-29T07:51:25-04:00Brad KingcmArgumentParser: Model non-empty strings with wrapper typeSome 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.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.3.25.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7513cmTry{Compile,Run}Command: Port away from legacy cmCommand2022-07-27T09:54:43-04:00Brad KingcmTry{Compile,Run}Command: Port away from legacy cmCommandConvert the command entry points to free functions.
Also add test cases covering more call argument errors.Convert the command entry points to free functions.
Also add test cases covering more call argument errors.3.25.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7514cmArgumentParser: Offer keyword callbacks and positional bindings2022-07-28T08:17:37-04:00Brad KingcmArgumentParser: Offer keyword callbacks and positional bindingsOffer clients a way to specify custom behavior when keyword values are encountered. Also add support for binding arguments by their position.Offer clients a way to specify custom behavior when keyword values are encountered. Also add support for binding arguments by their position.3.25.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7515FindCURL: Fix version string in case of multiple curl installations2022-07-28T08:14:37-04:00GeorgFindCURL: Fix version string in case of multiple curl installationsOn systems where there are two versions of libcurl installed
CURL_VERSION_STRING is always set to the version found by the
`pkg_check_modules(PC_CURL QUIET libcurl)`.
But CURL_VERSION_STRING should match the libs and include paths found...On systems where there are two versions of libcurl installed
CURL_VERSION_STRING is always set to the version found by the
`pkg_check_modules(PC_CURL QUIET libcurl)`.
But CURL_VERSION_STRING should match the libs and include paths found by
`find_path` and `find_library` (more specifically the path where the
header is found, because that where the version is parsed from.
So make sure that the version is always parsed from the header file, use
the output of pkg_check_modules only as HINT for find_path /
find_library
The issue is triggered when an additional version of libcurl is found in
the system and that additional version does not provide a .pc file. It
can be reproduced in the following way, e.g. on Ubuntu 18.04 (where
libcurl is available as default in version 7.58.0):
* Install QNX 7.1 under /opt/qnx710
* QNX 7.1 includes curl 7.77.0 .pc but does not provide .pc files
* `find_package(CURL)` sets CURL_VERSION_STRING to 7.58.0 but finds
libcurl.so itself under /opt/qnx710
* -- Found CURL: /opt/qnx710/target/qnx7/x86_64/usr/lib/libcurl.so
(found version "7.58.0")
* Build libcurl version 7.77.0 locally install it to /usr/local and
manually delete .pc and .cmake files
* `find_package(CURL)` sets CURL_VERSION_STRING to 7.58.0 but finds
libcurl.so itself under /usr/local
* -- Found CURL: /usr/local/lib/libcurl.so (found version "7.58.0")
Topic-rename: FindCURL-version-string3.25.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7519MSVC: Recognize -XYZ as well as /XYZ when parsing MS tool command lines2022-07-29T07:51:11-04:00Joev DubachMSVC: Recognize -XYZ as well as /XYZ when parsing MS tool command lines<details>
A new version of https://gitlab.kitware.com/cmake/cmake/-/merge_requests/7510 , attempting to resolve all feedback while fixing https://gitlab.kitware.com/cmake/cmake/-/issues/23772 . Note that in response to @fredrikclaesson ...<details>
A new version of https://gitlab.kitware.com/cmake/cmake/-/merge_requests/7510 , attempting to resolve all feedback while fixing https://gitlab.kitware.com/cmake/cmake/-/issues/23772 . Note that in response to @fredrikclaesson 's comment, I've adopted the policy of not changing '-' to '/'. Also note that this replaces https://gitlab.kitware.com/cmake/cmake/-/merge_requests/7518 , which got rejected by @kwrobot because my commit message was too long.
</details>
Fixes: #23772
Topic-rename: ms-tool-dash-flags3.25.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7524cmGeneratedFileStream: Use absolute paths2022-08-02T09:31:57-04:00Martin DuffycmGeneratedFileStream: Use absolute pathsUse absolute paths in cmGeneratedFileStream to ensure output can be found if the working directory changes.
Fixes: #23784Use absolute paths in cmGeneratedFileStream to ensure output can be found if the working directory changes.
Fixes: #237843.25.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7526FindOpenMP: Restore searching system paths2022-08-02T09:33:13-04:00SpriteFindOpenMP: Restore searching system paths!1481 has added `NO_DEFAULT_PATH` for `FindOpenMP` so that it no longer searches in `CMAKE_PREFIX_PATH`, but this also excludes searching in system paths, which causes OpenMP to not be found on RISC-V platforms (see #23469 for details).
...!1481 has added `NO_DEFAULT_PATH` for `FindOpenMP` so that it no longer searches in `CMAKE_PREFIX_PATH`, but this also excludes searching in system paths, which causes OpenMP to not be found on RISC-V platforms (see #23469 for details).
This MR removes `NO_DEFAULT_PATH` and uses more granular flags instead. This should continue to prevent searching in `CMAKE_PREFIX_PATH` and lastly trying system paths.
Fixes #23469.3.25.0Brad KingBrad King