Commit Graph

968 Commits

Author SHA1 Message Date
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
Artur Ryt
dfd5ae7da7 Help: Mark default CMake generator with asterisk
Required extracting default generator evaluation
to explicit function, as Visual Studio generators
get validated during their construction.

Fixes: #18544
2019-01-18 12:57:34 -05:00
Artur Ryt
7408cd3929 cmake: Return generator docs directly
The GetGeneratorDocumentation() function was not accurately
named and required the vector to populate to be passed as a
function argument. This commit makes the slightly renamed
function return by value, making it a true getter as implied
by its name. Some minor refactoring of the implementation
also makes the steps of populating the vector clearer.
2019-01-18 12:57:32 -05:00
Brad King
8bba458ea5 Add global generator factory method to get default platform name 2019-01-18 12:30:19 -05:00
Brad King
818df52c48 Add global generator factory method to get list of known platforms
Add a `cmGlobalGeneratorFactory::GetKnownPlatforms` method to return
a list of known possible values for `CMAKE_GENERATOR_PLATFORM`.
Implement the method for each generator by referencing the list of
possible values documented in `Help/generator/*.rst` for it.

Co-Author: Julien Jomier <julien.jomier@kitware.com>
2019-01-18 12:29:53 -05:00
Brad King
8144b00e32 Split global generator factory list with and without platforms
Replace `cmGlobalGeneratorFactory::GetGenerators` with a pair of methods
to split the list of generator names into those that have platforms in
the name and those that do not.
2019-01-18 12:29:53 -05:00
Regina Pfeifer
ef61997b1b clang-tidy: Use emplace 2019-01-17 13:12:02 -05:00
Vitaly Stakhovsky
25caf7bafe cmMakefile::ReadListFile() accepts std::string argument
Same for cmMakefile::ReadDependentFile(); some cleanup
2019-01-17 12:36:07 -05:00
Kyle Edwards
4568d046c4 Properties: Add CMAKE_ROLE global property
This property allows scripts to determine whether they're in project
mode, script mode, find-package mode, CTest, or CPack.
2019-01-17 09:44:29 -05:00
Bruno Manganelli
cc2a5261f8 Factor out enum MessageType into dedicated header
Reduce the number of files relying on `cmake.h`.
2019-01-16 08:16:31 -05:00
Brad King
41b0c0dc73 Merge topic 'vs2019'
57e48f16f2 VS: Add Visual Studio 16 2019 generator
bdef729646 VS: Parameterize VS 2017 generator to support future versions
68d316e0cf VS: Rename VS 2017 generator sources to be version-independent
d8ed309d05 VS: Parameterize cmVSSetupAPIHelper instances with VS version

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2789
2019-01-15 13:23:38 -05:00
Brad King
1f411b0cfa Merge topic 'cmake-option-parsing'
27eb7c5bdb cmake: Ensure source and binary dirs are set
a1adbc7243 cmake: Stop processing if -P option lacks file name

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2799
2019-01-14 07:25:46 -05:00
Craig Scott
27eb7c5bdb cmake: Ensure source and binary dirs are set
If only the source dir is provided, the binary dir is assumed
to be the working directory. If only the binary dir is provided
and it doesn't yet have a CMakeCache.txt to provide the
source dir, then the source dir is assumed to be the working
directory. This logic was not previously being handled
correctly when -S and/or -B options were involved.
Furthermore, when both were missing, no suitable error
message was provided and an empty string was used for
the build directory.

Fixes: #18707
2019-01-14 07:13:28 +11:00