summaryrefslogtreecommitdiffstats
path: root/Source/cmCMakeHostSystemInformationCommand.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Source: Avoid out-of-range inputs to std::isspace()Brad King2024-01-171-2/+2
| | | | | | | | | | | | | `isspace` takes `int` but documents that the value must be representable by `unsigned char`, or be EOF. Use a wrapper to cast to `unsigned char` to avoid sign extension while converting to `int`. This generalizes the fix from commit 5e8c176e2a (cmExecuteProcessCommand: Cast c to unsigned char before cast to int, 2024-01-05) to other `isspace` call sites. This was detected by assertions in the MSVC standard library while processing UTF-8 text. Issue: #25561
* Help: Replace link with its http redirectBrad King2023-10-191-1/+1
|
* cmake_host_system_information: Add MSYSTEM_PREFIX queryBrad King2023-09-101-0/+97
| | | | | | | Add a query on Windows hosts for the installation prefix of a MSYS or MinGW development environment. Issue: #24216
* cmCMakeHostSystemInformationCommand: Clarify function names and rolesBrad King2023-09-091-10/+9
|
* IWYU: Update for Debian 12 CI jobBrad King2023-07-281-0/+1
| | | | | | `include-what-you-use` diagnostics, in practice, are specific to the environment's compiler and standard library. Update includes to satisfy IWYU for our CI job under Debian 12.
* cmList: Add container conversion to stringMarc Chevrier2023-06-221-2/+2
|
* iwyu: ignore `std::remove_reference` requirementsBen Boeckel2023-05-161-1/+0
| | | | This removes some includes from some existing files.
* CMake code rely on cmList class for CMake lists management (part. 2)Marc Chevrier2023-04-291-6/+9
|
* cmCMakeHost*Command: Report keyword errors via argument parser resultsBrad King2022-07-221-8/+4
|
* cmArgumentParser: Avoid allocating copies of keyword stringsBrad King2022-07-051-1/+1
|
* cmSystemTools: Fix 'ErrorOccurred' spellingFeRD (Frank Dana)2022-06-131-1/+1
| | | | | | | | Rename the booleans 's_ErrorOccured' and 's_FatalErrorOccured' to 's_ErrorOccurred' and 's_FatalErrorOccurred', respectively. Rename the getters and setters to 'Get[Fatal]ErrorOccurred' and 'Set[Fatal]ErrorOccurred', and fix all uses across the codebase.
* cmWindowsRegistry: Add helper for conversion between string and enum ViewMarc Chevrier2022-04-291-13/+5
|
* cmake_host_system_information: query windows registryMarc Chevrier2022-04-131-0/+108
| | | | Fixes: #21240, #23367
* cmake_host_system_information: Add undocumented VS_MSBUILD_COMMAND keyBrad King2021-10-201-0/+7
| | | | | | | | | | When using the Visual Studio generator for VS 10 or above, offer this key to get the location of the MSBuild command before the first `project()` or `enable_language()` command has finished running. This will be needed only by one of our own modules, so leave it undocumented for now.
* cmake_host_system_information: Make it available for all systemsAlex Turbov2021-08-201-4/+0
| | | | Before it was Linux only.
* Refactor: Simplify `GetValue()` function callsAlex Turbov2021-08-201-15/+27
|
* cmake_host_system_information: Also set `USED_FALLBACK_SCRIPT`Alex Turbov2021-08-201-1/+4
| | | | If the OS identification was obtained via fallback script.
* cmake_host_system_information: Can run fallback scriptsAlex Turbov2021-08-201-2/+90
|
* cmake_host_system_information: Can read `/etc/os-release` fileAlex Turbov2021-08-201-6/+191
|
* Refactor: Deduplicate code for `VS_nn_DIR` keys processingAlex Turbov2021-07-301-48/+18
|
* Refactor: Use string viewAlex Turbov2021-07-301-29/+31
|
* Refactor: `bool GetValue(..., string&)` → `optional<string> GetValue(...)`Alex Turbov2021-07-301-70/+114
| | | | | | | Also, split `GetValue()` into 2 overloads: - one used to get documented keys - the other (different signature) to get `VS_nn_DIR` keys
* Refactor: Move module private functions on topAlex Turbov2021-07-281-62/+54
|
* Refactor: Run CPU/OS/Memory tests once on first runAlex Turbov2021-07-271-4/+8
|
* VS: Add Visual Studio 17 2022 generatorBrad King2021-06-251-0/+16
| | | | Fixes: #22339
* Revise include order using clang-format-6.0Kitware Robot2019-10-011-1/+2
| | | | | Run the `clang-format.bash` script to update our C and C++ code to a new include order `.clang-format`. Use `clang-format` version 6.0.
* clang-tidy: modernize-deprecated-headersRegina Pfeifer2019-09-161-1/+1
|
* Source sweep: Replace std::ostringstream when used with a single appendSebastian Holtermann2019-08-231-4/+1
| | | | | | | This replaces `std::ostringstream`, when it is written to only once. If the single written argument was numeric, `std::to_string` is used instead. Otherwise, the single written argument is used directly instead of the `std::ostringstream::str()` invocation.
* cmCommand refactor: cmCMakeHostSystemInformationCommandGabor Bencze2019-08-201-44/+52
|
* cmMakefile: Let AddDefinition accept a value as cm::string_viewSebastian Holtermann2019-07-241-1/+1
| | | | | | | | | | | | | | | | This changes `cmMakefile::AddDefinition` to take a `cm::string_view` as value argument instead of a `const char *`. Benefits are: - `std::string` can be passed to `cmMakefile::AddDefinition` directly without the `c_str()` plus string length recomputation fallback. - Lengths of literals passed to `cmMakefile::AddDefinition` can be computed at compile time. In various sources uses of `cmMakefile::AddDefinition` are adapted to avoid `std::string::c_str` calls and the `std::string` is passed directly. Uses of `cmMakefile::AddDefinition`, where a `nullptr` `const char*` might be passed to `cmMakefile::AddDefinition` are extended with `nullptr` checks.
* VS: Add Visual Studio 16 2019 generatorBrad King2019-01-111-0/+16
| | | | | | | | | | | | Add this generator *without* support for specifying the target architecture in the generator name. cmake-gui will be taught to provide a field for this, and command-line builds can use -A. Also, teach this generator to select a default target architecture based on the host architecture. Fixes: #18689 Inspired-by: Egor Pugin <egor.pugin@gmail.com>
* VS: Rename VS 2017 generator sources to be version-independentBrad King2019-01-111-3/+3
| | | | | | Rename `cmGlobalVisualStudio{15 => Versioned}Generator`. Rename `Factory` to `Factory15` since that part still needs to be version-specific.
* VS: Parameterize cmVSSetupAPIHelper instances with VS versionBrad King2019-01-111-1/+1
|
* Revise C++ coding style using clang-format-6.0Kitware Robot2018-06-011-6/+6
| | | | | | | | | | | | 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 6.0. * 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.
* VS: Select and save a VS 2017 instance persistentlyBrad King2017-10-191-0/+14
| | | | | | | | | | Visual Studio 2017 supports multiple instances installed on a single machine. We use the Visual Studio Installer tool to enumerate instances and select one. Once we select an instance for a given build tree, save the result in `CMAKE_GENERATOR_INSTANCE` so we can re-configure the tree with the same instance on future re-runs of CMake. Fixes: #17268
* cmake_host_system_information: Add more keywordsFlorian Maushart2017-06-051-0/+49
| | | | | Extend the `cmake_host_system_information()` command to add processor identification keywords.
* Add const-reference qualificationsPavel Solodovnikov2017-05-261-2/+2
|
* Add undocumented CMake language means to find VS 2017Brad King2017-03-271-0/+13
| | | | | | Add a query to the `cmake_host_system_information` command to get the location of a VS 2017 installation. Leave it undocumented and for internal use for now.
* Separate compilation for commands included in cmCommandsDaniel Pfeifer2016-10-211-0/+7
|
* Simplify CMake per-source license noticesBrad King2016-09-271-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Per-source copyright/license notice headers that spell out copyright holder names and years are hard to maintain and often out-of-date or plain wrong. Precise contributor information is already maintained automatically by the version control tool. Ultimately it is the receiver of a file who is responsible for determining its licensing status, and per-source notices are merely a convenience. Therefore it is simpler and more accurate for each source to have a generic notice of the license name and references to more detailed information on copyright holders and full license terms. Our `Copyright.txt` file now contains a list of Contributors whose names appeared source-level copyright notices. It also references version control history for more precise information. Therefore we no longer need to spell out the list of Contributors in each source file notice. Replace CMake per-source copyright/license notice headers with a short description of the license and links to `Copyright.txt` and online information available from "https://cmake.org/licensing". The online URL also handles cases of modules being copied out of our source into other projects, so we can drop our notices about replacing links with full license text. Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority of the replacements mechanically. Manually fix up shebang lines and trailing newlines in a few files. Manually update the notices in a few files that the script does not handle.
* Use braces around statementsDaniel Pfeifer2016-09-161-2/+2
|
* Prefer istringstream and ostringstream over stringstream.Daniel Pfeifer2016-06-141-1/+1
| | | | Use istringsream for parsing, ostringstream for generation.
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-51/+30
| | | | | | | | | | | | | Run the `Utilities/Scripts/clang-format.bash` script to update all our C++ code to a new style defined by `.clang-format`. Use `clang-format` version 3.8. * 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.
* Remove use of include <cmsys/ios/*> and cmsys_ios::*Brad King2015-08-201-3/+1
| | | | We no longer need this compatibility layer for the compilers we support.
* Remove some c_str() calls.Stephen Kelly2014-03-111-2/+2
| | | | | | Use the clang RemoveCStrCalls tool to automatically migrate the code. This was only run on linux, so does not have any positive or negative effect on other platforms.
* Add cmake_host_system_information commandNils Gladitz2013-06-191-0/+126
Expose the internal system information API to the CMake language. For example, it is useful to see how much memory the system has available to estimate an upper limit of tests that can run in parallel.