Commit Graph

3672 Commits

Author SHA1 Message Date
Robert Maynard
fa203ee323 Tutorial: Improve Step 10 generator expression example.
Use compiler flags and standard levels as the compelling argument
for using generator expressions and interface libraries
2019-07-25 07:30:13 -04:00
Brad King
6e0d92cc53 Merge topic 'clang-gnulike-support'
a4657ef670 Merge branch 'backport-clang-gnulike-support' into clang-gnulike-support
161b33f12b Help/guide/tutorial: Revert "require C++14 for the Tutorial"
4f15a6a5c2 Tests: Revert "require C++14 for the Tutorial"
5cfc39127e Merge branch 'backport-clang-gnulike-support' into clang-gnulike-support
d50b31be35 Clang: For MSVC ABI do not use modes older than C++14

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3592
2019-07-25 07:17:22 -04:00
Brad King
161b33f12b Help/guide/tutorial: Revert "require C++14 for the Tutorial"
Revert the changes from commit a2a90f41e3 (Tests: require C++14 for the
Tutorial, 2019-03-21, v3.15.0-rc1~41^2~2) for the content in its new
home.  In commit d50b31be35 (Clang: For MSVC ABI do not use modes older
than C++14, 2019-07-23) we fixed the C++ standard selection for GNU-like
Clang with the MSVC ABI so the test code itself no longer needs to do
it.  In particular, changing the tests in this way broke the tutorial's
narrative.
2019-07-24 08:04:20 -04:00
Robert Maynard
609fe39043 FindPackage: Support NO_[]_PATH global call options 2019-07-22 17:17:02 -04:00
Brad King
c1cb4945f3 Merge topic 'tutorial_reference_cmake_install_command'
c94e62c07e Tutorial: Updated to reference using cmake --install

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3572
2019-07-22 08:20:34 -04:00
Brad King
303cf2791a Merge topic 'doc-string-multibyte'
b97673f54b Help: Add note to each string() subcommand that assumes ASCII input
26cd64d977 Help: Fix language and formatting inconsistencies for string() command

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3559
2019-07-22 08:19:39 -04:00
Craig Scott
9e42075498 Merge topic 'cpack-install-scripts'
5f96601675 CPack: Introduce CPACK_INSTALL_SCRIPTS variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3531
2019-07-22 07:04:00 -04:00
Craig Scott
f4131e4e1b Merge topic 'feature/message-indent'
5f6fd917a3 message(): Control indentation via CMAKE_MESSAGE_INDENT

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3464
2019-07-22 07:02:50 -04:00
Alex Turbov
5f96601675 CPack: Introduce CPACK_INSTALL_SCRIPTS variable
The singular name `CPACK_INSTALL_SCRIPT` has existed but was not linked
from the CPack documentation.  Also, it supported multiple values and
should have had a plural name.  Add a plural-named alternative now.
If both `CPACK_INSTALL_SCRIPTS` and `CPACK_INSTALL_SCRIPT` are set then
ignore the latter with a warning.

Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
2019-07-22 02:01:44 +03:00
Alex Turbov
5f6fd917a3 message(): Control indentation via CMAKE_MESSAGE_INDENT 2019-07-21 10:19:30 +10:00
Robert Maynard
c94e62c07e Tutorial: Updated to reference using cmake --install
This is preferred over using `make install` as it allows for control
over the install location, configuration, and component.
2019-07-19 14:38:05 -04:00
Kyle Edwards
16bb46eaf3 Merge topic 'skip_regular_expression'
5dbd9c8583 Vim: Add SKIP_REGULAR_EXPRESSION test property to vim syntax file
407dd1a910 Help: Add documentation for SKIP_REGULAR_EXPRESSION test property
d7955d4e5d Tests: Create test for SKIP_REGULAR_EXPRESSION test property
4f1dec86a5 CTest: Add SKIP_REGULAR_EXPRESSION test property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3570
2019-07-19 12:14:27 -04:00
Brad King
dcdeade5ee Merge topic 'msvc-runtime-library-doc'
282d9f3168 MSVC: Document behavior when MSVC_RUNTIME_LIBRARY is not set

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3573
2019-07-19 11:57:10 -04:00
Brad King
282d9f3168 MSVC: Document behavior when MSVC_RUNTIME_LIBRARY is not set
By default `CMAKE_MSVC_RUNTIME_LIBRARY` is not set.  Document the
default runtime library selection in that case.  We already test it.
2019-07-19 11:17:32 -04:00
Craig Scott
b97673f54b Help: Add note to each string() subcommand that assumes ASCII input
Fixes: #19465
2019-07-19 20:47:21 +10:00
Craig Scott
26cd64d977 Help: Fix language and formatting inconsistencies for string() command 2019-07-19 20:47:21 +10:00
Gabor Bencze
407dd1a910 Help: Add documentation for SKIP_REGULAR_EXPRESSION test property 2019-07-18 15:45:09 -04:00
Brad King
3fb3157dae AIX: Do not enable runtime linking by default anymore
We've long created shared objects on AIX using the linker's `-G` option
(also offered by the XL front-end).  The `-G` option implies `-brtl` and
enables runtime linking.  This has been largely unnecessary because we
provide all dependencies on the link line and both XL and GNU compilers
offer builtin behavior to export symbols.  Since commit 0f150b69d3 (AIX:
Explicitly compute shared object exports for both XL and GNU,
2019-07-11) we compute exports explicitly and consistently.
Therefore runtime linking is no longer necessary for shared objects.

We've also long created executables on AIX using the linker's `-brtl`
option to enable runtime linking in case they load plugins at runtime.
Since commit 9f5c2040bf (AIX: Explicitly compute executable exports for
both XL and GNU, 2019-07-12) and commit 2fa920c0cd (AIX: Create import
library for executables with exports, 2019-07-16) we now provide the
linker enough information to fully resolve symbols in plugins up front.
Therefore runtime linking is no longer necessary for executables.

Drop use of `-G` for creating shared objects and use the XL `-qmkshrobj`
and GCC `-shared` options instead.  Both invoke the linker with the
`-bM:SRE -bnoentry` options to create a shared object without runtime
linking enabled.  Also drop use of `-brtl` for creating executables.

Issue: #19163
2019-07-17 14:21:37 -04:00
Brad King
44a6468304 Merge topic 'aix-exe-implib'
2fa920c0cd AIX: Create import library for executables with exports

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3561
2019-07-17 09:16:07 -04:00
Brad King
74ad28fa6a Merge topic 'cmake-qch-no-version-in-filename'
0518e675ea CMake.qch: Don't include the version in the file name

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3558
2019-07-17 07:49:12 -04:00
Craig Scott
0518e675ea CMake.qch: Don't include the version in the file name
Fixes: #19374
2019-07-17 21:35:12 +10:00
Brad King
3143e9ffc5 Merge topic 'project-version-0'
0ba5891ead project: Keep leading `0` in PROJECT_VERSION components
5f84669806 Tests: Factor out RunCMake.project helper macro into module
b1f387a7ea Refactor: Use raw string literals instead of escaping
41b85968d8 Refactor: Use initializer lists instead of `push_back` series
45e85dd2b2 Refactor: Add some `const` to vars
90f91e4d21 Refactor: Replace a "magic" number w/ a named constant
638383c38f Refactor: Eliminate one-time-used variables
9b6a53292f Refactor: Eliminate `sep` from the loop

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3517
2019-07-17 07:28:05 -04:00
Brad King
2fa920c0cd AIX: Create import library for executables with exports
On AIX, plugins meant to be loaded into executables via `dlopen` must be
linked with access to a list of symbols exported from the executable in
order to use them (when not using runtime linking).  The AIX linker
supports specifying this list as an "import file" passed on the command
line either via the `-bI:...` option or (with a leading `#! .` line) as
a normal input file like any other library file.

The linker import file plays the same role on AIX as import libraries do
on Windows.  Teach CMake to enable its import library abstraction on AIX
for executables with the `ENABLE_EXPORTS` target property set.  Teach
our internal `ExportImportList` script to optionally generate a leading
`#! .` line at the top of the generated export/import list.  Update our
rule for linking an executable with exports to generate a public-facing
"import library" implemented as an AIX linker import file.

With this approach, our existing infrastructure for handling import
libraries on Windows will now work for AIX linker import files too:

* Plugins that link to their executable's symbols will be automatically
  linked using the import file on the command line.

* The executable's import file will be (optionally) installed and
  exported for use in linking externally-built plugins.

This will allow executables and their plugins to build even if we later
turn off runtime linking.

Issue: #19163
2019-07-16 14:15:13 -04:00
Brad King
84ddeb8fa5 Help: Clarify ENABLE_EXPORTS per-platform link behavior
Spell out the behavior on each platform in a bullet list.
2019-07-16 10:09:40 -04:00
Brad King
e29ccfcafb Help: Simplify CMAKE_ENABLE_EXPORTS documentation
In real projects the variable form should rarely be used because the
decision to export symbols from an executable is very specific.
Remove its main description, which duplicates the `ENABLE_EXPORTS`
target property, and simply reference the property instead.
2019-07-16 10:09:06 -04:00
Alex Turbov
0ba5891ead project: Keep leading 0 in PROJECT_VERSION components
Introduce CMake policy `CMP0096` to make `project()` keep leading zeros
in version components.  As a side effect, it now allows really long
version numbers.

Fixes: #19421
Co-Author: Brad King <brad.king@kitware.com>
2019-07-16 07:48:40 -04:00
Brad King
0964a96972 Merge topic 'FindBISON-CMP0088-SourcePath'
f84d2045e9 FindBISON: Fix CMP0088 NEW behavior for non-absolute input paths

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3549
2019-07-15 07:34:01 -04:00
Brad King
7242d81269 Merge branch 'FindBISON-CMP0088-SourcePath' into release-3.15
Merge-request: !3549
2019-07-12 16:21:26 -04:00
Brian Carlson
f84d2045e9 FindBISON: Fix CMP0088 NEW behavior for non-absolute input paths
Now that the working directory is in the build tree, relative input
paths must be converted to an absolute path to remain relative to the
source directory.

Fixes: #19472
2019-07-12 16:20:08 -04:00
Brad King
8212b0880d Merge topic 'cmake-e-true-false'
b8828ecbba cmake -E: Add true and false commands

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3542
2019-07-12 16:12:20 -04:00
Brad King
82a72bfc1b Merge topic 'ctest_make_program__propagated_to_cmake_configure_pass'
cd681f1f41 ctest: propagate make program to cmake

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3483
2019-07-12 16:10:32 -04:00
Kyle Edwards
b8828ecbba cmake -E: Add true and false commands 2019-07-11 13:41:30 -04:00
Brad King
01a8b89f29 Merge topic 'eclipse-resource-encoding'
09c1991895 Eclipse: Add option to set the resource encoding

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3525
2019-07-11 08:49:34 -04:00
Robert Maynard
cd681f1f41 ctest: propagate make program to cmake 2019-07-11 08:28:35 -04:00
Craig Scott
24722b7860 Merge topic 'docs-file-GLOB-case-sensitivity'
c65f296960 Help: Mention file(GLOB)'s case-sensitivity

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3516
2019-07-11 06:07:26 -04:00
Steve Mokris
c65f296960 Help: Mention file(GLOB)'s case-sensitivity
Based on the KWSYS_GLOB_CASE_INDEPENDENT flag in `Source/kwsys/Glob.cxx`.
2019-07-10 09:29:29 -04:00
Craig Scott
3b62d5e677 Merge topic 'docs-message-cmake-gui'
42a9e61056 message() help: Clarify how logs are displayed in various tools

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3523
2019-07-10 06:44:17 -04:00
Frank Dana
42a9e61056 message() help: Clarify how logs are displayed in various tools 2019-07-10 09:40:11 +10:00
Craig Scott
f7eb765012 Merge topic 'add_cmake_find_use_package_registry'
447a96f590 vim: Update cmake.vim to include the CMAKE_FIND_USE variables
1d00ba9ccf Find: find_package prefers variable CMAKE_FIND_USE_REGISTRY
704e3a2ca8 Find: Correct spelling and layout issues in CMAKE_FIND_USE_ docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3487
2019-07-09 19:32:54 -04:00
Martin Gerhardy
09c1991895 Eclipse: Add option to set the resource encoding 2019-07-09 13:34:29 -04:00
Robert Maynard
1d00ba9ccf Find: find_package prefers variable CMAKE_FIND_USE_REGISTRY
CMake's find control flags should all have a consistent name.
To make this happen we are introducing `CMAKE_FIND_USE_REGISTRY`
and deprecating `CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY`.
2019-07-09 09:38:35 -04:00
Robert Maynard
704e3a2ca8 Find: Correct spelling and layout issues in CMAKE_FIND_USE_ docs 2019-07-09 09:37:55 -04:00
Craig Scott
d7673a203c Merge branch 'loglevel-option-case-consistency' into release-3.15
Merge-request: !3521
2019-07-09 22:42:51 +10:00
Craig Scott
2113705c5b Merge topic 'loglevel-option-case-consistency'
14ed40d670 Help: Use consistent levels for cmake --loglevel and message()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3521
2019-07-09 08:40:29 -04:00
Craig Scott
f02ea912ac Merge topic 'doc-SKIP_RETURN_CODE-range'
365ee32db8 Help: Valid range for test property, SKIP_RETURN_CODE, is 0 to 255, inclusive

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3507
2019-07-09 08:37:17 -04:00
Brad King
bf7f5d0a22 Merge topic 'threads-are-good'
08cd7f6a02 Swift: support multithreaded compilation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3506
2019-07-08 11:26:29 -04:00
Craig Scott
14ed40d670 Help: Use consistent levels for cmake --loglevel and message()
The message() command requires uppercase log levels. Even
though the cmake --loglevel option is not case sensitive, show
the supported values as uppercase to match the message()
docs as closely as possible, since they are related to the same
feature.

Also fixes the wrong string being shown for the warning level
by cmake --help.
2019-07-08 20:11:33 +10:00
Craig Scott
12e46dc413 Merge branch 'docs-misc-trivial-cleanups' into release-3.15
Merge-request: !3498
2019-07-04 22:29:39 +10:00
Craig Scott
01c0d863f4 Merge topic 'docs-misc-trivial-cleanups'
d5b722bbbd Help: Remove mention of CMAKE_INSTALL_DO_STRIP
ddc7ea4696 Help: Clarify how to provide multiple targets with cmake --target
c509f38b7b Help: Add missing xref for CMAKE_EXECUTE_PROCESS_COMMAND_ECHO
9cc6befe1b Help: Improve formatting of list(TRANSFORM) sub-options
074fbdb73f Help: Clean up trivial typos and grammar

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Brad King <brad.king@kitware.com>
Merge-request: !3498
2019-07-04 08:25:25 -04:00
Craig Scott
d5b722bbbd Help: Remove mention of CMAKE_INSTALL_DO_STRIP
It isn't yet clear whether we want to make this part of the
documented API for the install script. Remove it from the
docs before it appears in an official release for now.

Relates: #18997
2019-07-03 23:38:25 +10:00