Commit Graph

21164 Commits

Author SHA1 Message Date
Stephen Kelly 25c39ac28b Convert: Inline HOME_OUTPUT MAKERULE conversion 2016-09-19 21:36:13 +02:00
Stephen Kelly 516e79ba27 Convert: Inline MAKERULE conversions
This is a trivial use of a static method.
2016-09-19 21:36:13 +02:00
Stephen Kelly e13e519e1c Convert: Move access to BinaryDirectory out of loops 2016-09-19 21:36:13 +02:00
Stephen Kelly 34c6e995f9 Convert: Avoid HOME_OUTPUT enum when converting to relative paths 2016-09-19 21:36:13 +02:00
Stephen Kelly 839c65bca0 Convert: Move access to CurrentBinaryDirectory out of loops 2016-09-19 21:36:12 +02:00
Stephen Kelly 21b5fdf9a3 Convert: Avoid START_OUTPUT enum when converting to relative paths 2016-09-19 21:36:12 +02:00
Stephen Kelly f1d845ae74 Convert: Remove obsolete HOME and START enum values 2016-09-19 21:36:12 +02:00
Stephen Kelly 0a98c74c1b Convert: Remove last uses of HOME enum value 2016-09-19 21:36:12 +02:00
Stephen Kelly 495e26ae57 Convert: Remove last use of START enum value
The enums just introduce unfamiliar names and don't provide value.

The order of arguments is reversed, as that is the result of the

 cmOutputConverter::ConvertToRelativePath

overload which accepts the RelativeRoot enum.
2016-09-19 21:36:12 +02:00
Stephen Kelly 4f68b2070f Xcode: Remove unused member
It is unused since commit v3.4.0-rc1~492^2~3 (Remove
CMAKE_USE_RELATIVE_PATHS variable., 2015-06-01).
2016-09-19 21:24:00 +02:00
Tobias Hunger d341d077c5 cmake-server: Implement ServerProtocol 1.0
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.
2016-09-19 08:57:57 -04:00
Tobias Hunger b13d3e0d0b cmake-server: Bare-bones server implementation
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.
2016-09-19 08:57:57 -04:00
Tobias Hunger cd049f012e cmake-server: Report server mode availablitily in Capabilities
Report the availability of the server-mode in the output of
cmake -E capabilities.
2016-09-19 08:57:28 -04:00
Brad King 419ad05101 Merge topic 'cleanup-Convert'
6afd35b9 cmState: remove unused code
8d47a20f cmOutputConverter: use new ConvertToRelativePath signature internally
149af87b cmOutputConverter: split ConvertToRelativePath
2016-09-19 08:55:27 -04:00
Brad King ec5114f997 Merge topic 'predictable-add_custom_command-output'
92d76b50 Make the add_custom_command output more predictable
2016-09-19 08:55:24 -04:00
Brad King 995d6be128 Merge topic 'clang-tidy-fixes'
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
2016-09-19 08:55:18 -04:00
Brad King 34b49df564 Merge topic 'ifw-user-interfaces'
c2f0f41f CPackIFW: Add USER_INTERFACES option
2016-09-19 08:55:12 -04:00
Brad King 0a4d15a9e2 Merge topic 'check-for-unique_ptr'
aa50cdac Check for availability of unique_ptr and make_unique when building CMake
2016-09-19 08:55:09 -04:00
Brad King b4ea74c5ca Merge topic 'find-package-mode-fixes'
a098ca0d cmake: Fix --find-package mode link line output
d9c600c5 cmGlobalGenerator: Fix use of uninitialized value in --find-package mode
2016-09-19 08:55:03 -04:00
Stephen Kelly 92d76b50aa Make the add_custom_command output more predictable
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.
2016-09-19 08:49:46 -04:00
Kitware Robot c7b312cf13 CMake Nightly Date Stamp 2016-09-19 00:01:03 -04:00
Kitware Robot ca504042d1 CMake Nightly Date Stamp 2016-09-18 00:01:05 -04:00
Daniel Pfeifer 6afd35b98a cmState: remove unused code
Remove the code that was used by cmOutputConverter exclusively.
2016-09-17 19:49:21 +02:00
Daniel Pfeifer 8d47a20f13 cmOutputConverter: use new ConvertToRelativePath signature internally 2016-09-17 10:29:49 +02:00
Daniel Pfeifer 149af87b86 cmOutputConverter: split ConvertToRelativePath
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.
2016-09-17 10:29:48 +02:00
Kitware Robot 4171b86ca3 CMake Nightly Date Stamp 2016-09-17 00:01:05 -04:00
Daniel Pfeifer 3fab1fef23 cmNinjaNormalTargetGenerator: make sure comments match parameter names 2016-09-16 23:31:37 +02:00
Daniel Pfeifer 7b94a7adb3 cmCommandArgumentsHelper: simplify boolean expression 2016-09-16 23:16:54 +02:00
Daniel Pfeifer 782fcbb92e Use CM_NULLPTR 2016-09-16 23:01:40 +02:00
Daniel Pfeifer 809ca6c81f Use braces around statements 2016-09-16 22:52:02 +02:00
Daniel Pfeifer 516f8edb2e Avoid else after return 2016-09-16 22:45:24 +02:00
Daniel Pfeifer d9f5d3c50f Remove redundant get() call on smart pointer 2016-09-16 22:16:27 +02:00
Daniel Pfeifer 3fda109451 Mark overridden functions with CM_OVERRIDE 2016-09-16 22:14:19 +02:00
Brad King aa50cdac43 Check for availability of unique_ptr and make_unique when building CMake
Some code paths may find these useful if available.
2016-09-16 13:22:10 -04:00
Pierluigi Taddei c2f0f41f63 CPackIFW: Add USER_INTERFACES option
Add to CPackIFW the capability of accepting a list of
USER_INTERFACES that are copied to the meta folder and
added to the component description.
2016-09-16 10:29:00 -04:00
Brad King 00fd64d126 Merge topic 'refactor-target-construction'
9353d991 cmTarget: Remove unused support for partial construction
fa3897b2 cmGlobalGenerator: Refactor global target construction
916d8445 cmGlobalGenerator: Split CreateDefaultGlobalTargets implementation
2016-09-16 10:21:43 -04:00
Brad King 60ebd0acf8 Merge topic 'size-empty'
73f648f1 use empty method to check for emptyness
2016-09-16 10:21:39 -04:00
Brad King cf0e005202 Merge topic 'detect-relink-incompat'
72dfca30 ninja: error out on relink requirements
2016-09-16 10:21:31 -04:00
Brad King 4356bd7fe3 Merge topic 'file-curl-httpheader'
8f6cb366 file(DOWNLOAD|UPLOAD): Add HTTPHEADER suboption
2016-09-16 10:21:23 -04:00
Brad King 38a378e10d Merge topic 'find_package-dir-sort'
31be918b find_package: Optionally sort globbed directories in a meaningful order
2016-09-16 10:21:17 -04:00
Brad King a098ca0d7a cmake: Fix --find-package mode link line output
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.
2016-09-16 10:03:15 -04:00
Brad King d9c600c504 cmGlobalGenerator: Fix use of uninitialized value in --find-package mode 2016-09-16 09:25:41 -04:00
Kitware Robot 3bb18e708d CMake Nightly Date Stamp 2016-09-16 00:01:07 -04:00
Daniel Pfeifer 73f648f167 use empty method to check for emptyness 2016-09-15 23:59:29 +02:00
Brad King 9353d991a4 cmTarget: Remove unused support for partial construction
We no longer need to support partial construction for cmTarget instances
of type GLOBAL_TARGET.  Require all constructor arguments up front.
2016-09-15 16:02:27 -04:00
Brad King fa3897b24e cmGlobalGenerator: Refactor global target construction
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.
2016-09-15 15:56:49 -04:00
Brad King 916d84450d cmGlobalGenerator: Split CreateDefaultGlobalTargets implementation
Divide this long method into multiple helpers each dedicated to one of
the targets.  This also avoids having to clear/re-use local structures.
2016-09-15 15:37:25 -04:00
Ruslan Baratov 8f6cb36695 file(DOWNLOAD|UPLOAD): Add HTTPHEADER suboption 2016-09-15 21:41:39 +03:00
Ben Boeckel 72dfca30b9 ninja: error out on relink requirements
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
2016-09-15 13:44:58 -04:00
Pierluigi Taddei 31be918b0b find_package: Optionally sort globbed directories in a meaningful order
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.
2016-09-15 13:35:25 -04:00