summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
Commit message (Collapse)AuthorAgeFilesLines
* cmake: Add options for parallel builds to --build modeFlorian Maushart2018-05-251-2/+4
| | | | | | | 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.
* Merge topic 'glob_configure_depends'Brad King2018-04-061-28/+68
|\ | | | | | | | | | | | | | | | | | | | | 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
| * Add glob verify support to XCode, VS, Ninja, and Makefile generatorsShane Parris2018-04-021-28/+40
| |
| * Add cmGlobVerificationManager class, integrate with cmake and cmStateShane Parris2018-03-291-0/+28
| |
* | Drop Visual Studio 8 2005 generatorBrad King2018-04-021-5/+2
|/ | | | This generator has been deprecated since CMake 3.9. Remove it.
* cmWorkingDirectory: Check success of current dir changesCraig Scott2018-03-081-1/+10
|
* cmake: Fix global generator path style in --build modeBrad King2018-02-211-4/+4
| | | | | | | | | 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
* Reduce raw string pointers usage.Pavel Solodovnikov2018-01-311-19/+18
| | | | | | | | | | * 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.
* Merge topic 'reduce-temporaries'Brad King2018-01-291-10/+8
|\ | | | | | | | | | | | | c85bb007 Reduce allocation of temporary values on heap. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1698
| * Reduce allocation of temporary values on heap.Pavel Solodovnikov2018-01-261-10/+8
| | | | | | | | | | - Use `std::move` while inserting temporary results into vectors. - Change `push_back` to `emplace_back` where appropriate.
* | Merge topic 'ctest-chrono'Brad King2018-01-261-2/+3
|\ \ | |/ |/| | | | | | | | | | | | | 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
| * Make use of std::chrono throughout every componentWouter Klouwen2018-01-231-2/+3
| | | | | | | | | | | | | | | | 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.
* | Generators: adjust error message for the removed KDevelop3 generatorAlex Neundorf2018-01-241-1/+6
| | | | | | | | | | | | | | | | 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
* | Generators: remove KDevelop3 generatorAlex Neundorf2018-01-241-15/+0
|/ | | | | | | | | | 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
* Merge topic 'cache-truncate-newlines'Brad King2018-01-191-1/+1
|\ | | | | | | | | | | | | | | c42b377c cmCacheManager: Test and document newline truncation behavior a9c48307 cmCacheManager: Truncate values containing newlines Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1652
| * cmCacheManager: Truncate values containing newlinesKyle Edwards2018-01-151-1/+1
| | | | | | | | Fixes #16098.
* | CUDA: Add cu as default source file extensionRobert Maynard2018-01-081-0/+1
|/
* Performance: Improve efficiency of source file lookup in cmMakefileAaron Orenstein2017-11-171-0/+25
| | | | | | | | | 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.
* Merge topic 'cm-array-begins-size'Brad King2017-10-261-10/+11
|\ | | | | | | | | | | | | 57132765 Replace cmArray{Begin,End,Size} by their standard counterparts Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1352
| * Replace cmArray{Begin,End,Size} by their standard counterpartsMatthias Maennich2017-10-231-10/+11
| | | | | | | | | | | | | | | | | | | | | | 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.
* | Add infrastructure for generators to select a build tool instanceBrad King2017-10-191-0/+27
|/ | | | | | | | | | | | | | 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
* cmake: Add --open option for IDE generatorsGregor Jasny2017-10-131-0/+43
|
* try_compile: Simplify generator platform and toolset propagationBrad King2017-09-271-6/+3
| | | | | | | | 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.
* Retire std::auto_ptr and its macro CM_AUTO_PTRMatthias Maennich2017-09-251-24/+23
| | | | Signed-off-by: Matthias Maennich <matthias@maennich.net>
* Meta: replace empty-string assignments with `clear()`.Pavel Solodovnikov2017-09-151-2/+2
|
* Meta: modernize old-fashioned loops to range-based `for`.Pavel Solodovnikov2017-09-121-91/+63
| | | | | | Changes done via `clang-tidy` with some manual fine-tuning for the variable naming and `auto` type deduction where appropriate.
* Use C++11 nullptrDaniel Pfeifer2017-08-241-8/+8
|
* Use C++11 unordered containersDaniel Pfeifer2017-08-221-2/+2
|
* Add const-reference qualificationsPavel Solodovnikov2017-05-261-3/+3
|
* cmake: register fake project commands in -P modeDaniel Pfeifer2017-05-081-0/+2
|
* cmake: initialize with Role that controls which commands to registerDaniel Pfeifer2017-05-081-4/+11
|
* Drop Visual Studio 7 .NET 2003 generatorBrad King2017-04-191-4/+1
| | | | This generator has been deprecated since CMake 3.6. Remove it.
* Use quotes for non-system includesDaniel Pfeifer2017-04-111-4/+4
| | | | | | | | | | | | | 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'
* Add self-sufficient wrapper for <sys/stat.h>Daniel Pfeifer2017-03-241-4/+1
|
* cmWorkingDirectory: use the new classBen Boeckel2017-03-061-15/+15
| | | | | | 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.
* cmCommands: add commands directly to cmStateDaniel Pfeifer2017-02-131-12/+2
|
* split Default commands into Scripting and ProjectDaniel Pfeifer2017-02-131-3/+13
|
* 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.