summaryrefslogtreecommitdiffstats
path: root/Source/cmServerProtocol.cxx
Commit message (Collapse)AuthorAgeFilesLines
* cmake-server: Normalize build and source directoriesGregor Jasny2019-01-311-2/+11
| | | | Fixes: #18862
* clang-tidy: Pass by valueRegina Pfeifer2019-01-221-14/+14
|
* Properties: Add CMAKE_ROLE global propertyKyle Edwards2019-01-171-1/+2
| | | | | This property allows scripts to determine whether they're in project mode, script mode, find-package mode, CTest, or CPack.
* clang-tidy: Fix readability-static-accessed-through-instanceRegina Pfeifer2018-11-211-1/+1
| | | | Enable the check in .clang-tidy and fix all warnings.
* cmake-server: Revert "Support codemodel filegroups for INTERFACE_SOURCES"Brad King2018-10-171-6/+1
| | | | | | | | | | | | | Revert commit v3.13.0-rc1~144^2 (cmake-server: Support codemodel filegroups for INTERFACE_SOURCES, 2018-08-10). The changes activate code paths not meant to be used with interface libraries. Another approach will be needed to expose this information later. This revert has to be done by hand because the code in question has been changed somewhat since the changes were made, and was also factored out to another source file. Fixes: #18463
* server: Compile json object generation source separatelyBrad King2018-09-211-6/+6
| | | | | Declare entry points in a dedicated header and compile the source separately instead of including it in the server implementation.
* server: Split json dictionary into separate headerBrad King2018-09-211-0/+1
| | | | | | Move dictionary entries used by the json object generation code into a separate header. These are distinct from the server-only entries used in the protocol implementation.
* server: Split json object generation into separate sourceBrad King2018-09-211-801/+2
| | | | | | For now just move the content and `#include` it back in to the original translation unit. That way `git blame` can cleanly track the original lines.
* server: factor out json object generation entry pointsBrad King2018-09-211-20/+34
| | | | | | | Make entry points for these that do not reference the server code. For now we leave the "cache" object generation alone because its implementation interleaves error handling and the format may not suitable outside a server response.
* Merge topic 'gicv-stdstring'Brad King2018-09-121-4/+4
|\ | | | | | | | | | | | | 13d10ee616 cmState::GetInitializedCacheValue: Return as const std::string* Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2365
| * cmState::GetInitializedCacheValue: Return as const std::string*Vitaly Stakhovsky2018-09-101-4/+4
| |
* | genex: Simplify cmGeneratorExpressionInterpreterBrad King2018-09-071-5/+4
|/ | | | | | | | | All callers were constructing with a non-empty target name using the target whose pointer was passed anyway. Drop this argument. Simplify logic accordingly. Re-order constructor arguments to match the cmCompiledGeneratorExpression::Evaluate arguments. Also remove unnecessary getters.
* Merge topic 'cmakeServerSourcesForInterfaceLibraries'Brad King2018-09-041-40/+183
|\ | | | | | | | | | | | | | | | | d74c2282ea cmake-server: Support codemodel filegroups for INTERFACE_SOURCES Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Tobias Hunger <tobias.hunger@gmail.com> Acked-by: Markus Enzenberger <markus.enzenberger@gmail.com> Merge-request: !2282
| * cmake-server: Support codemodel filegroups for INTERFACE_SOURCESJustin Goshi2018-08-301-40/+183
| | | | | | | | | | | | | | | | | | This change returns information for INTERFACE_SOURCES. We add a flag to the filegroup to indicate if the target represents interface sources. Protocol version is updated to 1.3 since this is a change to what was released in cmake version 3.12.
* | Merge topic 'genex-evaluate-stdstring'Brad King2018-08-301-1/+1
|\ \ | | | | | | | | | | | | | | | | | | 65ab9ce938 Genex: Return Evaluate results as const std::string& Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2314
| * | Genex: Return Evaluate results as const std::string&Vitaly Stakhovsky2018-08-281-1/+1
| | | | | | | | | | | | Also remove unused overloads.
* | | cmMakefile: return directories as const std::string&Vitaly Stakhovsky2018-08-271-1/+1
|/ /
* | cmCompiledGeneratorExpression::Evaluate(): return const std::string&Vitaly Stakhovsky2018-08-091-4/+3
|/
* IWYU: Fix workaround mapping for std::hashBrad King2018-08-071-1/+0
| | | | | | | | | It is provided by `functional`, not `utility`. Fix the mapping added by commit 276d3c7afe (IWYU: Add workaround mapping for std::hash, 2018-07-31). Also generalize the workaround from commit v3.12.0-rc1~39^2~1 (IWYU: Define a macro to tell code it is preprocessing for iwyu, 2018-05-25) to allow local builds to configure specific flags. This is needed because iwyu behaves differently in different environments.
* IWYU: Add workaround mapping for std::hashBrad King2018-07-311-0/+1
| | | | | When using GCC 8's standard library IWYU thinks that `<system_error>` must be included to get `std::hash`. Add a mapping for `<utility>`.
* Revise C++ coding style using clang-format-6.0Kitware Robot2018-06-011-13/+23
| | | | | | | | | | | | 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.
* Genex: Fix COMPILE_LANGUAGE in SYSTEM include directoriesBrad King2018-03-121-3/+4
| | | | | | | | | When evaluating `INTERFACE_SYSTEM_INCLUDE_DIRECTORIES`, or evaluating `INTERFACE_INCLUDE_DIRECTORIES` on an imported target, thread the compile language through to the generator expression evaluator so that it can support `$<COMPILE_LANGUAGE:...>`. Fixes: #17811
* Reduce raw string pointers usage.Pavel Solodovnikov2018-01-311-6/+5
| | | | | | | | | | * 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.
* Reduce allocation of temporary values on heap.Pavel Solodovnikov2018-01-261-3/+3
| | | | | - Use `std::move` while inserting temporary results into vectors. - Change `push_back` to `emplace_back` where appropriate.
* Merge topic 'server-polish-opt-handshake'Brad King2018-01-251-14/+15
|\ | | | | | | | | | | | | | | 239a3ef8 Server-mode: Document protocol version for optional handshake arguments 9b1a3d24 Server-mode: Rename functions to reflect what they do Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1693
| * Server-mode: Rename functions to reflect what they doTobias Hunger2018-01-241-14/+15
| | | | | | | | | | Rename the test* static functions to getOrTest* to better reflect what they do now.
* | sourceFile properties: add property INCLUDE_DIRECTORIESMarc Chevrier2018-01-241-1/+18
| |
* | sourceFile properties: add property COMPILE_OPTIONSMarc Chevrier2018-01-231-0/+5
|/ | | | | | | Add the support of per-source property COMPILE_OPTIONS, including generator expressions support. Related: #17507
* server: fix crash if no min version specifiedJustin Goshi2018-01-191-2/+2
| | | | | | | If a CMakeLists.txt file doesn't contain cmake_minimum_required then the server was crashing. The root cause was the json object model does not support null and was crashing. Add the null check and use an empty string in this case.
* server: Expand generator expressions for test infoJustin Goshi2018-01-041-7/+18
|
* Genex: Per-source $<COMPILE_LANGUAGE:...> supportMarc Chevrier2017-12-131-7/+12
| | | | Fixes: #17542
* Merge branch 'backport-revert-server-target-backtraces' into ↵Brad King2017-12-061-48/+0
|\ | | | | | | revert-server-target-backtraces
| * server: Revert "Report backtraces in codemodel response"Brad King2017-12-061-49/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The backtrace information is very repetitive and hugely increases the size of the codemodel object. We need to remove it until an alternative representation can be developed. Revert commit v3.10.0-rc1~393^2 (server: Report backtraces in codemodel response, 2017-06-20), except for the protocol version number (because it indicates other new things). Unfortunately this is incompatible with clients that expect the "crossReferences" field in targets. However, the regression in memory usage is quite serious, especially on large projects, and therefore breaks even older clients that do not use backtraces. Since the "crossReferences" field was only provided by one release (3.10.0), it is simplest to revert it outright for 3.10.1. Fixes: #17502
* | server: drop "ctestInfo" backtrace informationBrad King2017-12-061-3/+0
| | | | | | | | | | | | | | | | | | Backtrace information was included by commit 35a52bd1b4 (server: add "ctestInfo" request to get test info, 2017-10-25) to match that already provided for targets. However, the backtrace representation uses too much memory and needs to be dropped. Remove it from test information. Issue: #17502
* | Add generator expression support to per-source COMPILE_DEFINITIONSMarc Chevrier2017-12-051-2/+8
| | | | | | | | | | | | This allows users to specify different genex-based compile definitions for each file in a target. Fixes: #17508
* | Refactor per-source generator expression evaluationMarc Chevrier2017-12-041-5/+3
| | | | | | | | | | | | Prepare to add generator expression support to more source properties. Factor out some duplicated code into a helper to avoid further duplication.
* | Merge topic 'server-target-isGeneratorProvided'Brad King2017-11-271-0/+2
|\ \ | | | | | | | | | | | | | | | | | | afd9a339 server: return whether or not a target is generator provided Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1475
| * | server: return whether or not a target is generator providedJustin Goshi2017-11-201-0/+2
| | | | | | | | | | | | | | | | | | Some generators auto-generate targets. For example VS generators create the ALL_BUILD target. Add the ability to mark targets as generator provided and return that info through cmake-server codemodel.
* | | Merge topic 'serverFixTestDiscovery'Brad King2017-11-271-72/+19
|\ \ \ | |/ / |/| | | | | | | | | | | | | | fe2c2b0f server: ctestInfo fix to return all tests Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1479
| * | server: ctestInfo fix to return all testsJustin Goshi2017-11-171-72/+19
| | | | | | | | | | | | | | | Prior to this change we were looking at targets. But tests are associated with directories. This change fixes how we gather all tests.
* | | server: project has install rule bug fixJustin Goshi2017-11-161-1/+14
|/ / | | | | | | | | Need to check all generators associated with the project because any of them may have an install rule.
* | server: return minimum cmake required version for each projectJustin Goshi2017-11-071-0/+2
| |
* | server: add "ctestInfo" request to get test infoJustin Goshi2017-11-031-0/+165
| |
* | cmake-server: Add target install destinations to codemodelJustin Goshi2017-10-241-1/+33
|/ | | | | Protocol version is updated to 1.2 since this is a change to what was released in cmake version 3.10.
* Improve several occurrences of vector::push_back in loopsMatthias Maennich2017-09-281-1/+2
| | | | | | | Fix issues diagnosed by clang-tidy by pre-allocating the vector capacity before the loop [performance-inefficient-vector-operation]. Signed-off-by: Matthias Maennich <matthias@maennich.net>
* Meta: modernize old-fashioned loops to range-based `for`.Pavel Solodovnikov2017-09-121-32/+30
| | | | | | Changes done via `clang-tidy` with some manual fine-tuning for the variable naming and `auto` type deduction where appropriate.
* clang-format: format all code as Cpp11Daniel Pfeifer2017-08-301-2/+2
|
* Merge topic 'cstyle-casts'Daniel Pfeifer2017-08-301-1/+1
|\ | | | | | | | | | | | | 190e3825 Replace C-style casts Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1176
| * Replace C-style castsDaniel Pfeifer2017-08-271-1/+1
| |
* | server: backport to C++11Daniel Pfeifer2017-08-261-1/+1
|/