Commit Graph

16 Commits

Author SHA1 Message Date
Kitware Robot bdca8b01d2 Modernize: Use #pragma once in all header files
#pragma once is a widely supported compiler pragma, even though it is
not part of the C++ standard. Many of the issues keeping #pragma once
from being standardized (distributed filesystems, build farms, hard
links, etc.) do not apply to CMake - it is easy to build CMake on a
single machine. CMake also does not install any header files which can
be consumed by other projects (though cmCPluginAPI.h has been
deliberately omitted from this conversion in case anyone is still using
it.) Finally, #pragma once has been required to build CMake since at
least August 2017 (7f29bbe6 enabled server mode unconditionally, which
had been using #pragma once since September 2016 (b13d3e0d)). The fact
that we now require C++11 filters out old compilers, and it is unlikely
that there is a compiler which supports C++11 but does not support
#pragma once.
2020-09-03 09:30:21 -04:00
Justin Goshi 8a7ad923a8 VS: Extract instance version from VS Installer 2020-06-03 08:58:29 -04:00
Marc Chevrier 2faa3f6c55 Refactoring: Third-parties public headers are under cm3p prefix
Fixes: #20666
2020-05-07 12:06:08 +02:00
Kitware Robot ed98209ddc Revise include order using clang-format-6.0
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.
2019-10-01 12:26:36 -04:00
Brad King b1cfaf7b91 cmVSSetupHelper: Remove unused SmartBSTR copy operations
For our use case we do not actually need to copy these.
Mark the operations as `= delete` to simplify the code.
2019-08-26 09:43:45 -04:00
Brad King 3f4c4e7afe cmVSSetupHelper: Fix SmartBSTR copy operations
Fix the SmartBSTR copy constructor and copy assignment operator added by
commit 18c8278b62 (VS: Add helper class to interact with Visual Studio
Installer, 2016-12-14, v3.8.0-rc1~93^2~4) to use the string from the
source of the copy.

Issue: #19610
2019-08-26 09:43:45 -04:00
Regina Pfeifer 094f01d0f0 cleanup: Prefer compiler provided special member functions 2019-01-25 06:45:00 -05:00
Brad King d8ed309d05 VS: Parameterize cmVSSetupAPIHelper instances with VS version 2019-01-11 10:37:38 -05:00
Jon Doron 071c0e3ce4 cmVSSetupHelper: Support Enterprise WDK build enviornment
Enterprise WDK is a command line build enviornment that does not require
any installation prior to use.

More information and download can be found here:
https://docs.microsoft.com/en-us/windows-hardware/drivers/develop/using-the-enterprise-wdk

Signed-off-by: Jon Doron <arilou@gmail.com>
2018-11-27 07:13:26 +02:00
Basil Fierz b759f7068f cmVSSetupHelper: Expose default toolset version
We already detect the VS toolset version.  Expose it to clients.
2018-06-22 10:07:09 -04:00
Brad King d548994afc cmVSSetupHelper: Use in-class member initialization 2018-06-22 10:07:09 -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
Brad King 17edfa4198 cmVSSetupHelper: Add option to specify an instance 2017-10-19 10:20:12 -04:00
Brad King f566586e1c VS: Detect compiler component in VS 2017 instances more reliably
The `Microsoft.VisualStudio.Component.VC.Tools.x86.x64` component is
not the only way a VS instance may provide the `cl` compiler tool.
For example, VS 2017 Express Edition does not install that component.
Instead search for the tools directly on disk within an instance.

Suggested-by: Rich Chiodo <rchiodo@microsoft.com>
Fixes: #17349
2017-10-16 11:57:15 -04:00
Brad King 4c3116d754 cmVSSetupHelper: Factor out install location string construction
This also adds a missing conversion to unix slashes in one code path.
2017-10-16 11:55:53 -04:00
Iyyappa Murugandi 18c8278b62 VS: Add helper class to interact with Visual Studio Installer
VS 2017 exports a COM component which can be queried to find if VS 2017
is installed and also other components such as VC toolset and Windows
SDKs.  Add a helper class to interact with this interface.
2016-12-16 09:58:43 -05:00