summaryrefslogtreecommitdiffstats
path: root/Source/cmake.h
Commit message (Collapse)AuthorAgeFilesLines
* Features: Add infrastructure for C++ 17 language standardBrad King2016-12-021-0/+1
| | | | Issue: #16468
* Fix several include-what-you-use findingsDaniel Pfeifer2016-11-081-5/+7
|
* Features: Add meta-features requesting awareness of a particular standardBrad King2016-11-021-0/+6
| | | | | | | | | | A common use case of `target_compile_features` is simply to specify that the compiler should be run in a mode that is aware of e.g. C++11. Some projects simply specify a particular C++11-only feature to request this. Provide a first-class way to do this by naming features after the corresponding language standard. Record them as always available in the corresponding standard level so that requesting them always ensures that standard (or higher) is used.
* cmState: Split auxiliary classes into separate filesStephen Kelly2016-10-191-1/+1
| | | | | | | 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.
* cmState: Port dependent code to new cmStateSnapshot nameStephen Kelly2016-10-191-6/+3
|
* cmState: Move CacheEntryType enum to separate namespaceStephen Kelly2016-10-191-1/+1
| | | | Port dependent code to the change.
* cmake: Factor out default generator selection into helperBrad King2016-10-111-0/+2
|
* Simplify CMake per-source license noticesBrad King2016-09-271-12/+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.
* cmake-server: Report server mode availablitily in CapabilitiesTobias Hunger2016-09-191-2/+2
| | | | | Report the availability of the server-mode in the output of cmake -E capabilities.
* cmake: Make FindCacheFile a static methodBrad King2016-09-141-1/+1
| | | | It does not need access to member data.
* cmake: Factor out method to find the CMakeCache.txt fileTobias Hunger2016-09-121-0/+3
|
* cmake: Introduce ReportCapabilitiesJsonTobias Hunger2016-09-121-0/+7
| | | | | | | Introduce cmake::ReportCapabilitiesJson which returns a the Json object that is serialized in cmake::ReportCapabilities. This allows to re-use the information in cmake-server.
* fix a load of include-what-you-use violationsDaniel Pfeifer2016-09-031-11/+9
|
* make sure to include cmConfigure.h before cmStandardIncludes.hDaniel Pfeifer2016-09-031-0/+2
|
* cmMessenger: Extract from cmake classStephen Kelly2016-08-251-3/+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.
* cmake: Add `cmake -E capabilities` modeTobias Hunger2016-08-161-0/+2
| | | | | | | Add `cmake -E capabilities` to report on generators, cmake version and possibly other static capabilities of cmake. Closes: #15462
* cmake: Constify cmake::GetRegisteredGeneratorsBrad King2016-08-161-1/+1
|
* Report more information about extra generators in generator factoriesTobias Hunger2016-08-031-0/+2
|
* Refactor extra generator registration to use factoriesTobias Hunger2016-08-031-8/+5
| | | | | | | | | | | This will allow additional information about the availability and capabilities of extra generators to be queried without actually creating them. Instead of a static NewFactory() method like the main generator factories have, use a static GetFactory() method to get a pointer to a statically allocated extra generator factory. This simplifies memory management.
* CMake: Report whether generators support platformsTobias Hunger2016-07-141-0/+1
|
* use CM_NULLPTRDaniel Pfeifer2016-06-281-1/+2
|
* cmake: Add an option to control what files needs to be tracedAlex Turbov2016-06-171-0/+10
| | | | | | | | | | Even in relatively small projects using `--trace` (and `--trace-expand`) may produce a lot of output. When developing a custom module usually one is interested in output of only a few particular modules. Add a `--trace-source=<file>` option to enable tracing only a subset of source files. The final output would be only from requested modules, ignoring anything else not matched to given filename(s).
* Merge topic 'expose-cache-properties'Brad King2016-06-131-4/+0
|\ | | | | | | | | | | | | | | 63c0e92c cmState: Expose list of properties of values in the cache 6eee2463 cmCacheEntry: Retrieve all properties of cache entries 120899c6 cmPropertyList: Add a way to retrieve all properties 7066218e cmake: Kill cmake::CacheManager and its getter
| * cmake: Kill cmake::CacheManager and its getterTobias Hunger2016-06-101-4/+0
| | | | | | | | | | This member variable is never initialized and has apparently moved to cmState.
* | Merge topic 'fix-cmake-ISP-violation'Brad King2016-06-131-2/+4
|\ \ | | | | | | | | | | | | | | | 23f87e81 cmake: Remove force from IssueMessage API 54c65d5f cmake: Extract DisplayMessage API.
| * | cmake: Remove force from IssueMessage APIStephen Kelly2016-06-121-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Extract DisplayMessage API.Stephen Kelly2016-06-121-0/+3
| |/
* | cmake: Issue message independent of cmMakefile definitionStephen Kelly2016-06-121-4/+4
|/ | | | | | | | | | | | | | | | | 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.
* cmake: remove unnused member VerboseDaniel Pfeifer2016-06-081-1/+0
|
* cmake: Fix constness of methodsStephen Kelly2016-06-081-7/+7
|
* cmake: Make internal method file staticStephen Kelly2016-06-081-2/+0
|
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-157/+186
| | | | | | | | | | | | | 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.
* Format include directive blocks and ordering with clang-formatBrad King2016-04-291-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sort include directives within each block (separated by a blank line) in lexicographic order (except to prioritize `sys/types.h` first). First run `clang-format` with the config file: --- SortIncludes: false ... Commit the result temporarily. Then run `clang-format` again with: --- SortIncludes: true IncludeCategories: - Regex: 'sys/types.h' Priority: -1 ... Commit the result temporarily. Start a new branch and cherry-pick the second commit. Manually resolve conflicts to preserve indentation of re-ordered includes. This cleans up the include ordering without changing any other style. Use the following command to run `clang-format`: $ git ls-files -z -- \ '*.c' '*.cc' '*.cpp' '*.cxx' '*.h' '*.hh' '*.hpp' '*.hxx' | egrep -z -v '(Lexer|Parser|ParserHelper)\.' | egrep -z -v '^Source/cm_sha2' | egrep -z -v '^Source/(kwsys|CursesDialog/form)/' | egrep -z -v '^Utilities/(KW|cm).*/' | egrep -z -v '^Tests/Module/GenerateExportHeader' | egrep -z -v '^Tests/RunCMake/CommandLine/cmake_depends/test_UTF-16LE.h' | xargs -0 clang-format -i This selects source files that do not come from a third-party. Inspired-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
* Source: Stabilize include orderBrad King2016-04-291-0/+2
| | | | | Each source file has a logical first include file. Include it in an isolated block so that tools that sort includes do not move them.
* Remove unused cmake::IssueMessage overloadBrad King2016-04-181-3/+0
| | | | | | All callers now pass a full backtrace so we do not need the alternative that takes a cmListFileContext directly. Drop this overload to remove the code duplication.
* Add -Werror and -Wno-error command-line optionsMichael Scott2016-01-121-3/+39
| | | | | | | | | 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.
* cmake: Deduplicate warning message control codeMichael Scott2015-12-101-7/+7
| | | | | | Remove the duplicate code in cmake::Configure to set the cache variables for the warning message suppression. Replace it with calls to the dedicated methods to carry this out.
* cmake-gui: Add options to control warning messagesMichael Scott2015-12-101-0/+7
| | | | | | | | | Create a new dialog window for the cmake-gui that provides controls for setting the state of suppression of developer and deprecated warning messages. This replaces the previous single checkbox for setting the state of suppression of developer warnings. Added a note for the new functionality to the release notes.
* Explicitly enable deprecated warnings by default.Michael Scott2015-12-011-0/+7
| | | | | | | | | | 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.
* Add -W options to control deprecated warning messages.Michael Scott2015-12-011-1/+3
| | | | | | | | Add 'deprecated' warning options type, to allow setting CMAKE_WARN_DEPRECATED via the -W '-Wdeprecated' and '-Wno-deprecated' options. Add tests for new options and updated documentation.
* Refactor the -W options parser to be generic.Michael Scott2015-12-011-7/+7
| | | | | | Refactor the -Wdev and -Wno-dev options parser to use a generic -W parser that follows the GCC pattern, excluding support for -Werror=TYPE and -Wno-error=TYPE formats for now.
* Explicitly enable author (dev) warnings by default.Michael Scott2015-12-011-0/+6
| | | | | | | | | 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.
* cmake-gui: Add option to specify generator toolsetRobert Dailey2015-11-171-1/+8
| | | | | | | | | | The -T parameter to CMake may now be specified through cmake-gui via a new text field in the first-time configure wizard (below the generator chooser). The generator factories specify whether or not they support toolsets. This information is propagated to the Qt code and used to determine if the selected generator should also display the optional Toolset widgets.
* cmake: Store hardcoded lists of sources and headersStephen Kelly2015-10-271-0/+7
| | | | Don't duplicate this in each cmMakefile.
* Merge topic 'revert-cmake-W-options'Brad King2015-09-251-18/+9
|\ | | | | | | | | | | 2e606306 Merge branch 'improve-variable-help-formatting' into revert-cmake-W-options 81739e92 Revert topic 'cmake-W-options' (#15747)
| * Revert topic 'cmake-W-options' (#15747)Brad King2015-09-221-18/+9
| | | | | | | | | | | | | | | | 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: Remove unused cmPolicies member.Stephen Kelly2015-08-231-2/+0
|/ | | | | | heaptrack showed a 1 byte allocation with the backtrace pointing here, as is the case since commit v3.3.0-rc1~112^2~5 (cmPolicies: Remove unused cmPolicy class., 2015-05-03)
* cmake: Add -W options to control deprecation warnings and errorsMichael Scott2015-07-291-9/+18
| | | | | | | | | | | 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.
* cmake: add --trace-expand optionBen Boeckel2015-07-231-0/+3
| | | | | | | | The --trace option is helpful, but sometimes, what you're looking for is deep under many layers of function calls and figuring out what instance of the function call you're looking at is tedious to determine (usually involving patching and message()). Instead, add a --trace-expand option to trace while expanding commands into what CMake actually sees.