Commit Graph

312 Commits

Author SHA1 Message Date
Brad King d657fd7b35 Merge branch 'doc-math-EXPR' into release 2016-10-14 15:47:50 -04:00
Brad King c05d9b0569 Help: Fix math(EXPR) documentation formatting 2016-10-14 15:47:30 -04:00
Brad King 78b00f1d10 Help: Clarify `ctest_*` APPEND option behavior
Explicitly state that this marks the `.xml` to tell the dashboard
server to append it to previously submitted results and that it
does not cause results to be appended to the `.xml` file.
2016-10-14 14:43:46 -04:00
John Beard 07bb27240f Help: Clarify treatment of link flags in target_link_libraries 2016-10-03 08:53:43 -04:00
Brad King 2c2ffd3874 Merge topic 'ctest-capture-error'
adf1e32f Help: Add notes for topic 'ctest-capture-error'
d328dc68 CTest: Add CAPTURE_CMAKE_ERROR val to `ctest_*` commands
9ac2e189 ctest_coverage: If gcov is not found just warn, not error
2016-09-21 08:47:51 -04:00
Bill Hoffman d328dc6853 CTest: Add CAPTURE_CMAKE_ERROR val to `ctest_*` commands
If a `ctest_*` command has CAPTURE_CMAKE_ERROR then any errors generated
by cmake during that command will cause the value to be assigned `-1`.
This will prevent a `ctest -S` script from returning non-zero unless the
script explicitly calls `message(FATAL_ERROR)`.
2016-09-20 13:14:20 -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
Ruslan Baratov 8f6cb36695 file(DOWNLOAD|UPLOAD): Add HTTPHEADER suboption 2016-09-15 21:41:39 +03:00
Brad King c3507b5496 Help: Clarify wording of include() for builtin module directories
Issue: #16312
2016-09-15 14:02:25 -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 171ea5d3cf Merge topic 'file-curl-userpw'
abeb42f1 Help: Add notes for topic 'file-curl-userpw'
e5ba1041 file(DOWNLOAD|UPLOAD): Add 'USERPWD' suboption
2016-09-14 08:56:22 -04:00
Brad King b93623550d Merge topic 'add_androidmk_generator'
42ce9f1e Add support for creating prebuilt Android.mk files
d5257063 Export: Virtualize file generation step helpers
f81b9475 Export: Factor out file generation steps into helpers
2016-09-14 08:56:19 -04:00
Ruslan Baratov e5ba1041be file(DOWNLOAD|UPLOAD): Add 'USERPWD' suboption 2016-09-13 20:24:12 +03:00
Bill Hoffman 42ce9f1e71 Add support for creating prebuilt Android.mk files
Add options to the `install()` and `export()` commands to export the
targets we build into Android.mk files that reference them as prebuilt
libraries with associated usage requirements (compile definitions,
include directories, link libraries).  This will allow CMake-built
projects to be imported into projects using the Android NDK build
system.

Closes: #15562
2016-09-13 12:47:43 -04:00
Brad King 994e98bf41 Merge topic 'timestamp-names'
410add40 Help: Add notes for topic 'timestamp-names'
751f7b52 string(TIMESTAMP ...): add '%a' and '%b' format specifiers
2016-09-13 11:40:47 -04:00
Ruslan Baratov 751f7b5255 string(TIMESTAMP ...): add '%a' and '%b' format specifiers
%b: Abbreviated month name (e.g. Oct).
%a: Abbreviated weekday name (e.g. Fri).
2016-09-12 19:07:38 +03:00
James Touton 4f349a8656 Help: Fix formatting in separate_arguments documentation
Make backslashes visible in the text.  Rename VARIABLE to <var> in
second signature for consistency with the first signature.  Add link to
referenced MSDN documentation.
2016-09-12 11:53:21 -04:00
Bill Hoffman cb299acc27 cmake_parse_arguments: Add option to read arguments from ARGC/ARGV#
The `ARGC`/`ARGV#` variables in function scope hold the original
arguments with no ;-list flattening.  Add a way for functions to
cleanly parse arguments that may contain `;`.  This also avoids
extra copying of the arguments.

Co-Author: Brad King <brad.king@kitware.com>
2016-09-08 11:33:46 -04:00
Kulla Christoph 048d1adb4e add_custom_command: Add DEPFILE option for Ninja
Provide a way for custom commands to inform the ninja build tool about
their implicit dependencies.  For now simply make use of the option an
error on other generators.

Closes: #15479
2016-08-30 09:05:18 -04:00
Brad King ccddb454b8 Merge topic 'extend-find-package-search-path'
828d6c13 find_package: Extend search path for combined Windows/UNIX convention
ff5c89de Help: Widen find_package search path table
2016-08-24 09:45:47 -04:00
Silvio Traversaro 828d6c137d find_package: Extend search path for combined Windows/UNIX convention
Find packages that install their cmake package configuration files in
`lib/cmake/<name>` when they are installed in the default Windows
CMAKE_INSTALL_PREFIX, `C:/Program Files/<name>`.

Closes: #16212
2016-08-24 09:40:25 -04:00
Silvio Traversaro ff5c89de0c Help: Widen find_package search path table
Make room for additional longer entries.
2016-08-23 13:28:42 -04:00
Brad King 15cc50fbb5 Help: Clarify get_cmake_property command documentation
Closes: #13810, #16258
2016-08-23 11:14:09 -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 1bafa0b3f5 Merge topic 'parent-scope-docs'
42fe7d21 Help: clarify PARENT_SCOPE behavior
2016-06-13 15:19:45 -04:00
Ben Boeckel 42fe7d2150 Help: clarify PARENT_SCOPE behavior
Fixes #15093.
2016-06-13 09:55:17 -04:00
Daniel Scharrer 896ad251de Teach find_library and find_package to search lib32 paths (#11260)
Add a ``FIND_LIBRARY_USE_LIB32_PATHS`` global property analogous to the
``FIND_LIBRARY_USE_LIB64_PATHS`` property.  This helps find commands on
multilib systems that use ``lib32`` directories and either do not have
``lib`` symlinks or point ``lib`` to ``lib64``.
2016-06-10 11:09:16 -04:00
Brad King 558e4d1ed6 Help: Document ctest_update branch following behavior 2016-06-08 09:53:13 -04:00
Brad King d256ba078a try_compile: Optionally forward custom platform variables to test project
Add a `CMAKE_TRY_COMPILE_PLATFORM_VARIABLES` variable to specify a list
of custom variables to be forwarded to a `try_compile` test project.
This will be useful for platform information modules or toolchain files
to forward some platform-specific set of variables from the host project
(perhaps set in its cache) to the test project so that it can build the
same way.
2016-05-25 09:36:19 -04:00
Reiner Herrmann edcccde7d6 file: Sort GLOB results to make it deterministic (#14491)
Even though the `file(GLOB)` documentation specifically warns against
using it to collect a list of source files, projects often do it anyway.
Since it uses `readdir()`, the list of files will be unsorted.
This list is often passed directly to add_executable / add_library.
Linking binaries with an unsorted list will make it unreproducible,
which means that the produced binary will differ depending on the
unpredictable `readdir()` order.

To solve those reproducibility issues in a lot of programs (which don't
explicitly `list(SORT)` the list manually), sort the resulting list of
the `file(GLOB)` command.

A more detailed rationale about reproducible builds is available
[here](https://reproducible-builds.org/).
2016-05-17 10:12:11 -04:00
Brad King b30b32a493 Drop find_(library|file|path) prefixes from PATH on non-Windows
Since commit v3.3.0-rc1~430^2 (Teach find_(library|file|path) to get
prefixes from PATH, 2015-02-18) we search in <prefix>/include and
<prefix>/lib directories for prefixes with bin directories in the PATH
environment variable.  The motivation was to support MSYS, MinGW and
similar Windows platforms in their default environments automatically.
At the time this behavior was thought to be worthwhile in general.

Suggested-by: Chuck Atkins <chuck.atkins@kitware.com>
2016-05-09 12:58:08 -04:00
Jean-Christophe Fillion-Robin 8c2cedc624 CustomCommandGenerator: Add support for CROSSCOMPILING_EMULATOR
Teach the `add_custom_command` and `add_custom_target' commands to
substitute argv0 with the crosscompiling emulator if it is a target with
the `CROSSCOMPILING_EMULATOR` property set.
2016-05-09 08:56:27 -04:00
Felix Geyer 49e82c15d5 Fix spelling typos in comments and documentation (#16037)
The Debian package checker tool (lintian) detected several typos in
CMake.
2016-03-29 14:31:02 -04:00
Brad King 1dc8486b40 Help: Organize and clarify `cmake_minimum_required` documentation
State more explicitly that `cmake_policy(VERSION)` is implied and
explain the effects it has.
2016-03-23 14:39:48 -04:00
Brad King b42866a34a Drop Visual Studio 6 generator
This generator has been deprecated since CMake 3.3.  Remove it.
Update documentation, modules, and tests to drop content specific
to this generator.
2016-03-09 09:42:18 -05:00
Brad King 7f1bd9fe69 try_compile: Add option to control type of target
Create a `CMAKE_TRY_COMPILE_TARGET_TYPE` option to specify use
of `add_library(... STATIC ...)` for the generated test project.
This will be useful for cross-compiling toolchains that cannot
link a binary without custom flags or scripts.
2016-02-19 14:07:38 -05:00
Brad King c387325d4a Merge topic 'unix-timestamps'
6727270b CMake: Extend TIMESTAMP sub-commands with new unix time format specifier
2016-02-19 09:47:39 -05:00
Jose-Luis Blanco-Claraco 6727270b75 CMake: Extend TIMESTAMP sub-commands with new unix time format specifier
The new `%s` format specifier is substituted by file()/string()
`TIMESTAMP` sub-commands with the number of seconds since unix-epoch
(1970-01-01 00:00:00 UTC).

Co-Author: Nils Gladitz <nilsgladitz@gmail.com>
2016-02-18 10:30:13 -05:00
Brad King c978223c85 Help: Clarify install(TARGETS) INCLUDES DESTINATION option
The option does not actually participate in argument groups like the
others because it does not actually install anything.  Fix the order
in the documentation accordingly.

Reported-by: Daniel Wirtz <daniel.wirtz@simtech.uni-stuttgart.de>
2016-02-17 10:14:54 -05:00
Brad King 3b8c0fbfd7 Merge topic 'install-EXCLUDE_FROM_ALL'
586e56d0 Help: Add notes for topic 'install-EXCLUDE_FROM_ALL'
d321c196 Tests: Add cases for install() command EXCLUDE_FROM_ALL option
18ce97c4 install: Add EXCLUDE_FROM_ALL option (#14921)
2016-02-09 10:10:15 -05:00
Brad King 2619317c66 Merge topic 'fix-doc-typos'
a3b91d16 Help: Fix command specification for cmake_minimum_required
d8c90800 Help: Fix mistake in cmake-buildsystem(7) example
2016-02-08 10:33:02 -05:00
Horst Kronstorfer a3b91d1640 Help: Fix command specification for cmake_minimum_required
Implementation indicates that at least two components of VERSION must
be specified (see Source/cmCMakeMinimumRequired.cxx.) Therefore the
minor version is not optional.
2016-02-08 09:52:56 -05:00
Nick Lewis 18ce97c4a2 install: Add EXCLUDE_FROM_ALL option (#14921)
Let us take an example of a project that has some tests in a component
that need to be installed into a dedicated test package.  The user
expectation is that the result could be achieved by typing the
following:

    make
    make tests
    make install
    DESTDIR=/testpkgs make install-tests

However this results in test components in the default installation as
well as the testpkg.

Add an EXCLUDE_FROM_ALL option to the install() command to tell it that
the installation rule should not be included unless its component is
explicitly specified for installation.
2016-02-04 09:16:56 -05:00
Ashley Whetter 0205f882ae list: Add FILTER subcommand (#3986)
Create a `list(FILTER)` command to filter lists by regular expression.
2016-02-03 11:13:17 -05:00
Bartosz Kosiorek 4d53e0a75e Help: Clarify `add_custom_command(TARGET)` scope (#15681) 2016-01-28 10:13:27 -05:00
Bartosz Kosiorek 63c5808f93 Help: Clarify scope of `if(TARGET)` expression 2016-01-28 10:13:17 -05:00
Bartosz Kosiorek a336e438e2 Help: Improve markup in `if` command documentation 2016-01-28 10:12:51 -05:00
Bartosz Kosiorek 88968265e2 Help: Improve markup in `get_target_property` documentation 2016-01-28 10:12:50 -05:00
Yves Frederix 630c8aa843 install: Allow generator expressions in DIRECTORY
Teach install(DIRECTORY) to support generator expressions in the list
of directories, much like install(FILES) already supports.
2016-01-13 09:02:06 -05:00