Commit Graph

623 Commits

Author SHA1 Message Date
Brad King ea8eba0bbf Android: Add CMAKE_<LANG>_ANDROID_TOOLCHAIN_MACHINE
Expose the binutils' machine name (typically used as a prefix on the
tool names) publicly.  This is expected to match the `gcc -dumpmachine`
value.

Suggested-by: Ruslan Baratov <ruslan_baratov@yahoo.com>
2016-11-18 10:03:15 -05:00
Brad King 0d3eb139e1 Android: Add CMAKE_ANDROID_NDK_TOOLCHAIN_HOST_TAG variable
The NDK provides prebuilt toolchain files in directories named for the
host architecture.  The NDK build system calls this `HOST_TAG`.
Expose the value publicly for use by clients that need to pass it
to external tools.

Suggested-by: Ruslan Baratov <ruslan_baratov@yahoo.com>
2016-11-18 10:03:07 -05:00
Brad King 236d6244a0 Android: Always set CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION
When this variable is not set by the user or toolchain file, set it to
the default selected.  This will be useful for client code that needs to
pass the value to an external tool that needs to find the same toolchain
in the NDK.  Leave it empty for a standalone toolchain.

Suggested-by: Ruslan Baratov <ruslan_baratov@yahoo.com>
2016-11-18 10:02:57 -05:00
Brad King c555eca9ba Merge branch 'doc-cmake-qt-fixes' into release 2016-11-02 08:52:23 -04:00
Thiago M. de C. Marques 1c52e6511f Help: Update example Qt 5 find_package call to add missing component
Running CMake on it caused the following error:

    error: Target "publisher" links to target "Qt5::DBus" but the target
    was not found.  Perhaps a find_package() call is missing for an
    IMPORTED target, or an ALIAS target is missing?

Add the missing DBus component.
2016-11-02 08:51:57 -04:00
Marcus D. Hanwell 4c802a326b Help: Update example Qt 5 find_package call to use COMPONENTS 2016-11-02 08:51:53 -04:00
Tobias Hunger 42ccbee11c server-mode: Handle generator toolset and platform in handshake 2016-10-28 13:46:15 +02:00
Brad King 9b8dc79cc8 cmake-server: Change message wrapper to avoid ambiguity with content
Change our message wrapper from

    [== CMake Server ==[ ... ]== CMake Server ==]

to

    [== "CMake Server" ==[ ... ]== "CMake Server" ==]

to guarantee that no JSON content can ever contain the ending string
(because it would be encoded as `]== \"CMake Server\" ==]`).
2016-10-24 14:36:13 -04:00
Tobias Hunger 48189697eb Help: Fix cmake-server documentation
Some information was not updated to reflect the latest implementation.

Reported-by: Sylvain Joubert <joubert.sy@gmail.com>
2016-10-21 13:37:10 -04:00
Brad King 9921b2f8c8 Merge topic 'doc-cmake-A-link'
39c898a1 Help: Clarify that `cmake -A` option sets VS IDE target architecture
2016-10-01 08:20:43 -04:00
Brad King b4235b7590 Merge topic 'add-setup-projects-tests-module'
130784e0 AndroidTestUtilities: Add module to help drive Android device tests
2016-10-01 08:20:27 -04:00
Schuyler Kylstra 130784e039 AndroidTestUtilities: Add module to help drive Android device tests
Add a module to manage the data needed for the project tests.  It will
move the test data to the build directory and transfer necessary data to
an Android device if that is enabled.
2016-09-30 13:49:47 -04:00
Brad King 39c898a107 Help: Clarify that `cmake -A` option sets VS IDE target architecture 2016-09-30 11:54:16 -04:00
Tobias Hunger 4e34f04250 server-mode: Watch CMakeLists.txt files
Watch CMakeLists.txt files (and similar) from the Server
2016-09-29 22:34:10 +02:00
Tobias Hunger 262500028c server-mode: Report watched files to client
* Add a command to report watched files and directories to clients.
2016-09-29 21:47:05 +02:00
Tobias Hunger 7b1e60f26e server-mode: Report CMakeCache entries
With this it would be possible to implement something like
cmake-gui using server-mode.
2016-09-28 18:32:55 +02:00
Tobias Hunger 84553a6e70 server-mode: Add command to retrieve build system files
Add a command to retrieve files that are input to cmake itself.
2016-09-28 18:32:54 +02:00
Tobias Hunger ead71873b2 server-mode: Report information relevant for a codemodel
Add "codemodel" command to report information relevant to feed a code
model.
2016-09-28 18:32:54 +02:00
Brad King 19671831cf Help: Update cmake-developer(7) module license docs for new notice 2016-09-27 15:18:08 -04:00
Brad King ded15f26b8 Merge topic 'codelite-organize-by-target'
cbe48879 CodeLite: Optionally use targets to create (sub)project files
2016-09-27 08:22:53 -04:00
Tobias Hunger 890432672b server-mode: Add command to compute the build system 2016-09-26 14:33:12 -04:00
Tobias Hunger 0a8ad6700e server-mode: Add a configure command
Add a command to trigger cmake to configure a project.

Keep this separate from the compute step (added in the next commit)
to faciliate applications like cmake-gui.
2016-09-26 14:32:22 -04:00
Tobias Hunger 544f65f44d server-mode: Set global configuration of cmake via a command
"setGlobalSettings" can be used to change settings reported by
"globalSettings" command.
2016-09-26 14:25:20 -04:00
Tobias Hunger 82104cc7a8 server-mode: Query global configuration of cmake via a command
Add "globalSettings" command that returns:
* Return capability information
* Return currently used generator/extra generator
* Return a range of flags for debug/trace/etc.
2016-09-26 14:23:53 -04:00
Minze Zwerver cbe4887927 CodeLite: Optionally use targets to create (sub)project files
The basic codelite generator creates .project files based on the
`project()` stanza.  Add a `CMAKE_CODELITE_USE_TARGETS` option to use
the targets instead.
2016-09-26 13:40:38 -04:00
Brad King b35568f3f9 Xcode: Add option to set Swift language version
Create a new CMAKE_Swift_LANGUAGE_VERSION variable to specify the
SWIFT_VERSION attribute in a generated Xcode project.  Ideally this
would be a `<LANG>_STANDARD` property but since Swift support is
very minimal we should reserve that property for more complete
treatment later.

Issue: #16326
2016-09-26 08:46:23 -04:00
Tobias Hunger e22d30e25a server-mode: Allow for sending signals
Enable the server to send signals.
2016-09-22 16:30:03 +02:00
Brad King f4475eb92b Merge topic 'test-fixtures'
73f47c9e CTest: Add support for test fixtures
2016-09-22 08:09:55 -04:00
Tobias Hunger 1d601c6cb9 server-mode: Introduce cmServerConnection
Use it to split pipe and stdin/out handling out of cmServer itself.

The server will shut down when it looses its connection to the client.
This has the nice property that a crashing client will cause the server
to terminate as the OS will close the connection on behave of the client.
2016-09-22 08:06:38 -04:00
Tobias Hunger 4fb2b41a58 server-mode: Add debug support
Enable the server to support development with some helper tools:

You can now request debug information with statistics on how
long execution of a command took, how long it took to serialize
the JSON files, and how big the serialized JSON string is.

Also allow to dump results into a file.
2016-09-20 20:52:44 +02:00
Tobias Hunger 537efe0561 server-mode: Report Messages from cmake to clients
Pass messages sent from cmake via Error(...) or Message(...) on
to clients.
2016-09-20 20:52:38 +02:00
Craig Scott 73f47c9e46 CTest: Add support for test fixtures
Add new test properties:

* FIXTURES_SETUP
* FIXTURES_CLEANUP
* FIXTURES_REQUIRED

to specify the roles and dependencies of tests providing/using
test fixtures.
2016-09-20 14:37:38 -04:00
Brad King d0be1e15c3 Add directory properties to get source and binary directories
Add SOURCE_DIR and BINARY_DIR directory properties that return the
absolute paths to the corresponding directories.  These correspond
to the target properties of the same names that we already have.
2016-09-19 14:00:50 -04:00
Brad King cbca65826c Add directory property to list buildsystem targets
Add a BUILDSYSTEM_TARGETS property to allow project code to traverse
the list of its own targets in a given directory.
2016-09-19 14:00:32 -04:00
Brad King 7a4b8d0dc2 Add a directory property to list subdirectories
Add a SUBDIRECTORIES directory property to allow project code to
traverse the directory structure of itself as CMake sees it.
2016-09-19 13:59:43 -04:00
Tobias Hunger 5adde4e79d cmake-server: Add documentation 2016-09-19 08:57: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
Brad King a6d3f5418c Help: Clarify documentation of CMAKE_COMPILER_IS_GNU{CC,CXX,G77}
Closes: #16308
2016-09-14 10:09:39 -04:00
Brad King bdc679a8ae VS15: Add Visual Studio 15 generator
Call the generator "Visual Studio 15" without any year because the
preview version of VS 15 does not provide a year in the product name.

Copy cmGlobalVisualStudio14Generator to cmGlobalVisualStudio15Generator
and update version numbers accordingly.  Add the VS15 enumeration value.
Note that we do not need to add a MSVC15 variable or v150 toolset
because Visual Studio 15 comes with an updated version of the v140
toolset and remains ABI-compatible.

Teach tests VSExternalInclude, RunCMake.GeneratorPlatform, and
RunCMake.GeneratorToolset to treat VS 15 as they do VS 10-14.

Closes: #16143
2016-09-07 15:49:08 -04:00
Ruslan Baratov 3e8615ef9c Document XCODE variable 2016-08-31 14:17:51 +03:00
Brad King 96de37092a Merge topic 'android-platform-modules'
7b637ebd Android: Add `ANDROID` variable to indicate the target
c2f561e5 Android: Add test cases covering use of the NDK and standalone toolchains
6b84df8d Help: Document cross compiling for Android
d7d40830 Android: Select the STL type for NDK builds
b22294bc Android: Populate compiler flags for current ABI
b6a3102a Android: Add a CMAKE_BUILD_TYPE default
d1e3cec2 Android: Add Clang -target option for current ABI
504db72d Android: Add placeholders for compiler/abi-specific settings
fa632578 Android: Avoid interfering with common pre-existing toolchain files
6299693f Android: Search for NDK and standalone toolchain in more places
29b51379 Android: Detect and save a standalone toolchain without the NDK
7d9b49fb Android: Detect settings from the CMAKE_SYSROOT if it is set
4389664a Android: Detect and save a toolchain from the NDK
328191f6 Android: Set CMAKE_SYSROOT automatically
9e032304 Android: Detect and save the architecture, ABI, and processor
fde59c4d Android: Detect and save the API level
...
2016-08-24 09:45:50 -04:00
Brad King 7b637ebdc9 Android: Add `ANDROID` variable to indicate the target
Allow projects to use `if(ANDROID)` to condition their Android-specific
code paths.
2016-08-23 13:10:51 -04:00
Brad King 6b84df8da9 Help: Document cross compiling for Android
CMake now supports cross compiling for Android using the NDK or a
standalone toolchain.  Document the associated variables and how how to
write toolchain files for Android.
2016-08-23 12:53:10 -04:00
Tobias Hunger 49ad7f9af8 cmake: Add `cmake -E capabilities` mode
Add `cmake -E capabilities` to report on generators, cmake version and
possibly other static capabilities of cmake.

Closes: #15462
2016-08-16 13:45:05 -04:00
Chuck Atkins 02d177c9cc Add additional <= and >= comparison operators
This adds the LESS_EQUAL, GREATER_EQUAL, and associated STR and VERSION
equivalents to use the combined <= and >= functionality.
2016-08-09 09:30:34 -04:00
Brad King 8a98cf6432 Honor CMAKE_*_LINKER_FLAGS[_<CONFIG>]_INIT set in toolchain files
Document these variables.

Change our convention for setting these variables from:

    set(CMAKE_EXE_LINKER_FLAGS_INIT "...")

to

    string(APPEND CMAKE_EXE_LINKER_FLAGS_INIT " ...")

so that any value previously set by a toolchain file will be used.
2016-07-14 15:47:32 -04:00
Brad King 291e41855c Merge topic 'findicu'
e3bff7b3 Help: Add notes for topic 'findicu'
4a63be15 FindICU: New module
2016-07-13 09:26:55 -04:00
Roger Leigh 4a63be15dd FindICU: New module 2016-07-13 09:15:16 -04:00
Felix Geyer 566086187f Fix typos. 2016-07-10 11:05:56 +02:00
Brad King 0ca8f3e699 Merge topic 'toolchain-flag-init'
a66004be Honor CMAKE_<LANG>_FLAGS[_<CONFIG>]_INIT set in toolchain files
cdde77e5 OpenWatcom: Partially modernize platform information modules
f9dbe22c Intel: Do not use GNU-like flags on Windows
5a3ed0d7 Intel: Do not use MSVC-like flags for Fortran
2016-07-07 09:02:23 -04:00