Commit Graph

968 Commits

Author SHA1 Message Date
Brad King
57e48f16f2 VS: Add Visual Studio 16 2019 generator
Add this generator *without* support for specifying the target
architecture in the generator name.  cmake-gui will be taught
to provide a field for this, and command-line builds can use -A.

Also, teach this generator to select a default target architecture
based on the host architecture.

Fixes: #18689
Inspired-by: Egor Pugin <egor.pugin@gmail.com>
2019-01-11 11:04:51 -05:00
Brad King
68d316e0cf VS: Rename VS 2017 generator sources to be version-independent
Rename `cmGlobalVisualStudio{15 => Versioned}Generator`.  Rename
`Factory` to `Factory15` since that part still needs to be
version-specific.
2019-01-11 10:37:39 -05:00
Brad King
d8ed309d05 VS: Parameterize cmVSSetupAPIHelper instances with VS version 2019-01-11 10:37:38 -05:00
Paul Seyfert
6d53a60f00 cmake: distinguish '-Cpath' from '-C path' in source dir parsing
This results in the correct source directory being picked up in calls
with

    cmake sourcedir -C settings

and in a more appropriate error message when calling

    mkdir build ; cd build ; cmake -C settings

Also fix `-D` and `-U` in the same way.
2019-01-10 21:19:24 +11:00
Brad King
5395c526fc cmake: Drop unused table entry for selecting default generator
In `cmake::CreateDefaultGlobalGenerator` the table of registry entries
does not need an entry for VS 2017 because that is found via the VS
setup helper.
2019-01-09 11:31:55 -05:00
Craig Scott
124a8632cb Merge topic 'messenger-no-cmstate-v2'
8a803d784b cmMessenger: Decouple from cmState

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2653
2019-01-02 15:31:39 -05:00
Bruno Manganelli
8a803d784b cmMessenger: Decouple from cmState 2019-01-01 11:55:08 +11:00
Brad King
eb2ec41a04 fileapi: Add protocol v1 infrastructure with support for shared query files
Add a file-based API that clients may use to get semantic information
about the buildsystem that CMake generates.  Clients will write query
files under a designated location in the build tree, and CMake will
write reply files for clients to read.

Start with support for shared stateless query files.  These allow
clients to share requests for major object versions and get all those
recognized by CMake.  Once any client has written a shared request to a
build tree it will persist.  Other clients will not need to overwrite
the request (since it is stateless) and should not remove it either.

For now we add only an undocumented object kind to use for testing the
query and reply infrastructure.  Object kinds providing real semantic
information will be added later.

Issue: #18398
2018-12-12 06:39:30 -05:00
Regina Pfeifer
5731ec30f0 clang-tidy: fix warnings from version 7
Fix some warnings that are new since clang-tidy version 4, and update
`.clang-tidy` to suppress the rest.
2018-11-20 10:36:08 -05:00
Cengizhan Pasaoglu
c67ab22cdc Using front() and back() instead of calculations 2018-11-06 21:43:33 +03:00
Brad King
bcd61da350 Merge topic 'graphviz-fix-alias'
50c4dec072 graphviz: dereference ALIAS targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2521
2018-10-29 09:56:25 -04:00
Nick Schultz
50c4dec072 graphviz: dereference ALIAS targets
Previous behavior treats ALIAS targets as external targets.
This fix de-aliases these targets to their pointed target.

Fixes: #15636
2018-10-26 11:17:49 -04:00
Paul Seyfert
5873815fef cmake: distinguish '-Cpath' from '-C path' in source dir parsing
This results in the correct source directory being picked up in calls
with

    cmake sourcedir -C settings

and in a more appropriate error message when calling

    mkdir build ; cd build ; cmake -C settings

Also fix `-D` and `-U` in the same way.
2018-10-26 09:50:00 -04:00
Brad King
d8294fefe8 cmake: Fix generator platform under --build mode 2018-09-25 13:27:08 -04:00
Brad King
fc43492e44 cmake: Factor json version object construction into helper 2018-09-21 11:36:11 -04:00
Brad King
ec9ef691fe Merge topic 'provide_explicit_source_and_build_command_line_options'
638f00117a Add release note for the -S and -B options.
de962cc00d CMake: Internally uses -S instead of -H to specify source directory
a10d63d578 cmake: -S and -B can be used to specify source and build directories

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2358
2018-09-19 10:38:19 -04:00
Robert Maynard
a10d63d578 cmake: -S and -B can be used to specify source and build directories
Document the previously internal option of '-B' and provide a
matching source directory option with '-S'. Both '-B', and '-S'
can be used independently of each other.
2018-09-15 11:25:47 -04:00
Vitaly Stakhovsky
13d10ee616 cmState::GetInitializedCacheValue: Return as const std::string* 2018-09-10 09:31:48 -04:00
Brad King
fb73edf70c cmake: Drop unnecessary working mode checks
In `cmake::Run` we return before `Configure` or `Generate` when
not working in normal mode so they do not need mode checks.

While at it, remove a long-outdated comment about when to save the
cache.
2018-08-29 09:38:32 -04:00
Vitaly Stakhovsky
69ca85cc7f Remove unnecessary c_str() in RegularExpression::find calls 2018-08-07 15:28:24 -04:00
Kitware Robot
d7204e649e Revise C++ coding style using clang-format-6.0
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.
2018-06-01 09:53:42 -04:00
Florian Maushart
1ab3881ec9 cmake: Add options for parallel builds to --build mode
While we already support `cmake --build . -- -j`, the options after `--`
are specific to the native build tool.  Add new options `--parallel
[<N>]` and `-j [<N>]` to abstract this and map to the proper option
for the native build tool.
2018-05-25 09:42:20 -04:00
Brad King
d308e9442e Merge topic 'glob_configure_depends'
6c4f8b4596 Adjust help documentation for file(GLOB), add topic notes
20612978c8 Add tests for `file(GLOB)` CONFIGURE_DEPENDS flag
3f4b81f540 Add glob verify support to XCode, VS, Ninja, and Makefile generators
ca0befc2e1 Add `CONFIGURE_DEPENDS` flag support to cmFileCommand::HandleGlobCommand
599c93e22d Add cmGlobVerificationManager class, integrate with cmake and cmState

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1767
2018-04-06 10:25:08 -04:00
Brad King
eb80af9093 Drop Visual Studio 8 2005 generator
This generator has been deprecated since CMake 3.9.  Remove it.
2018-04-02 10:08:10 -04:00
Shane Parris
3f4b81f540 Add glob verify support to XCode, VS, Ninja, and Makefile generators 2018-04-01 23:16:12 -04:00
Shane Parris
599c93e22d Add cmGlobVerificationManager class, integrate with cmake and cmState 2018-03-29 10:58:03 -04:00
Craig Scott
e60e4dfc88 cmWorkingDirectory: Check success of current dir changes 2018-03-08 20:07:14 +11:00
Brad King
83f8e76467 cmake: Fix global generator path style in --build mode
Fix the `--build` code path so that `cmSystemTools::SetForceUnixPaths`
is called with the global generator's path style.  This makes forwarding
of `--target subdir/src.c.obj` match the slash style the generator
placed in the build system.

Fixes: #17742
2018-02-21 10:13:47 -05:00
Pavel Solodovnikov
653b894683 Reduce raw string pointers usage.
* Change some functions to take `std::string` instead of
  `const char*` in the following classes: `cmMakeFile`, `cmake`,
  `cmCoreTryCompile`, `cmSystemTools`,  `cmState`, `cmLocalGenerator`
  and a few others.
* Greatly reduce using of `const char*` overloads for
  `cmSystemTools::MakeDirectory` and `cmSystemTools::RelativePath`.
* Remove many redundant `c_str()` conversions throughout the code.
2018-01-31 18:23:03 +03:00
Brad King
92cd3d0677 Merge topic 'reduce-temporaries'
c85bb007 Reduce allocation of temporary values on heap.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1698
2018-01-29 08:05:27 -05:00
Brad King
f343106b19 Merge topic 'ctest-chrono'
e6a80ccf Make use of std::chrono throughout every component
ff62b005 CTest: add safe conversion from cmDuration to integer types
695951bc CTest: introduce cmDuration

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1592
2018-01-26 08:27:37 -05:00
Pavel Solodovnikov
c85bb007df Reduce allocation of temporary values on heap.
- Use `std::move` while inserting temporary results into vectors.
- Change `push_back` to `emplace_back` where appropriate.
2018-01-26 13:24:45 +03:00
Alex Neundorf
551bd0b3e8 Generators: adjust error message for the removed KDevelop3 generator
If the user request a KDevelop3 project, tell the user that
KDevelop3 is not supported anymore, so he sees it's not just
a typo.

Alex
2018-01-24 08:30:02 -05:00
Alex Neundorf
9198e6a27b Generators: remove KDevelop3 generator
The last KDevelop3 release was many years ago, in 2008 I think.
I haven't seen or read about anybody using KDevelop 3 since a
long time, so I think it can safely be removed from CMake.
KDevelop 4 (first released in 2010) has its own proper CMake
support now, independent from this generator.

Alex
2018-01-24 08:30:02 -05:00
Wouter Klouwen
e6a80ccfc4 Make use of std::chrono throughout every component
This commit continues the changes made in CTest to support std::chrono
by
applying it throughout every component where a duration was used.

No functional change intended.
2018-01-23 18:56:42 +00:00
Brad King
e68a269cd2 Merge topic 'cache-truncate-newlines'
c42b377c cmCacheManager: Test and document newline truncation behavior
a9c48307 cmCacheManager: Truncate values containing newlines

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1652
2018-01-19 10:08:06 -05:00
Kyle Edwards
a9c483071e cmCacheManager: Truncate values containing newlines
Fixes #16098.
2018-01-15 09:27:44 -05:00
Robert Maynard
81868e6bad CUDA: Add cu as default source file extension 2018-01-08 16:16:52 -05:00
Aaron Orenstein
4a6348dbbd Performance: Improve efficiency of source file lookup in cmMakefile
This reintroduces the change from commit v3.10.0-rc1~69^2 (Performance:
Improve efficiency of source file lookup in cmMakefile, 2017-08-17) with
some corrections.  The original was rolled back by commit
v3.10.0-rc1~52^2~1 (Revert "Performance: ...", 2017-09-25) due to
incompatibilities found.  The rollback was followed-up by addition of a
test for the offending case, and this revision passes the test.
2017-11-17 10:25:41 -05:00
Brad King
6a8c765c8f Merge topic 'cm-array-begins-size'
57132765 Replace cmArray{Begin,End,Size} by their standard counterparts

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1352
2017-10-26 08:57:04 -04:00
Matthias Maennich
57132765e0 Replace cmArray{Begin,End,Size} by their standard counterparts
std::{begin,end} are part of C++11, std::{cbegin,cend} are part of C++14
and an standard compliant implementation has been introduced within the
'cm' namespace: cm::{cbegin,cend}.

std::size is only part of C++17, hence exposing a compliant implementation
within namespace cm (cm::size).

where possible, the standard implementations are reused.
2017-10-23 17:51:35 +02:00
Brad King
314613d1af Add infrastructure for generators to select a build tool instance
Add cache entry `CMAKE_GENERATOR_INSTANCE` to hold the instance location
persistently across re-runs of CMake in a given build tree.

For now we reject the option by default if explicitly set.  It will be
implemented on a per-generator basis.  Pass the setting into try_compile
project generation.  Add a RunCMake.GeneratorInstance test to cover
basic use cases for the option.  Verify that `CMAKE_GENERATOR_INSTANCE`
is empty by default, and that it is rejected when the generator does not
support a user setting.

Issue: #17268
2017-10-19 10:20:08 -04:00
Gregor Jasny
5de37a4a64 cmake: Add --open option for IDE generators 2017-10-13 21:28:34 +02:00
Brad King
298493769f try_compile: Simplify generator platform and toolset propagation
We don't need to save the `CMAKE_GENERATOR_{PLATFORM,TOOLSET}` values
from the cache back into the `cmake` instance.  They were used only to
propagate the settings into `cmake` instances for `try_compile`, but we
already have their values in the `cmMakefile`'s variables anyway.  In
fact those variables are the ones we actually give to the generators.
2017-09-27 07:40:25 -04:00
Matthias Maennich
f0489856e3 Retire std::auto_ptr and its macro CM_AUTO_PTR
Signed-off-by: Matthias Maennich <matthias@maennich.net>
2017-09-26 00:07:19 +02:00
Pavel Solodovnikov
5db3aac111 Meta: replace empty-string assignments with clear(). 2017-09-16 02:26:49 +03:00
Pavel Solodovnikov
7d5095796a Meta: modernize old-fashioned loops to range-based for.
Changes done via `clang-tidy` with some manual fine-tuning
for the variable naming and `auto` type deduction
where appropriate.
2017-09-12 16:22:47 +03:00
Daniel Pfeifer
5962db4389 Use C++11 nullptr 2017-08-24 23:39:47 +02:00
Daniel Pfeifer
cbcfb79f9c Use C++11 unordered containers 2017-08-22 23:05:27 +02:00
Pavel Solodovnikov
86dc86dd6c Add const-reference qualifications 2017-05-26 19:50:11 +03:00
Daniel Pfeifer
c2c2bbb3d4 cmake: register fake project commands in -P mode 2017-05-08 22:58:01 +02:00
Daniel Pfeifer
c36d63cd48 cmake: initialize with Role that controls which commands to register 2017-05-08 22:29:44 +02:00
Brad King
c94f1bcf92 Drop Visual Studio 7 .NET 2003 generator
This generator has been deprecated since CMake 3.6.  Remove it.
2017-04-19 15:28:05 -04:00
Daniel Pfeifer
1d829c862c Use quotes for non-system includes
Automate with:

git grep -l '#include <cm_' -- Source \
  | xargs sed -i 's/#include <\(cm_.*\)>/#include "\1"/g'

git grep -l '#include <cmsys/' -- Source \
  | xargs sed -i 's/#include <\(cmsys\/.*\)>/#include "\1"/g'

git grep -l '#include <cm[A-Z]' -- Source \
  | xargs sed -i 's/#include <\(cm[A-Z].*\)>/#include "\1"/g'
2017-04-11 22:35:21 +02:00
Daniel Pfeifer
e9fc7ff505 Add self-sufficient wrapper for <sys/stat.h> 2017-03-24 22:58:25 +01:00
Ben Boeckel
aba92ffd92 cmWorkingDirectory: use the new class
These functions just need to change the directory for a block of code
and then go back to the caller's expected location. Use
cmWorkingDirectory to ensure that all return paths are handled.
2017-03-06 10:38:58 -05:00
Daniel Pfeifer
e0f3931226 cmCommands: add commands directly to cmState 2017-02-13 22:39:20 +01:00
Daniel Pfeifer
72dcbbe5c0 split Default commands into Scripting and Project 2017-02-13 22:32:55 +01:00
Iyyappa Murugandi
c93e85d87e VS: Use Visual Studio Installer to locate VS 2017
VS 2017 and later may no longer populate the Windows Registry entries
CMake has traditionally used to find the VS installations.  This is
because VS now supports having multiple installations of the same
version.  The Visual Studio Installer tool provides a COM interface we
can query to locate installations.
2016-12-16 09:58:43 -05:00
Brad King
31e013ae60 Merge branch 'vs15-rename-generator' into vs15-rename-generator-for-master 2016-11-29 10:51:35 -05:00
Roman Wüger
d639620e14 VS: Rename VS 15 generator to 'Visual Studio 15 2017'
The final name of this VS version was announced:

 https://blogs.msdn.microsoft.com/visualstudio/2016/11/16/visual-studio-2017-rc/

Add the year to the generator name accordingly.  For convenience, map
the name without the year to the name with the year.
2016-11-29 10:46:36 -05:00
Yves Frederix
427b6da9e5 VS: Teach cmake --build to reconfigure if needed before building
Visual Studio's build system does not cleanly handle itself being
re-generated during the build.  Teach `cmake --build` to check whether
the build system needs to be re-generated before launching the native
build tool.
2016-11-17 13:53:42 -05:00
Daniel Pfeifer
2e620f0b38 Fix several include-what-you-use findings 2016-11-08 09:42:04 -05:00
Brad King
b899c0a92f Merge topic 'separate-compilation'
569509f4 Fix newly discovered clang-tidy issues
6c9b3b5c cmCommand: implement functions in cxx file
8483dab8 bootstrap: Sort source files lexicographically
4fb70919 Create all commands from a single function
608afd4f Separate compilation for commands included in cmBootstrapCommands2
64f9c282 Separate compilation for commands included in cmBootstrapCommands1
f69e768d Separate compilation for commands included in cmCommands
2016-10-24 10:16:40 -04:00
Daniel Pfeifer
1a74e71906 Introduce CM_UNORDERED_MAP
Avoid duplicating switch among std::unordered_map, cmsys::hash_map, and
std::map.
2016-10-24 09:58:52 -04:00
Daniel Pfeifer
4fb70919a5 Create all commands from a single function 2016-10-21 18:14:51 +02:00
Stephen Kelly
cde6eb6249 cmState: Port dependent code to new cmStateSnapshot name 2016-10-19 15:40:59 +02:00
Stephen Kelly
2fe3e55d53 cmState: Move CacheEntryType enum to separate namespace
Port dependent code to the change.
2016-10-19 15:40:58 +02:00
Brad King
1b592b6458 Merge topic 'vs-default-generator'
5380948f cmake: Fix default VS generator selection for Microsoft Build Tools
1aee54ed cmake: Simplify default generator search by switching direction
24c86e1c cmake: Use array iteration for default generator VS variants
6db64ad4 cmake: Use array iteration for default generator list
d3df00ae cmake: Rename default generator selection list variable
10160f69 cmake: Rename default generator selection internal variable
0838d20e cmake: Simplify VS registry entry lookup
8f33de92 cmake: Factor out default generator selection into helper
2016-10-13 08:26:07 -04:00
Brad King
0123500309 Merge topic 'cmake-gui-fix-extra-generator-names'
bf86012a cmake-gui: Fix "extra" generator entries in drop-down list
2016-10-13 08:25:49 -04:00
Brad King
5380948fae cmake: Fix default VS generator selection for Microsoft Build Tools
Some versions of the VS tools do not install the registry entry

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\$v;InstallDir

but all appear to set

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\$v\Setup\VC;ProductDir

Update our search to consider both entries.

Closes: #16360
2016-10-11 13:39:58 -04:00
Brad King
1aee54ed87 cmake: Simplify default generator search by switching direction
Search from newest to oldest and stop once found.
2016-10-11 13:32:33 -04:00
Brad King
24c86e1c3f cmake: Use array iteration for default generator VS variants 2016-10-11 13:19:01 -04:00
Brad King
6db64ad432 cmake: Use array iteration for default generator list 2016-10-11 13:17:48 -04:00
Brad King
d3df00ae53 cmake: Rename default generator selection list variable 2016-10-11 13:16:24 -04:00
Brad King
10160f691c cmake: Rename default generator selection internal variable 2016-10-11 11:50:56 -04:00
Brad King
0838d20e50 cmake: Simplify VS registry entry lookup 2016-10-11 11:46:45 -04:00
Brad King
8f33de92ba cmake: Factor out default generator selection into helper 2016-10-11 11:30:46 -04:00
Brad King
bf86012ada cmake-gui: Fix "extra" generator entries in drop-down list
Refactoring in commit v3.7.0-rc1~291^2~1 (Refactor extra generator
registration to use factories, 2016-07-20) accidentally switched
the order of the "extra - base" generator names to "base - extra".
Switch it back.  While this could affect all callers of the
`GetRegisteredGenerators` method, only cmake-gui actually used this
particular field.

Closes: #16359
2016-10-11 08:39:44 -04:00
Stephen Kelly
f03d446e96 cmLinkLineComputer: Move FrameworkPath computation from cmLocalGenerator
Add UseWatcomQuote state, and remove corresponding method parameters.
2016-10-10 20:38:59 +02:00
Stephen Kelly
0c97806325 cmLinkLineComputer: Move ComputeLinkLibs from cmLocalGenerator
Add a cmOutputConverter to the cmLinkLineComputer and factory methods to
facilitate shell escapes.

Add state to the cmLinkLineComputer to record whether outputting for
response files or for watcom, to satisfy the cmOutputConverter API.
These are constant for the lifetime of the cmLinkLineComputer, even when
its functionality is extended in the future.  This also keeps the
signatures of cmLinkLineComputer relatively simple.

Pass the cmComputeLinkInformation as a method parameter so that
cmLinkLineComputer is free from target-specific state.  An instance
should be usable for all targets in a directory.
2016-10-10 20:38:58 +02:00
Stephen Kelly
5b361fdda0 cmLinkLineComputer: Extract from cmLocalGenerator
CMake has several classes which have too many responsibilities.
cmLocalGenerator is one of them.  Start to extract the link line
computation.  Create generator-specific implementations of the interface
to account for generator-specific behavior.

Unfortunately MSVC60 has different behavior to everything else and CMake
still generates makefiles for it.  Isolate it with MSVC60-specific
names.
2016-10-10 20:38:53 +02:00
Stephen Kelly
6c8dc7f1df cmake: Simplify find-package mode library addition
It does not need the cmMakefile version.
2016-10-07 20:23:19 +02:00
Brad King
86578eccf2 Simplify CMake per-source license notices
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.
2016-09-27 15:14:44 -04:00
Tobias Hunger
cd049f012e cmake-server: Report server mode availablitily in Capabilities
Report the availability of the server-mode in the output of
cmake -E capabilities.
2016-09-19 08:57:28 -04:00
Brad King
a098ca0d7a cmake: Fix --find-package mode link line output
Refactoring in commit v2.8.10~58^2~2 (Ninja: move -LIBPATH behind -link
option, 2012-09-26) added arguments to cmLocalGenerator::GetTargetFlags
and updated the call sites.  However, in the cmake::FindPackage and
cmLocalGenerator::AddBuildTargetRule call sites it added the new
arguments in the wrong order.  The latter was never used and has been
removed.  The former remains buggy and prints out compiler flags instead
of the link framework/library search paths.  Fix its argument order.
2016-09-16 10:03:15 -04:00
Brad King
cc770e7670 cmake: Make FindCacheFile a static method
It does not need access to member data.
2016-09-14 11:49:24 -04:00
Tobias Hunger
3e58b9af57 cmake: Factor out method to find the CMakeCache.txt file 2016-09-12 22:00:22 +02:00
Tobias Hunger
c73967cb4a cmake: Introduce ReportCapabilitiesJson
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.
2016-09-12 17:24:06 +02:00
Brad King
bdc679a8ae VS15: Add Visual Studio 15 generator
Call the generator "Visual Studio 15" without any year because the
preview version of VS 15 does not provide a year in the product name.

Copy cmGlobalVisualStudio14Generator to cmGlobalVisualStudio15Generator
and update version numbers accordingly.  Add the VS15 enumeration value.
Note that we do not need to add a MSVC15 variable or v150 toolset
because Visual Studio 15 comes with an updated version of the v140
toolset and remains ABI-compatible.

Teach tests VSExternalInclude, RunCMake.GeneratorPlatform, and
RunCMake.GeneratorToolset to treat VS 15 as they do VS 10-14.

Closes: #16143
2016-09-07 15:49:08 -04:00
Daniel Pfeifer
efed6468ed fix a load of include-what-you-use violations 2016-09-03 08:04:56 -04:00
Stephen Kelly
421012a330 cmMessenger: Extract from cmake class
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.
2016-08-25 09:47:27 -04:00
Daniel Pfeifer
7b6349da4d CMake: don't use else after return 2016-08-18 20:36:29 +02:00
Brad King
67a7dcef45 Merge topic 'readability-named-parameter'
e7b842e1 Make sure unnused parameters are /*named*/
2016-08-17 10:46:35 -04:00
Daniel Pfeifer
e7b842e189 Make sure unnused parameters are /*named*/ 2016-08-17 01:49:57 +02:00
Tobias Hunger
49ad7f9af8 cmake: Add cmake -E capabilities mode
Add `cmake -E capabilities` to report on generators, cmake version and
possibly other static capabilities of cmake.

Closes: #15462
2016-08-16 13:45:05 -04:00
Brad King
1d408dc10f cmake: Constify cmake::GetRegisteredGenerators 2016-08-16 13:40:06 -04:00
Tobias Hunger
cd52a225d2 Report more information about extra generators in generator factories 2016-08-03 09:44:40 -04:00
Tobias Hunger
a354f60ce0 Refactor extra generator registration to use factories
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.
2016-08-03 09:43:00 -04:00
Dāvis Mosāns
b1f87a50b3 Use better KWSys SystemTools::GetEnv and HasEnv signatures 2016-07-18 09:51:01 -04:00