1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-06-18 09:48:41 +08:00

87 Commits

Author SHA1 Message Date
Brad King
5c724c4ca8 Merge topic 'server-polish-opt-handshake'
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
2018-01-25 08:35:28 -05:00
Tobias Hunger
9b1a3d244b Server-mode: Rename functions to reflect what they do
Rename the test* static functions to getOrTest* to better reflect
what they do now.
2018-01-24 17:01:40 +01:00
Marc Chevrier
0448311179 sourceFile properties: add property INCLUDE_DIRECTORIES 2018-01-24 15:10:10 +01:00
Marc Chevrier
78b1c2e09e sourceFile properties: add property COMPILE_OPTIONS
Add the support of per-source property COMPILE_OPTIONS,
including generator expressions support.

Related: #17507
2018-01-23 10:24:56 +01:00
Justin Goshi
33802b3168 server: fix crash if no min version specified
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.
2018-01-18 20:54:02 -08:00
Justin Goshi
2c1ecab64d server: Expand generator expressions for test info 2018-01-03 16:49:00 -08:00
Marc Chevrier
10f58b27ac Genex: Per-source $<COMPILE_LANGUAGE:...> support
Fixes: #17542
2017-12-13 16:35:22 +01:00
Brad King
b7100756d7 Merge branch 'backport-revert-server-target-backtraces' into revert-server-target-backtraces 2017-12-06 11:49:52 -05:00
Brad King
976370d134 server: drop "ctestInfo" backtrace information
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
2017-12-06 11:45:51 -05:00
Brad King
8b2736c71c server: Revert "Report backtraces in codemodel response"
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
2017-12-06 11:39:03 -05:00
Marc Chevrier
9432f686e6 Add generator expression support to per-source COMPILE_DEFINITIONS
This allows users to specify different genex-based compile definitions for each file in a target.

Fixes: #17508
2017-12-05 14:47:39 +01:00
Marc Chevrier
6bffc13ef1 Refactor per-source generator expression evaluation
Prepare to add generator expression support to more source properties.
Factor out some duplicated code into a helper to avoid further
duplication.
2017-12-04 09:10:09 -05:00
Brad King
08f66764b3 Merge topic 'server-target-isGeneratorProvided'
afd9a339 server: return whether or not a target is generator provided

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1475
2017-11-27 08:52:06 -05:00
Brad King
0c1912e3e5 Merge topic 'serverFixTestDiscovery'
fe2c2b0f server: ctestInfo fix to return all tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1479
2017-11-27 08:51:35 -05:00
Justin Goshi
afd9a339a1 server: return whether or not a target is generator provided
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.
2017-11-20 14:29:50 -05:00
Justin Goshi
fe2c2b0ffb server: ctestInfo fix to return all tests
Prior to this change we were looking at targets. But tests are
associated with directories. This change fixes how we gather all tests.
2017-11-17 09:19:26 -08:00
Justin Goshi
cb7d0a80fa server: project has install rule bug fix
Need to check all generators associated with the project because any of
them may have an install rule.
2017-11-16 09:03:08 -08:00
Justin Goshi
cdf5f34b0c server: return minimum cmake required version for each project 2017-11-07 12:15:57 -08:00
Justin Goshi
35a52bd1b4 server: add "ctestInfo" request to get test info 2017-11-03 09:39:01 -07:00
Justin Goshi
296eb9ad4c cmake-server: Add target install destinations to codemodel
Protocol version is updated to 1.2 since this is a change
to what was released in cmake version 3.10.
2017-10-24 14:58:07 -04:00
Matthias Maennich
79b8c3802a Improve several occurrences of vector::push_back in loops
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>
2017-09-28 07:23:41 -04:00
Pavel Solodovnikov
7d5095796a Meta: modernize old-fashioned loops to range-based for.
Changes done via `clang-tidy` with some manual fine-tuning
for the variable naming and `auto` type deduction
where appropriate.
2017-09-12 16:22:47 +03:00
Daniel Pfeifer
2b4c32c95f clang-format: format all code as Cpp11 2017-08-30 11:07:05 -04:00
Daniel Pfeifer
7ddd43183d Merge topic 'cstyle-casts'
190e3825 Replace C-style casts

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1176
2017-08-30 06:38:00 -04:00
Daniel Pfeifer
190e3825d4 Replace C-style casts 2017-08-27 09:58:46 +02:00
Daniel Pfeifer
4614a3b287 server: backport to C++11 2017-08-26 07:46:57 +02:00
Daniel Pfeifer
5962db4389 Use C++11 nullptr 2017-08-24 23:39:47 +02:00
Aaron Orenstein
7bc6577017 Performance: Fix a few more unnecessary vector copies missed in af3fd6f 2017-08-18 07:59:52 -07:00
Daniel Pfeifer
cbcf6458f4 cmServerProtocol: Do not move into json::Value::append()
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.
2017-08-15 22:43:08 +02:00
Daniel Pfeifer
91417e4ca3 cmServerProtocol: pass cmBacktraceRange by value 2017-08-15 22:37:05 +02:00
Daniel Pfeifer
1df3875871 cmServerProtocol: allow 'cache' request before 'configure'
Fixes: #16989
2017-08-13 22:02:31 +02:00
Daniel Pfeifer
187332b2fa cmServerProtocol: fix test of empty values
If a required value is in the cache, it is not necessary to set it
explicitly.

Fixes: #16948, #16988
2017-08-13 22:02:30 +02:00
Brad King
ee79d7a130 Merge topic 'server-fix-crash'
70272f3c server: Fix crash on missing cache entries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1096
2017-08-03 09:34:15 -04:00
Laurent Rineau
70272f3c36 server: Fix crash on missing cache entries
Test for nullptr before constructing std::string.
2017-08-02 16:13:55 -04:00
Brad King
fc4f352513 Merge topic 'server-refactor'
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
2017-07-18 11:14:02 -04:00
Ivan Shcherbakov
0c57238215 server: Report backtraces in codemodel response
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.
2017-07-11 07:50:22 -04:00
Justin Berger
5ddfb6a472 server: Add connection as part of a request 2017-07-10 18:11:33 -06:00
Ivan Shcherbakov
4db3227514 server: Rename cmServerProtocol1_0 to cmServerProtocol1
It will serve additional minor versions.

Suggested-by: Tobias Hunger <tobias.hunger@qt.io>
2017-07-06 11:03:14 -04:00
Daniel Pfeifer
c36d63cd48 cmake: initialize with Role that controls which commands to register 2017-05-08 22:29:44 +02:00
Daniel Pfeifer
f3e216131b cmServer: include what you use 2017-05-06 00:03:47 +02:00
Daniel Pfeifer
a168b4ccc2 cmServerProtocol: avoid copies in range for 2017-04-26 08:59:56 +02:00
Gregor Jasny
cf320f7cd7 Replace boolean implib parameters with enum
Named enumeration values are much clearer at call sites and add more
type safety.
2017-04-20 10:22:33 -04:00
Brad King
677b3cbf28 Merge topic 'server-mode-fix-home-dir-check'
8285ad51 server-mode: Make CMAKE_HOME_DIRECTORY more reliable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !611
2017-03-23 08:46:30 -04:00
Tobias Hunger
8285ad511a server-mode: Make CMAKE_HOME_DIRECTORY more reliable
Make CMAKE_HOME_DIRECTORY detection work more reliably in the face
of symlinks.

Closes #16736
2017-03-22 17:31:02 +01:00
Tobias Hunger
c0bd1eb6d0 server-mode: Do not crash when running into INTERFACE_LIBRARY
Closes: #16539
2017-01-09 16:40:46 -05:00
Brad King
a0ed39ac22 Merge topic 'mr-reset-error-flag-on-configure'
7789dd9a server-mode: Call ResetErrorOccured before configure
2017-01-09 16:27:19 -05:00
Tobias Hunger
7789dd9a1a server-mode: Call ResetErrorOccured before configure
Closes: #16506
2016-12-16 08:54:37 -05:00
Daniel Pfeifer
58c66393cf clang-tidy: apply readability-static-definition-in-anonymous-namespace fixes 2016-12-12 14:04:15 -05:00
Brad King
f6f42b25c8 Merge topic 'src-COMPILE_FLAGS-genex'
5dec0a23 server-mode: Fix per-source COMPILE_FLAGS genex evaluation
2016-12-05 09:23:22 -05:00
Tobias Hunger
5dec0a2328 server-mode: Fix per-source COMPILE_FLAGS genex evaluation
Logic added by commit 1e4bb358 (Add generator expression support to
per-source COMPILE_FLAGS, 2016-10-25) accidentally frees memory before
finishing with it.  Revise the logic to hold the memory long enough.
2016-12-02 10:15:50 -05:00