Maintain in the directory state the list of target names added to be
built. These are normal, non-imported targets (but do include INTERFACE
libraries).
Enable the initial handshake of the client to complete the connection
to the server.
The handshake sets the protocol version that client and server will
use to talk to each other. The only way to change this is to quit the
server and start over.
CMake specific information is also set during the initial handshake.
Since cmake so far never had to change basic information about any project
while running, it was decided to keep this information static and
require a restart of the cmake server to change any of these.
Adds a bare-bones cmake-server implementation and makes it possible
to start that with "cmake -E server".
Communication happens via stdin/stdout for now.
Protocol is based on Json objects surrounded by magic strings
("[== CMake Server ==[" and "]== CMake Server ==]"), which simplifies
Json parsing significantly.
This patch also defines an interface used to implement different
versions of the protocol spoken by the server, but does not include
any protocol implementaiton.
3fab1fef cmNinjaNormalTargetGenerator: make sure comments match parameter names
7b94a7ad cmCommandArgumentsHelper: simplify boolean expression
782fcbb9 Use CM_NULLPTR
809ca6c8 Use braces around statements
516f8edb Avoid else after return
d9f5d3c5 Remove redundant get() call on smart pointer
3fda1094 Mark overridden functions with CM_OVERRIDE
I otherwise get:
Expected stderr to match:
expect-err> CMake Error at AppendNotOutput.cmake:1 \(add_custom_command\):
expect-err> add_custom_command given APPEND option with output.*
expect-err> which is not already a custom command output.
expect-err> Call Stack \(most recent call first\):
expect-err> CMakeLists.txt:3 \(include\)
Actual stderr:
actual-err> CMake Error at AppendNotOutput.cmake:1 (add_custom_command):
actual-err> add_custom_command given APPEND option with output
actual-err> "/home/stephen/dev/src/cmake/with
actual-err> space/Tests/RunCMake/add_custom_command/AppendNotOutput-build/out" which is
actual-err> not already a custom command output.
actual-err> Call Stack (most recent call first):
actual-err> CMakeLists.txt:3 (include)
Using a specific line for paths is a style already used elsewhere for
the same reason, such as CMP0041 output.
Split the ConvertToRelativePath funtion into ConvertToRelativePath and
ForceToRelativePath. Both functions take the local path as a string
rather than a vector of path segments. Reimplement the old interface on
top of the two new functions for interface compatibility.
9353d991 cmTarget: Remove unused support for partial construction
fa3897b2 cmGlobalGenerator: Refactor global target construction
916d8445 cmGlobalGenerator: Split CreateDefaultGlobalTargets implementation
Refactoring in commit v2.8.10~58^2~2 (Ninja: move -LIBPATH behind -link
option, 2012-09-26) added arguments to cmLocalGenerator::GetTargetFlags
and updated the call sites. However, in the cmake::FindPackage and
cmLocalGenerator::AddBuildTargetRule call sites it added the new
arguments in the wrong order. The latter was never used and has been
removed. The former remains buggy and prints out compiler flags instead
of the link framework/library search paths. Fix its argument order.
Avoid using partially-constructed cmTarget instances. Collect the
information about how to construct each target in a separate structure
and then actually create each cmTarget with full construction.
Ninja does not support PRE_INSTALL_SCRIPT properties and does not
perform the relink required by installation without help from some other
mechanism, so error out if it would be required.
Issue: #13934, #16304
Add `CMAKE_FIND_PACKAGE_SORT_{ORDER,DIRECTION}` variables to specify
sort order and direction.
When multiple package with the same name have been found in the same
location sorting option can be used to force a specific version to be
loaded (e.g. libA_1.12.0 instead of libA_1.1.0). Currently sorting by
NAME and by NATURAL order have been implemented.
Natural ordering makes use of the `strverscmp(3)` ordering.
7a2e114d cmTarget: Inline SetType method at only remaining call site
00e78c19 cmTarget: Construct with basic information up front
9d11bd50 Avoid requiring default cmTarget constructor for map indexing
d97513d8 cmTarget: Add method to get a copy adapted for a directory