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
Marc Chevrier
d9b2c7dae2
Introduce memory management helper: cm_memory.hxx
2019-07-14 15:37:30 +02:00
Brad King
71fbebd1dc
IWYU: Fix handling of <memory> standard header
...
An old workaround for `std::allocator_traits<>::value_type` lints from
IWYU on `std::vector<>` usage breaks IWYU's handling of `<memory>`.
Convert the workaround to use the same approach we already use for a
workaround of `std::__decay_and_strip<>::::__type` lints. Then update
the `<memory>` inclusions to follow the now-correct IWYU lints.
2019-07-10 11:48:56 -04:00
Sebastian Holtermann
e50fa44a35
cmake: Refactor file extension list setup
...
Refactor the file extention list setup in cmake.h/cxx and add file extensions
lists for Cuda and Fortran.
2019-07-04 13:46:15 +02:00
Alex Turbov
5e52de7d57
modermize: replace some raw pointers w/ unique_ptr
2019-06-24 09:36:09 -04:00
Brad King
c932f49842
cmake: Teach -E capabilities to report supported fileapi requests
...
Fixes : #19339
2019-06-07 11:08:38 -04:00
Brad King
6696855f72
cmake: Simplify implementation of -E capabilities
...
The `cmake -E capabilities` command-line tool is implemented only in a
full-featured (non-bootstrap) CMake, and server mode is now always
available in this case.
2019-06-07 11:08:38 -04:00
Sebastian Holtermann
006229278b
Use cmAppend to append ranges to std::vector instances
2019-05-23 16:19:49 +02:00
Brad King
8ed6efbbd3
Merge topic 'default-generator-env'
...
d0f0ba0f7a Tests: Add environment generator tests
a48ce8f4bf Help: Add documentation for default generator environment variables
083cf7e8a2 cmake: Allow default generator to be set by environment variables
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3218
2019-05-22 10:32:43 -04:00
Vitaly Stakhovsky
273257222e
Source: change parameters to std::string
2019-05-19 10:33:26 -04:00
Eicke Herbertz
083cf7e8a2
cmake: Allow default generator to be set by environment variables
...
When there is no Generator available in the Cache, this will read
CMAKE_GENERATOR from environment before using the CMake platform default.
If CMAKE_GENERATOR is empty, use the platform default.
If a environment default generator is specified, subsequent variables
CMAKE_GENERATOR_(INSTANCE,PLATFORM,TOOLSET) are also evaluated
in the same way.
2019-05-16 23:00:27 +02:00
Kyle Edwards
8cc04b1918
cmake: Display error if generate step fails
2019-05-13 10:31:39 -04:00
Alex Turbov
6cc93b370e
message(): Add support for log levels
...
Relates: #18943
Co-Authored-By: Craig Scott <craig.scott@crascit.com>
2019-04-28 22:45:44 +10:00
Alex Turbov
99698ee351
cmake: Fix missed return
statement when CLI errors found
2019-04-01 08:31:25 +11:00
Brad King
89abbdd8c8
Merge topic 'ghs-linux'
...
2c43fb5be3 FindThreads: Fix pthread library check in GHS Multi Generator
0404efe786 GHS: Add support for GHS Multi Generator in Linux
2060a1445c Tests: Fix file name case in GHS object library test
ddad70c8a4 Tests: Run GHS tests in a separate ctest process
f7dca1fc97 GHS: Fix include-what-you-use and clang-tidy diagnostics
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3006
2019-03-22 09:22:44 -04:00
Naren Manimohan
0404efe786
GHS: Add support for GHS Multi Generator in Linux
2019-03-21 12:57:40 -04:00
Sebastian Holtermann
ec3c968de2
cmake: Use scopes to limit temporary object lifetime
2019-03-18 15:09:11 +01:00
Sebastian Holtermann
5536cec46e
Rename cmFileTimeCache::FileTimeCompare to cmFileTimeCache::Compare
2019-03-18 15:09:11 +01:00
Sebastian Holtermann
a6d75a1ce0
Substitute FileComparison in variable names with FileTimeCache
2019-03-18 15:09:11 +01:00
Sebastian Holtermann
216416219a
Rename cmFileTimeComparison to cmFileTimeCache
...
The name `cmFileTimeCache` reflects the functionality of the class more
appropriately.
2019-03-18 15:09:11 +01:00
Brad King
83183cbaec
Merge topic 'vs-no-stamp-messages'
...
67428e9025 VS: Do not print message when generate.stamp is up-to-date.
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3054
2019-03-06 08:37:14 -05:00
Olli Kallioinen
67428e9025
VS: Do not print message when generate.stamp is up-to-date.
...
Fixes : #16783
2019-03-05 11:20:42 -05:00
Bartosz Kosiorek
324d18bb34
cmake: Teach --build mode to support multiple targets
...
Fixes : #16136
2019-03-05 08:55:28 -05:00
Vitaly Stakhovsky
9dd255548d
cmSystemTools::Error: consolidate parameters into single std::string
2019-02-20 11:18:11 -05:00
Brad King
2bff8513f2
Merge topic 'modernize-for-loops-c-arrays'
...
706b93fa55 Modernize: C-arrays and loops over them
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2951
2019-02-19 07:56:41 -05:00
Artur Ryt
706b93fa55
Modernize: C-arrays and loops over them
...
It replaces C arrays with deduced std::initializer_lists
or std::array what makes enables for-loop over them.
2019-02-15 23:40:30 +01:00
Vitaly Stakhovsky
bd20cc29a2
cmSystemTools: Remove redundant cmCopyFile() and Split()
2019-02-15 09:52:29 -05:00
Brad King
8914d4317a
Merge topic 'systools-stdstring2'
...
080a79ca4a cmSystemTools: More methods accept `std::string` params
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2952
2019-02-13 10:17:08 -05:00
Vitaly Stakhovsky
080a79ca4a
cmSystemTools: More methods accept std::string
params
2019-02-11 18:11:59 -05:00
Vitaly Stakhovsky
950c099d83
cmake: Progress functions use std::string
param
2019-02-11 10:32:43 -05:00
Vitaly Stakhovsky
0779bc9393
ReadListFile: Accept std::string argument
2019-01-31 09:27:54 -05:00
Brad King
c30f9b1cde
Merge topic 'functional-callbacks'
...
8c92db829b MessageCallback: Remove unused bool& argument
bcee24aecc Use `std::function` for callbacks
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: vvs31415 <vstakhovsky@fastmail.com>
Acked-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
Merge-request: !2872
2019-01-30 08:10:27 -05:00
Vitaly Stakhovsky
c31b6e616d
cmSystemTools: copy file member functions accept std::string params
...
Cleaned up `c_str()`s.
`cmSystemTools::CopyFileIfDifferent()` removed as redundant.
2019-01-29 10:34:18 -05:00
Regina Pfeifer
bcee24aecc
Use std::function
for callbacks
2019-01-29 16:32:52 +01:00
Brad King
9620cb935a
Merge topic 'add_consistent_verbose_build_flag'
...
66801f4d40 cmake: Add tests for verbose output to --build mode
439fe2e253 cmake: Add options for verbose output to --build mode
638667efa2 cmake: cmcmd.cxx fix "The arguments are" comments
3ca4402966 ctest: Fix --build-and-test without --build-target on Xcode
cb6c233ecc cmake: Add -hideShellScriptEnvironment xcodebuild option
1a45266cb5 cmGlobalGenerator: Add a class that represent the build command
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2708
2019-01-29 09:19:39 -05:00
Brad King
90ac5e6384
Merge topic 'message-stdstring'
...
186d9b083d cmSystemTools::Message: Add overload accepting std::string
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2869
2019-01-29 09:17:51 -05:00
Florian Maushart
439fe2e253
cmake: Add options for verbose output to --build mode
...
While we already support `VERBOSE` environment variable and
`CMAKE_VERBOSE_MAKEFILE` cached variable, add `-v` and `--verbose`
command line options to be able to activate verbose output directly from
CMake's build tool mode command line.
Also make `msbuild` honor the verbosity setting. `xcodebuild` still
doesn't honor the verbosity setting as it will need a policy added
and reworking of cmGlobalGenerator and cmsys to support
multiple command invocation.
2019-01-28 09:44:50 -05:00
Vitaly Stakhovsky
186d9b083d
cmSystemTools::Message: Add overload accepting std::string
2019-01-28 09:35:51 -05:00
Vitaly Stakhovsky
2fc69ba0b3
cmFileTimeComparison: use std::string arguments
2019-01-28 09:09:59 -05:00
Brad King
40745ad35a
Merge topic 'cmake-files-directory'
...
3e867ed400 cmake: inlined files dir constant and removed it from cmake.h
Acked-by: Kitware Robot <kwrobot@kitware.com>
Rejected-by: vvs31415 <vstakhovsky@fastmail.com>
Merge-request: !2655
2019-01-25 08:01:26 -05:00
Brad King
c18fc30d1a
Merge topic 'renamefile-string'
...
9e5c13738b cmSystemTools::RenameFile: Accepts std::string args
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2842
2019-01-25 08:00:14 -05:00
Vitaly Stakhovsky
99337d345b
cmSystemTools::Error(): new overload accepting std::string
2019-01-23 10:19:30 -05:00
Vitaly Stakhovsky
9e5c13738b
cmSystemTools::RenameFile: Accepts std::string args
2019-01-22 20:37:59 -05:00
Craig Scott
68b51fb19a
cmake: Convert no source/build dir error to warning
...
Temporarily restore previous behavior that allowed specifying
no source or build directory to work, even though it was
neither documented nor supported. This commit is expected
to eventually be reverted to restore the fatal error for such
cases.
Relates: #18817
2019-01-22 14:46:03 -05:00
Brad King
a1f65014a3
Merge topic 'help-mark-default-generator'
...
dfd5ae7da7 Help: Mark default CMake generator with asterisk
6023fe7ff2 ccmake: Append rather than replace Generators section of docs
7408cd3929 cmake: Return generator docs directly
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2682
2019-01-22 11:37:01 -05:00
Brad King
cb7fbf1dbb
Merge topic 'stdout-string'
...
3132ea801c cmSystemTools: Stdout(),Stderr() accept std::string argument
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2829
2019-01-22 09:32:58 -05:00
Brad King
17e12a9fa9
Merge topic 'cmake-gui-generator-platform'
...
67bced8a26 cmake-gui: Improve label for default platform
48ec0bc140 cmake-gui: Add field for generator platform selection
8bba458ea5 Add global generator factory method to get default platform name
818df52c48 Add global generator factory method to get list of known platforms
8144b00e32 Split global generator factory list with and without platforms
b70c0aed5c VS: Factor out helper function to compute host platform name
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2832
2019-01-22 09:28:18 -05:00
Bruno Manganelli
3e867ed400
cmake: inlined files dir constant and removed it from cmake.h
2019-01-21 15:34:16 +00:00
Brad King
c7428e1729
Merge topic 'read-list-file'
...
25caf7bafe cmMakefile::ReadListFile() accepts std::string argument
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2821
2019-01-21 07:57:33 -05:00
Vitaly Stakhovsky
3132ea801c
cmSystemTools: Stdout(),Stderr() accept std::string argument
2019-01-20 00:03:35 -05:00