summaryrefslogtreecommitdiffstats
path: root/Source/cmServerProtocol.cxx
Commit message (Collapse)AuthorAgeFilesLines
* 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
|/
* Use C++11 nullptrDaniel Pfeifer2017-08-241-1/+1
|
* Performance: Fix a few more unnecessary vector copies missed in af3fd6fAaron Orenstein2017-08-181-1/+1
|
* cmServerProtocol: Do not move into json::Value::append()Daniel Pfeifer2017-08-151-1/+1
| | | | | | | CMake's copy of json-cpp is not aware of rvalues yet. It is confusing to pass the result of std::move to a function that takes a const& because no move will actually happen. This change may be reverted once CMake upgrades to a new version of json-cpp.
* cmServerProtocol: pass cmBacktraceRange by valueDaniel Pfeifer2017-08-151-1/+1
|
* cmServerProtocol: allow 'cache' request before 'configure'Daniel Pfeifer2017-08-131-4/+0
| | | | Fixes: #16989
* cmServerProtocol: fix test of empty valuesDaniel Pfeifer2017-08-131-7/+8
| | | | | | | If a required value is in the cache, it is not necessary to set it explicitly. Fixes: #16948, #16988
* Merge topic 'server-fix-crash'Brad King2017-08-031-1/+3
|\ | | | | | | | | | | | | 70272f3c server: Fix crash on missing cache entries Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1096
| * server: Fix crash on missing cache entriesLaurent Rineau2017-08-021-1/+3
| | | | | | | | Test for nullptr before constructing std::string.
* | Merge topic 'server-refactor'Brad King2017-07-181-2/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | cf0ae55d server: Add support for connections that aren't event based 5ddfb6a4 server: Add connection as part of a request d4f5d35c server: Refactor to make the event loop owned by server object 5acbf08b Tests: Teach Server test to forward exit code from server process Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !552
| * | server: Add connection as part of a requestJustin Berger2017-07-111-2/+4
| |/
* | server: Report backtraces in codemodel responseIvan Shcherbakov2017-07-111-1/+51
| | | | | | | | | | | | | | | | | | | | Report the source locations (e.g. in `CMakeLists.txt`) for all targets and target-related statements. This allows IDEs to locate the statements and automatically edit them when the user adds or removes files or changes target properties via GUI. Increment the protocol minor version number to tell clients that the new information is available.
* | server: Rename cmServerProtocol1_0 to cmServerProtocol1Ivan Shcherbakov2017-07-061-17/+17
|/ | | | | | It will serve additional minor versions. Suggested-by: Tobias Hunger <tobias.hunger@qt.io>
* cmake: initialize with Role that controls which commands to registerDaniel Pfeifer2017-05-081-1/+1
|
* cmServer: include what you useDaniel Pfeifer2017-05-051-8/+13
|
* cmServerProtocol: avoid copies in range forDaniel Pfeifer2017-04-261-16/+13
|
* Replace boolean `implib` parameters with enumGregor Jasny2017-04-201-2/+4
| | | | | Named enumeration values are much clearer at call sites and add more type safety.
* Merge topic 'server-mode-fix-home-dir-check'Brad King2017-03-231-2/+22
|\ | | | | | | | | | | | | 8285ad51 server-mode: Make CMAKE_HOME_DIRECTORY more reliable Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !611
| * server-mode: Make CMAKE_HOME_DIRECTORY more reliableTobias Hunger2017-03-221-2/+22
| | | | | | | | | | | | | | Make CMAKE_HOME_DIRECTORY detection work more reliably in the face of symlinks. Closes #16736
* | server-mode: Do not crash when running into INTERFACE_LIBRARYTobias Hunger2017-01-091-2/+6
| | | | | | | | Closes: #16539