summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
Commit message (Collapse)AuthorAgeFilesLines
* fileapi: Add protocol v1 infrastructure with support for shared query filesBrad King2018-12-121-0/+10
| | | | | | | | | | | | | | | | | | | 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
* clang-tidy: fix warnings from version 7Regina Pfeifer2018-11-201-1/+1
| | | | | Fix some warnings that are new since clang-tidy version 4, and update `.clang-tidy` to suppress the rest.
* Using front() and back() instead of calculationsCengizhan Pasaoglu2018-11-061-1/+1
|
* Merge topic 'graphviz-fix-alias'Brad King2018-10-291-1/+1
|\ | | | | | | | | | | | | 50c4dec072 graphviz: dereference ALIAS targets Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2521
| * graphviz: dereference ALIAS targetsNick Schultz2018-10-261-1/+1
| | | | | | | | | | | | | | Previous behavior treats ALIAS targets as external targets. This fix de-aliases these targets to their pointed target. Fixes: #15636
* | cmake: distinguish '-Cpath' from '-C path' in source dir parsingPaul Seyfert2018-10-261-0/+15
|/ | | | | | | | | | | | | 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.
* cmake: Fix generator platform under --build modeBrad King2018-09-251-0/+8
|
* cmake: Factor json version object construction into helperBrad King2018-09-211-4/+9
|
* Merge topic 'provide_explicit_source_and_build_command_line_options'Brad King2018-09-191-13/+44
|\ | | | | | | | | | | | | | | | | 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
| * cmake: -S and -B can be used to specify source and build directoriesRobert Maynard2018-09-151-13/+44
| | | | | | | | | | | | 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.
* | cmState::GetInitializedCacheValue: Return as const std::string*Vitaly Stakhovsky2018-09-101-26/+28
|/
* cmake: Drop unnecessary working mode checksBrad King2018-08-291-13/+6
| | | | | | | | 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.
* Remove unnecessary c_str() in RegularExpression::find callsVitaly Stakhovsky2018-08-071-1/+1
|
* Revise C++ coding style using clang-format-6.0Kitware Robot2018-06-011-37/+37
| | | | | | | | | | | | 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.
* 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
|