summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
Commit message (Collapse)AuthorAgeFilesLines
* VS: Use Visual Studio Installer to locate VS 2017Iyyappa Murugandi2016-12-161-12/+18
| | | | | | | | 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.
* Merge branch 'vs15-rename-generator' into vs15-rename-generator-for-masterBrad King2016-11-291-1/+1
|\
| * VS: Rename VS 15 generator to 'Visual Studio 15 2017'Roman Wüger2016-11-291-1/+1
| | | | | | | | | | | | | | | | | | 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.
* | VS: Teach `cmake --build` to reconfigure if needed before buildingYves Frederix2016-11-171-10/+54
| | | | | | | | | | | | | | 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.
* | Fix several include-what-you-use findingsDaniel Pfeifer2016-11-081-2/+3
| |
* | Merge topic 'separate-compilation'Brad King2016-10-241-5/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | Create all commands from a single functionDaniel Pfeifer2016-10-211-5/+2
| | |
* | | Introduce CM_UNORDERED_MAPDaniel Pfeifer2016-10-241-5/+2
|/ / | | | | | | | | Avoid duplicating switch among std::unordered_map, cmsys::hash_map, and std::map.
* | cmState: Port dependent code to new cmStateSnapshot nameStephen Kelly2016-10-191-2/+2
| |
* | cmState: Move CacheEntryType enum to separate namespaceStephen Kelly2016-10-191-25/+27
| | | | | | | | Port dependent code to the change.
* | Merge topic 'vs-default-generator'Brad King2016-10-131-48/+58
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | cmake: Fix default VS generator selection for Microsoft Build ToolsBrad King2016-10-111-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | cmake: Simplify default generator search by switching directionBrad King2016-10-111-12/+10
| | | | | | | | | | | | Search from newest to oldest and stop once found.
| * | cmake: Use array iteration for default generator VS variantsBrad King2016-10-111-6/+7
| | |
| * | cmake: Use array iteration for default generator listBrad King2016-10-111-5/+5
| | |
| * | cmake: Rename default generator selection list variableBrad King2016-10-111-5/+5
| | |
| * | cmake: Rename default generator selection internal variableBrad King2016-10-111-4/+3
| | |
| * | cmake: Simplify VS registry entry lookupBrad King2016-10-111-4/+6
| | |
| * | cmake: Factor out default generator selection into helperBrad King2016-10-111-48/+52
| | |
* | | Merge topic 'cmake-gui-fix-extra-generator-names'Brad King2016-10-131-1/+1
|\ \ \ | |/ / |/| / | |/ | | bf86012a cmake-gui: Fix "extra" generator entries in drop-down list
| * cmake-gui: Fix "extra" generator entries in drop-down listBrad King2016-10-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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
* | cmLinkLineComputer: Move FrameworkPath computation from cmLocalGeneratorStephen Kelly2016-10-101-1/+1
| | | | | | | | Add UseWatcomQuote state, and remove corresponding method parameters.
* | cmLinkLineComputer: Move ComputeLinkLibs from cmLocalGeneratorStephen Kelly2016-10-101-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | cmLinkLineComputer: Extract from cmLocalGeneratorStephen Kelly2016-10-101-2/+5
| | | | | | | | | | | | | | | | | | | | | | 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.
* | cmake: Simplify find-package mode library additionStephen Kelly2016-10-071-1/+1
|/ | | | It does not need the cmMakefile version.
* 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.
* cmake-server: Report server mode availablitily in CapabilitiesTobias Hunger2016-09-191-8/+4
| | | | | Report the availability of the server-mode in the output of cmake -E capabilities.
* cmake: Fix --find-package mode link line outputBrad King2016-09-161-2/+2
| | | | | | | | | | 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.
* 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-17/+23
|
* cmake: Introduce ReportCapabilitiesJsonTobias Hunger2016-09-121-5/+12
| | | | | | | 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.
* VS15: Add Visual Studio 15 generatorBrad King2016-09-071-0/+3
| | | | | | | | | | | | | | | | 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
* fix a load of include-what-you-use violationsDaniel Pfeifer2016-09-031-15/+26
|
* cmMessenger: Extract from cmake classStephen Kelly2016-08-251-163/+13
| | | | | | | | 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: don't use else after returnDaniel Pfeifer2016-08-181-12/+8
|
* Merge topic 'readability-named-parameter'Brad King2016-08-171-2/+3
|\ | | | | | | | | e7b842e1 Make sure unnused parameters are /*named*/
| * Make sure unnused parameters are /*named*/Daniel Pfeifer2016-08-161-2/+3
| |
* | cmake: Add `cmake -E capabilities` modeTobias Hunger2016-08-161-0/+78
| | | | | | | | | | | | | | 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/+2
|/
* Report more information about extra generators in generator factoriesTobias Hunger2016-08-031-0/+7
|
* Refactor extra generator registration to use factoriesTobias Hunger2016-08-031-59/+86
| | | | | | | | | | | 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.
* Use better KWSys SystemTools::GetEnv and HasEnv signaturesDāvis Mosāns2016-07-181-15/+6
|
* CMake: Report whether generators support platformsTobias Hunger2016-07-141-0/+2
|
* Avoid using KWSys auto_ptr by adopting it ourselvesBrad King2016-06-291-9/+7
| | | | | | | | | | | | Replace use of cmsys::auto_ptr with a CM_AUTO_PTR macro that maps to our own implementation adopted from the KWSys auto_ptr implementation. Later we may be able to map CM_AUTO_PTR to std::auto_ptr on compilers that do not warn about it. Automate the client site conversions: git grep -l auto_ptr -- Source/ | grep -v Source/kwsys/ | xargs sed -i \ 's|cmsys::auto_ptr|CM_AUTO_PTR|;s|cmsys/auto_ptr.hxx|cm_auto_ptr.hxx|'
* use CM_NULLPTRDaniel Pfeifer2016-06-281-10/+11
|
* cmake: Add an option to control what files needs to be tracedAlex Turbov2016-06-171-0/+5
| | | | | | | | | | 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).
* Remove redundant arguments from fstream constructorsDaniel Pfeifer2016-06-141-1/+1
| | | | Don't pass the default value of the openmode parameter explicitly.
* Merge topic 'fix-cmake-ISP-violation'Brad King2016-06-131-9/+13
|\ | | | | | | | | | | 23f87e81 cmake: Remove force from IssueMessage API 54c65d5f cmake: Extract DisplayMessage API.
| * cmake: Remove force from IssueMessage APIStephen Kelly2016-06-121-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+6
| |