summaryrefslogtreecommitdiffstats
path: root/Source/cmStateSnapshot.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Add CMAKE_HOST_EXECUTABLE_SUFFIX for Unix/Windowsleha-bot2024-10-021-0/+2
| | | | Closes: #17553
* 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.
* CYGWIN: Drop pre-2.8.4 compatibility mode CMAKE_LEGACY_CYGWIN_WIN32Brad King2023-01-191-8/+0
| | | | | | | | | | Prior to CMake 2.8.4 (released in 2011), we defined `WIN32` on CYGWIN. That was removed, but an undocumented `CMAKE_LEGACY_CYGWIN_WIN32` compatibility mode was left to help projects transition. Only projects that do not require at least 2.8.4 as their minimum CMake version need the compatibility mode. We've also long warned about projects that do not require at least 2.8.12, so it is now reasonable to remove the legacy compatibility mode.
* cmState: Clarify name of member tracking the active scope in a directoryBrad King2022-11-071-5/+5
| | | | | | | | | | The `DirectoryEnd` member added by commit 52dbe654de (cmState: Record the end position of each directory., 2015-08-01, v3.4.0-rc1~251^2~1) actually tracks the current top-most scope in a directory's stack. This is evidenced by the use case in commit 3f4e5e8c3d (cmState: Return end snapshot for GetBuildsystemDirectoryParent., 2015-09-01, v3.4.0-rc1~100^2~1). Rename the member to `CurrentScope` to clarify this role.
* LINUX: Set CMAKE_HOST_LINUX variable when running on a Linux hostCristian Adam2022-09-091-0/+5
| | | | Relates: #23840
* BSD: Set CMAKE_HOST_BSD variable on a BSD hostCristian Adam2022-09-051-0/+14
| | | | | | Also the BSD variable will be set in CMake scripting mode (-P). Relates: #23853
* Rename cmProp in cmValueMarc Chevrier2021-09-211-3/+3
|
* Refactor: Convert parallel string/backtrace vectors to BT vectorsKyle Edwards2021-09-031-20/+7
|
* Refactor: Use new SetProperty signaturesMarc Chevrier2021-08-251-1/+1
|
* cmProp: refactoring: transform alias in classMarc Chevrier2021-08-081-2/+1
| | | | | | To handle safely the values used by CMake variables and properties, introduce the class cmProp as a replacement from the simple pointer to std::string instance.
* Refactor: Add cmSystemTools::GetSystemName()Kyle Edwards2021-03-151-35/+20
| | | | And use it for CMAKE_HOST_SYSTEM_NAME and CMAKE_SYSTEM_NAME.
* Merge topic 'GetExecutionListFile-by-ref'Brad King2020-09-081-1/+1
|\ | | | | | | | | | | | | 879bd7fd9c cmStateSnapshot: Return const reference from GetExecutionListFile() Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5186
| * cmStateSnapshot: Return const reference from GetExecutionListFile()Oleksandr Koval2020-09-031-1/+1
| |
* | Refactor: Use cmToCStr()Vitaly Stakhovsky2020-09-031-2/+1
|/
* cmIsOn: add overload accepting const std::string*Vitaly Stakhovsky2020-07-141-1/+1
|
* cmake: Remove broken '--warn-unused-vars' optionBrad King2020-06-291-5/+0
| | | | | | | | | | | | | This option has been broken since commit b9f9915516 (cmMakefile: Remove VarUsageStack., 2015-05-17, v3.3.0-rc1~52^2). That commit removed the check that an initialized variable has actually been used and caused the option to warn on every variable ever set. This was not caught by the test suite because the test for the feature only checked that warnings appear when needed and not that they do not appear when not needed. The option was never very practical to use. Remove it to avoid the runtime cost of usage tracking and checks for every variable (which we were doing even when the option was not used).
* cmStateSnapshot: Invert CanPopPolicyScope return value to match nameBrad King2020-06-181-1/+1
|
* Single location for cmProp typedefVitaly Stakhovsky2020-06-011-0/+1
|
* cmPropertyMap: Introduce cmProp as return type for GetProperty() functionsVitaly Stakhovsky2020-03-131-2/+3
| | | | | | | Currently properties are usually stored internally as `std::string`. However, family of GetProperty() functions return them as `const char *` using `c_str()`. The proposed `cmProp`, typedef'ed as `const std::string *` will expose properties more naturally.
* Android: add support for native compilation, such as with the Termux appButta2019-10-151-0/+4
| | | | | | | | | The CMake support for Android assumes cross-compilation using the NDK, so stub out that Android NDK support and use the Linux support that's already invoked. Set CMAKE_HOST_SYSTEM_NAME to "Android", rather than "Linux". Issue: #19840
* cmstd: Modernize CMake system headersMarc Chevrier2019-09-201-3/+3
| | | | | | | | | | | | | | 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
* clang-tidy: modernize-deprecated-headersRegina Pfeifer2019-09-161-1/+1
|
* clang-tidy: modernize-use-autoRegina Pfeifer2019-09-101-11/+7
| | | | | | Set the MinTypeNameLength option to an impossibly high value in order to limit the diagnostics to iterators. Leave new expressions and cast expressions for later.
* clang-tidy: modernize-return-braced-init-listRegina Pfeifer2019-09-061-4/+3
|
* Source sweep: Use cmIsOn instead of cmSystemTools::IsOnSebastian Holtermann2019-08-171-1/+1
| | | | | | | | | This replaces invocations of - `cmSystemTools::IsInternallyOn` with `cmIsInternallyOn` - `cmSystemTools::IsNOTFOUND` with `cmIsNOTFOUND` - `cmSystemTools::IsOn` with `cmIsOn` - `cmSystemTools::IsOff` with `cmIsOff`
* cmDefinitions: Remove const char* based Set methodSebastian Holtermann2019-07-241-4/+8
| | | | | | | - Removes `cmDefinitions::Set` method overload that takes a `const char*` value argument. - Updates calls to `cmDefinitions::Set` to use the `cm::string_view` based version instead.
* cmake: inlined files dir constant and removed it from cmake.hBruno Manganelli2019-01-211-3/+1
|
* clang-tidy: Remove redundant member initializationsRegina Pfeifer2018-12-151-1/+0
|
* cmStateSnapshot: Add method to get current directory snapshotBrad King2018-12-111-0/+6
|
* LINK_DIRECTORIES: Add new properties and commandsMarc Chevrier2018-09-251-0/+7
| | | | | | | | | | | | These new capabilities enable to manage link directories Two new properties: * target properties: LINK_DIRECTORIES and INTERFACE_LINK_DIRECTORIES One new command * target_link_directories(): to populate target properties Fixes: #17215
* cmStateSnapshot::GetDefinition(): Return std::string const*Vitaly Stakhovsky2018-09-061-3/+4
| | | | Expose std::string type used internally in cmDefinitions instead of const char*
* LINK_OPTIONS: Add new family of propertiesMarc Chevrier2018-06-061-0/+7
| | | | | | | | | | | | | | This family enable to manage link flags Three new properties: * directory property: LINK_OPTIONS * target properties: LINK_OPTIONS and INTERFACE_LINK_OPTIONS Two new commands * add_link_options(): to populate directory property * target_link_options(): to populate target properties Fixes: #16543
* Revise C++ coding style using clang-format-6.0Kitware Robot2018-06-011-2/+2
| | | | | | | | | | | | 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.
* cmake_policy: Add undocumented PARENT_SCOPE option to GETBrad King2018-04-181-2/+6
| | | | | | Policies affecting the behavior of CMake-provided macros and functions need to be able to get the policy setting as of the call site rather than the definition site. Add an undocumented option to do this.
* Replace some uses of sprintf with std::to_stringjrp20142018-04-051-10/+9
|
* include_regular_expression: Fix propagation to subdirectoriesBrad King2018-01-241-0/+6
| | | | | | | | | | | | | | Refactoring in commit v3.4.0-rc1~321^2 (cmMakefile: Remove special handling of INCLUDE_REGULAR_EXPRESSION, 2015-04-04) accidentally broke propagation of the include regex to subdirectories. Refactoring in commit v3.5.0-rc1~319^2~1 (cmState: Initialize properties immediately, 2015-10-07) moved maintenance of this value from `cmMakefile` to `cmStateSnapshot`. Restore propagation of the `INCLUDE_REGULAR_EXPRESSION` to subdirectories and add a test to cover it. Fixes: #17676
* Use C++11 nullptrDaniel Pfeifer2017-08-241-1/+1
|
* Pass large types by const&, small types by valueDaniel Pfeifer2017-06-031-1/+1
|
* Fix CMAKE_HOST_SYSTEM_NAME on SunOSBrad King2017-02-271-1/+1
| | | | | | | | | | In commit 0bbd993f (Make CMAKE_HOST_SYSTEM_NAME available in scripting context, 2016-12-26) we added a call to `uname` that checks for a zero return value. However, on Solaris the `uname(2)` manual [1] says that on success a non-negative value is returned. Fix our return code check so that we detect the `SunOS` name correctly. [1] https://docs.oracle.com/cd/E53394_01/html/E54765/uname-2.html
* Make CMAKE_HOST_SYSTEM_NAME available in scripting contextGregor Jasny2017-02-191-0/+10
|
* Fix several include-what-you-use findingsDaniel Pfeifer2016-11-081-1/+13
|
* cmState: Split auxiliary classes into separate filesStephen Kelly2016-10-191-0/+415
Port dependents to the new locations as needed. Leave behind a cmState.h include in cmListFileCache to reduce noise. It is removed in a following commit.