summaryrefslogtreecommitdiff
path: root/Source/cmMessageCommand.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Add cmake_language(GET_MESSAGE_LOG_LEVEL) sub commandAlexandru Croitor2022-06-281-12/+1
| | | | | | | | | | | | | | | | | The new sub-command writes a string representation of the current log level to the output variable given to the sub-command. Given that the log-level might be set either via the --log-level command line option or via the CMAKE_MESSAGE_LOG_LEVEL cache / regular variables, the priority for each of the log level sources is as follows, with the first one being the highest: 1) --log-level 2) CMAKE_MESSAGE_LOG_LEVEL regular variable 3) CMAKE_MESSAGE_LOG_LEVEL cache variable 4) default log level (STATUS) Fixes: #23572
* Move LogLevel enum out of cmake.h headerAlexandru Croitor2022-06-241-27/+27
| | | | | | | Move LogLevel enum into the cmMessageType.h header in preparation for a new log level querying feature. Wrap the enum into a new Message namespace. Adjust all code usages.
* 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.
* Refactoring: rename "cm_static_string_view.hxx" as <cmext/string_view>Marc Chevrier2020-04-301-2/+1
|
* message: New message types to mark checks performed by CMakeAlex Turbov2019-11-021-24/+89
| | | | | | Closes #19638. Co-Authored-By: Craig Scott <craig.scott@crascit.com>
* message: Support logging a context with each messageAlex Turbov2019-10-121-8/+17
|
* message: Add new CMAKE_MESSAGE_LOG_LEVEL variableAlex Turbov2019-10-121-0/+9
|
* message: Minor refactor to make code less verboseAlex Turbov2019-10-121-14/+14
|
* Revise include order using clang-format-6.0Kitware Robot2019-10-011-2/+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.
* cmMessageCommand: Remove extra layer of parenthesesBrad King2019-08-261-2/+2
| | | | | | | | | The logic checking `CMAKE_WARN_DEPRECATED` contained an unnecessary layer of parentheses. The condition is of the form `!IsSet || IsOn` which is correct because the documentation says that the behavior is enabled unless the variable is explicitly set to a false value. Issue: #19610
* cmCommand refactor: CmMessageCommandGabor Bencze2019-08-201-16/+16
|
* Source code: Use cmExpandList instead of cmSystemTools::ExpandListArgumentSebastian Holtermann2019-08-141-4/+3
|
* cmStringAlgorithms: Move string functions to the new cmStringAlgorithms.hSebastian Holtermann2019-07-291-1/+1
| | | | | This adds the `cmStringAlgorithms.h` header and moves all string functions from `cmAlgorithms.h` to `cmStringAlgorithms.h`.
* message(): Control indentation via CMAKE_MESSAGE_INDENTAlex Turbov2019-07-211-14/+38
|
* message(): Minor code modernizationAlex Turbov2019-04-281-5/+5
|
* message(): Add support for log levelsAlex Turbov2019-04-281-0/+42
| | | | | Relates: #18943 Co-Authored-By: Craig Scott <craig.scott@crascit.com>
* cmRange: Move to dedicated header fileRegina Pfeifer2019-02-211-0/+1
|
* cmake: Progress functions use `std::string` paramVitaly Stakhovsky2019-02-111-1/+1
|
* cmSystemTools::Message: Add overload accepting std::stringVitaly Stakhovsky2019-01-281-1/+1
|
* Factor out enum MessageType into dedicated headerBruno Manganelli2019-01-161-10/+10
| | | | Reduce the number of files relying on `cmake.h`.
* Fix trivial typos in textluzpaz2017-11-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some are user facing. Found using codespell -q 3 --skip="./Utilities" -I .cmake-whitelist.txt` whereby the whitelist contained: ans dum helpfull emmited emmitted buil iff isnt nto ot pathes substract te todays upto whitespaces
* Fix several include-what-you-use findingsDaniel Pfeifer2016-11-081-2/+0
|
* Include necessary headers in commandsDaniel Pfeifer2016-10-261-0/+7
|
* Separate compilation for commands included in cmBootstrapCommands2Daniel Pfeifer2016-10-211-0/+1
|
* 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 empty method to check for emptynessDaniel Pfeifer2016-09-151-1/+1
|
* cmMessenger: Extract from cmake classStephen Kelly2016-08-251-2/+4
| | | | | | | | This way messages can be issued independent of the cmake instance. It is now possible to make DisplayMessage a virtual interface and override it to handle messages in the cmake-gui or future IDE interaction interfaces.
* Merge topic 'fix-cmake-ISP-violation'Brad King2016-06-131-2/+3
|\ | | | | | | | | | | 23f87e81 cmake: Remove force from IssueMessage API 54c65d5f cmake: Extract DisplayMessage API.
| * cmake: Remove force from IssueMessage APIStephen Kelly2016-06-121-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The force parameter is ugly and makes the method harder to reason about (issues the message ... but maybe it doesn't ... but then again you can force it). It is a violation of https://en.wikipedia.org/wiki/Interface_segregation_principle and is the kind of thing described in a recent blog here: http://code.joejag.com/2016/anti-if-the-missing-patterns.html "Any time you see this you actually have two methods bundled into one. That boolean represents an opportunity to name a concept in your code."
* | cmake: Issue message independent of cmMakefile definitionStephen Kelly2016-06-121-5/+6
|/ | | | | | | | | | | | | | | | | The makefile is only used when called by the cmMessageCommand, so inline the use of it there. It otherwise creates an undesirable dependency on cmMakefile for issuing messages in the cmake instance, a violation of the Interface Segregation Principle. https://en.wikipedia.org/wiki/Interface_segregation_principle This also makes it more explicit that the variable definitions only affect the message() command. If an AUTHOR_WARNING is issued for any other reason, it is not affected. To affect that, it is necessary to set the cache variable instead of the regular variable. This is an unfortunate interface quirk, but one which can't be fixed easily now.
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-56/+26
| | | | | | | | | | | | | 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.
* Add -Werror and -Wno-error command-line optionsMichael Scott2016-01-121-14/+15
| | | | | | | | | Expand the -W set of cmake options to include support for the -Werror and -Wno-error format, which is used to control upgrading and downgrading warning and error messages. Implement support for these new formats for the dev and deprecated message types. Add tests and updated documentation for new options.
* Explicitly enable deprecated warnings by default.Michael Scott2015-12-011-5/+9
| | | | | | | | | | Explicitly enable deprecated warnings by default, via the cmake::GetSuppressDeprecatedWarnings method, which signals suppression is turned off unless the CMake variables are set as required. Add tests and update the documentation for the new functionality.
* Explicitly enable author (dev) warnings by default.Michael Scott2015-12-011-1/+2
| | | | | | | | | Explicitly enable author warnings by default, via the cmake::GetSuppressDevWarnings method, which signals suppression is turned off unless the CMake variables are set as required. Add test cases for author and deprecated messages displayed by default.
* Make message suppression more consistent.Michael Scott2015-11-301-2/+10
| | | | | | | | | | | | | | | | Make the message suppression more consistent, by adding a check for the message related CMake variables in cmake::IssueMessage, which allows callers of IssueMessage other than the message command to behave as expected. Also added a check for CMAKE_SUPPRESS_DEVELOPER_WARNINGS in the message command to mirror the deprecated message type behaviour. Added a 'force' flag to the cmake::IssueMessage method, to make the message suppression consistent, when setting the message related CMake variables directly in a CMake file. Expand message command tests to cover the AUTHOR_WARNING message type as well.
* Revert topic 'cmake-W-options' (#15747)Brad King2015-09-221-13/+1
| | | | | | | | The changes in commit c96fe0b4 (cmake: Add -W options to control deprecation warnings and errors, 2015-07-28) fail to account for -Wdev warnings produced by places in CMake other than message(). This causes a regression in which -Wno-dev fails to suppress such warnings. Revert the feature until it can be revised accordingly.
* cmake: Do not treat developer warnings as errors by default in scriptsBrad King2015-08-031-1/+1
| | | | | | | | | | | | The logic in commit c96fe0b4 (cmake: Add -W options to control deprecation warnings and errors, 2015-07-28) accidentally enables errors on warnings by default in scripts because there is no initialization of CMAKE_SUPPRESS_DEVELOPER_ERRORS to TRUE. Rename internal CMAKE_SUPPRESS_DEVELOPER_ERRORS cache entry to CMAKE_ERROR_DEVELOPER_WARNINGS. Fix the logic in the message() command to treat AUTHOR_WARNING as an error only if the option is explicitly enabled.
* cmake: Add -W options to control deprecation warnings and errorsMichael Scott2015-07-291-1/+13
| | | | | | | | | | | Refactor the -Wdev and -Wno-dev to use a generic -W parser that follows the GCC pattern. Include support for setting CMAKE_ERROR_DEPRECATED and CMAKE_WARN_DEPRECATED via the deprecated warning. Add -Werror=dev and -Wno-error=dev options so that dev warning options are in line with deprecated warning options. Use a new CMAKE_SUPPRESS_DEVELOPER_ERRORS internal cache entry to store the above new dev options persistently. Add tests for new options and updated cmake documentation and release notes to list new options.
* cmAlgorithms: Rename cmRange to cmMakeRange.Stephen Kelly2015-07-221-1/+1
|
* Use cmJoin to accumulate string ranges.Stephen Kelly2015-02-111-5/+1
| | | | | | | | Avoid using the std::accumulate algorithm which is designed for numeric types, not complex types. It introduces unneccessary copies. Initialize variables where they are populated.
* Remove some c_str() calls.Stephen Kelly2014-03-111-1/+1
| | | | | | 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.
* message: Add a DEPRECATION modeStephen Kelly2013-10-081-0/+17
| | | | | | By default, the message is not issued. If CMAKE_ERROR_DEPRECATED is on, the message is fatal. If CMAKE_WARN_DEPRECATED is on, the message is a warning.
* Convert CMake to OSI-approved BSD LicenseBrad King2009-09-281-14/+9
| | | | | | | This converts the CMake license to a pure 3-clause OSI-approved BSD License. We drop the previous license clause requiring modified versions to be plainly marked. We also update the CMake copyright to cover the full development time range.
* BUG: Fix message(SEND_ERROR) to continueBrad King2009-03-061-1/+12
| | | | | | | During testing of the new message() signatures I mistakenly concluded that SEND_ERROR stops processing. The corresponding commit enforced this wrong behavior. This restores the correct behavior and fixes the documentation accordingly.
* ENH: Teach message() how to display warningsBrad King2009-03-061-24/+18
| | | | | This adds message(WARNING) and message(AUTHOR_WARNING) command modes and fully documents the command behavior in all modes.
* ENH: Make message(SEND_ERROR) report context.Brad King2008-04-141-1/+1
|
* ENH: add return and break support to cmake, also change basic command ↵Ken Martin2008-01-231-1/+2
| | | | invocation signature to be able to return extra informaiton via the cmExecutionStatus class
* ENH: produce a lot more output when running with --debug-outputAlexander Neundorf2007-07-171-13/+1
| | | | | | -try to fix build error on HPUX Alex
* ENH: do not print a call stack if the user does a message error unless ↵Bill Hoffman2006-10-061-3/+14
| | | | --debug-output is used
* ENH: Use CMake's error reporting mechanismAndy Cedilnik2006-06-221-11/+12
|