Commit Graph

338 Commits

Author SHA1 Message Date
Steven Newbury
462cf25427 Add support for x32-abi
Detect x32-abi through CMakeCompilerABI infrastruture and use this
information at runtime to determine the correct library paths with
`FIND_LIBRARY_USE_LIBX32_PATHS`.

Fixes: #15994
2017-03-07 15:22:55 -05:00
Christian Schmidbauer
503f25d490 find_library: Allow custom lib suffix be used as find path
Add a new `CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX` variable to allow use
of a custom suffix on `lib` directory names.  This is a more general
option than that added by commit v3.7.0-rc1~504^2 (Teach find_library
and find_package to search lib32 paths, 2016-06-10).  It allows the find
path to be more deterministic on custom setups.

See discussion in #10287 and #15994.
2017-03-01 09:49:42 -05:00
Brad King
07c3380a6e execute_process: Restore no-decoding default behavior
Since commit v3.8.0-rc1~232^2 (execute_process: Add ENCODING option for
Windows child process output, 2016-11-23) we decode child process output
using the console's active codepage by default.  This differs from
previous versions of CMake and is therefore incompatible.  Changing this
default will require a policy, so for now revert the default behavior
back to performing no decoding.

Reported-by: Nils Gladitz <nilsgladitz@gmail.com>
2017-02-13 13:53:17 -05:00
Brad King
4168bc184e Help: Improve execute_process ENCODING option documentation
Spell out the options in a definition list and document each one.
2017-02-13 13:53:17 -05:00
Brad King
30abf145fd Help: Fix cmake code block warnings produced by Sphinx 1.4
Some of our "cmake" code blocks do not use fully valid CMake syntax
because they have placeholders for human reference.  Sphinx has
never been able to properly lex and highlight these, but now warns.
Fix each block's syntax or change to a non-cmake block as appropriate.
2017-02-10 10:43:30 -05:00
Brad King
f012a95836 Merge topic '16432-static-frameworks'
071f8e78 Apple: Add support for static frameworks
d525754e Xcode: Refactor RunCMake.Framework test to prepare for static frameworks
45405f00 Xcode: Ignore Xcode project warning until issue is fixed
50e1c105 Makefile: For static libraries remove only the "real" lib before creating
8643ca75 Makefile: Re-order list of files to clean
2017-01-31 09:04:16 -05:00
Gregor Jasny
071f8e78dd Apple: Add support for static frameworks
Closes: #16432
2017-01-31 08:59:15 -05:00
Bernhard M. Wiedemann
6c54f7b365 string: Teach TIMESTAMP to treat %% as %
This encoding is documented by `strptime`.
2017-01-27 09:25:37 -05:00
Bernhard M. Wiedemann
243aed525a cmTimestamp: Support SOURCE_DATE_EPOCH to override current time
See https://reproducible-builds.org/ for why this is good and
https://reproducible-builds.org/specs/source-date-epoch/ for the
definition of this variable.
2017-01-26 10:21:41 -05:00
Brad King
22d240184c Merge topic 'cdash_upload_retry'
05ed82b1 ctest_submit: Update documentation for CDash upload retries
0ce7643a ctest_submit: improve handling of QUIET option
5614a5cd ctest_submit: Allow RETRY_COUNT for CDASH_UPLOAD
2017-01-20 11:54:28 -05:00
Zack Galbreath
05ed82b1d2 ctest_submit: Update documentation for CDash upload retries 2017-01-20 11:37:27 -05:00
Brad King
aa63ab6d3e Merge topic 'expand_custom_commands'
7c8ab7dd add_custom_{command,target}: Add COMMAND_EXPAND_LISTS option
2017-01-17 09:04:50 -05:00
Mateusz Janek
b42330be21 source_group: Add options create groups matching directory tree
Add `TREE` and `PREFIX` arguments to enable this behavior.
2017-01-16 10:52:48 -05:00
Ed Branch
7c8ab7ddc8 add_custom_{command,target}: Add COMMAND_EXPAND_LISTS option
This option allows lists generated by generator expressions to be expanded.

Closes: #15935
2017-01-13 20:02:16 -06:00
Robert Maynard
1371eec4c3 try_compile: extend CMP0067 to honor language standards for CUDA. 2016-12-12 14:39:32 -05:00
Brad King
f72ba42b7c try_compile: Add policy CMP0067 to honor language standards
Projects use `try_compile` to check if they will be able to compile some
particular source code.  When a language standard variable like
`CMAKE_CXX_STANDARD` is set, then the project intends to compile source
code using a compiler mode for that standard.  Therefore it makes sense
for `try_compile` to use that standard in the test project too.

Unfortunately this was not done when support for the
`CMAKE_CXX_STANDARD` variable was first implemented.  Add a policy to
introduce the improved behavior in a compatible way.

Closes: #16456
2016-12-06 08:58:42 -05:00
Brad King
45aa03b97a try_compile: Add options to specify language standards
Give `try_compile` callers a way to control the `CXX_STANDARD`,
`CXX_STANDARD_REQUIRED`, and `CXX_EXTENSIONS` properties of the
generated test target (or the `C` equivalents) in order to compile a
test source for a particular language standard.

Issue: #16456
2016-12-06 08:58:41 -05:00
Dāvis Mosāns
2ed473b3b8 execute_process: Add ENCODING option for Windows child process output
Different applications can use different output encodings.
2016-11-30 09:06:51 -05:00
Brad King
b6f1b1741d Merge topic 'add-SHA-3'
f636d1e7 Help: Add notes for topic 'add-SHA-3'
cb5dba8e Tests: Add SHA-3 algorithm coverage to CPack checksum test
a9fa6099 ExternalProject: Add support for SHA-3 algorithms
b4ffd26f ExternalData: Add support for SHA-3 algorithms
60939702 file: Add support for SHA-3 algorithms
92f95aed string: Add support for SHA-3 algorithms
c326209f cmCryptoHash: Add support for SHA-3 algorithms
979e8ba6 Help: De-duplicate and spell out supported hash algorithms
7a79f7e3 librhash: Activate SHA-3 implementation
87584b5e Merge branch 'upstream-librhash' into add-SHA-3
7fcbd47e librhash 2016-11-06 (de79828d)
c50c32a3 librhash: Update import script to add SHA-3 implementation
2016-11-15 09:26:16 -05:00
Brad King
a0b159685e Merge topic 'vs_targets_file_as_library'
883bd34a VS: Treat libraries ending in `.targets` as msbuild imports
2016-11-11 10:44:20 -05:00
Brad King
92f95aede9 string: Add support for SHA-3 algorithms 2016-11-10 16:40:43 -05:00
Brad King
979e8ba6c6 Help: De-duplicate and spell out supported hash algorithms
Spell out the supported algorithms in a definition list in the
`string(<HASH>)` command documentation.  Revise the `file(<HASH>)`
command and CPack module documentation to reference it instead of
duplicating the list.
2016-11-10 16:07:46 -05:00
Soji Yamakawa
883bd34a1f VS: Treat libraries ending in .targets as msbuild imports
Generate `<Import Project="..." .../>` to import the `.targets` files
into `.vcxproj` files.

Closes: #16340
2016-11-09 16:19:07 -05:00
Betsy McPhail
3a523eec78 ctest_memcheck: Add DEFECT_COUNT option to capture defect count 2016-11-09 15:34:07 -05:00
Christian Fetzer
311d0376e2 Help: Document error behavior of file(REMOVE/REMOVE_RECURSE)
Clarifies that there is no need to surround file(REMOVE/REMOVE_RECURSE)
calls by `if(EXISTS)` as non existent files are silently ignored.
2016-11-01 10:25:18 +01:00
Christian Fetzer
77e78af1a2 Help: Clarify how to run sequential commands in execute_process
The execute_process command starts all commands in parallel (in order
for the piping to work). Mention this explicitly and also add a note
about how to execute commands sequentially.
2016-11-01 10:25:18 +01:00
Brad King
5fdee6d402 Merge topic 'doc-math-EXPR'
c05d9b05 Help: Fix math(EXPR) documentation formatting
2016-10-17 10:14:59 -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