Commit Graph

13 Commits

Author SHA1 Message Date
Tobias Hunger
b2fe7c9ad1 CMake: Use canonical source directory when talking to cmake server-mode
Use the canonical form of the source directory when talking to cmake.

Cmake will save the canonical source directory in its settings and will
fail if that is not passed in again.

Change-Id: I1ea578053c8d5136d09b3f503443bd0188ebca4f
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-04-25 15:31:21 +00:00
Tim Jenssen
2631ffabd5 Remove spaces in initializer lists
Format initializer lists code style like.

Change-Id: Ib82c235e4ba7dc75ee96a7abc0c47eff7b0a9013
Reviewed-by: hjk <hjk@qt.io>
2017-02-22 16:25:09 +00:00
Tobias Hunger
588211e2e8 CMake: Use shorter names for local sockets in server-mode
Apparently there is a limit to about 100 characters or so on some
versions of Unix (e.g. Darwin), and there is also the tendency to
point TMPDIR into places very far from '/' (e.g. Darwin), which
can result in the local socket path getting trunkated.

So make sure to put the local socket into /tmp on Unix. That works
on Linux and on Darwin.

Change-Id: I40bfaf932c5013cf72addb5621360e97c9583daa
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2017-01-24 16:12:26 +00:00
Tobias Hunger
01e80b264b CMake: Put cmake server-mode socket into a temporary directory
Do not put the cmake server-mode socket into the build directory, but
put it into a temporary directory instead.

This makes sure it will not stick around and also avoids polluting the
build directory with Qt Creator specific files.

Task-number: QTCREATORBUG-17320
Change-Id: Id849b1a80d7cba07c026cc2ecd7030435c401884
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-01-20 12:21:20 +00:00
Tobias Hunger
c6f90e575e Utils: Introduce a TemporaryDirectory and TemporaryFile class
Both wrap the corresponding Qt class, but make sure all temporary files
or directories are created inside a "master temporary directory".

Change-Id: I55461be507c828c965224c02863ea5ed9bbf9498
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-01-20 12:17:10 +00:00
Tobias Hunger
0edb16d4f3 CMake: Log server-mode teardown
Change-Id: I68ef20b855b9b7d6ed6fded9a599d74162a50390
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-12-02 11:59:37 +00:00
Tobias Hunger
c54fe23579 CMake: Send compact JSON output to cmake server
Change-Id: I0e02f122bdb2b1b417a70aa4933cc4246d6969c6
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-30 14:23:16 +00:00
Florian Apolloner
4c22f3a76c Fixed cmake signal handling in server-mode
Task-number: QTCREATORBUG-17319
Change-Id: I25673a32142a691dff2444be8981d747f10e18c5
Reviewed-by: Florian Apolloner <florian@apolloner.eu>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-24 14:51:17 +00:00
Tobias Hunger
bbcfbdf58d CMake: Log server-mode data
Change-Id: I043459224b790900e6f13b6fa8f389dbeca26789
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-23 12:52:58 +00:00
Tobias Hunger
52fc4a4ebd CMake: Make sure to never trigger a timer on an destroyed object
This object might have gone out of scope by the time the timer hits.

Task-number: QTCREATORBUG-17289
Change-Id: I4b9ea75c9b4b1c905ece44965e80a5accc3590f3
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-23 12:06:15 +00:00
Tobias Hunger
db6b60874d CMake: Make connections in server-mode setup more robust
Change-Id: I1e66b4decd485edac9e3fb5508d5c0bb10d0554a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-01 15:42:04 +00:00
Tobias Hunger
80a58ba1cb CMake: Fix pipe name on windows
Fix the name of the pipe used to talk to cmake-server on windows. The name needs
to follow a very specific pattern there.

Change-Id: I2789be43b374d008e2bf784563ab362efd891e59
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-01 12:29:34 +00:00
Tobias Hunger
4c1a7515c9 CMake: Implement helper to talk to CMake server-mode
Implement a helper class that can be used to talk to CMake's
server-mode.

Change-Id: I1df4af665991a5e0a3acb301ffd28008dd4fe86f
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-10-31 10:40:37 +00:00