6655 Commits

Author SHA1 Message Date
Brad King
28ef108140 Merge topic 'source_group-tests'
bb6e95ca6d source_group: Improved generated filters tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3675
2019-08-21 11:59:38 -04:00
Brad King
b6412b38ee Merge topic 'double-export-error-message-install'
d17580909f cmExportInstallFileGenerator: improve error message
a18100898a cmInstallExportGenerator: add a method for the file destination

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3703
2019-08-21 11:58:27 -04:00
Ben Boeckel
d17580909f cmExportInstallFileGenerator: improve error message
Following commit 49cfd390 (cmExportBuildFileGenerator: improve error
message, 2019-06-26), improve the error message related to installed
export sets by referencing the files which contain the exported target
ambiguously.
2019-08-20 10:15:03 -04:00
Brad King
a0c8405d68 Merge topic 'trace-redirect'
3c94069660 Add --trace-redirect parameter to redirect trace output to a file

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3645
2019-08-20 09:20:49 -04:00
Brad King
b80417f0fd Merge topic 'cmake-tutorial'
6f6a32a0f6 Tutorial: Improve Step 9
6a35d630dc Tutorial: Improve Step 8
61d4d990d6 Tutorial: Improve Step 7
a36731c634 Tutorial: Improve Step 6
df9cdf629c Tutorial: Improve Step 5
442c0f0d46 Tutorial: Improve Step 4
bc64401c3d Tutorial: Improve Step 3
49ce4d6ff4 Tutorial: Improve Step 2
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3528
2019-08-20 09:19:22 -04:00
Brad King
8c1d3e3b79 Merge topic 'find_openacc_targets'
f4fc0667ae FindOpenACC: Provide import targets and OpenACC_<lang>_OPTIONS variable
9460501ad7 FindOpenACC: Provide a Fortran snippet that compiles with gfortran

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3670
2019-08-20 09:17:18 -04:00
Robert Maynard
f4fc0667ae FindOpenACC: Provide import targets and OpenACC_<lang>_OPTIONS variable
Previously the FindOpenACC module had issues where the contents of
OpenACC_<lang>_FLAGS could not be used with target_compile_options
when it contained multiple compiler flags.
2019-08-19 15:20:38 -04:00
Brad King
29488892e5 Merge topic 'msvc-runtime-library-flang'
ea0294c281 Flang: Implement MSVC runtime library abstraction

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3674
2019-08-19 14:53:20 -04:00
Betsy McPhail
82332f81bb Tutorial: Improve Step 1
* Update minimum required version to 3.10
* Use VERSION argument to project command rather than separate variables
* Replace `endif(USE_MYMATH)` with  more modern `endif()`
* Simplify the call to 'configure_file()'
* Add comments to tutorial.cxx to use as anchors in documentation
* Remove CMakeLists and TutorialConfig.h.in files that users should
  create. Consequently, remove Step1 from CMake tests.
2019-08-19 11:48:58 -04:00
Kyle Edwards
dcf2beb7de Merge topic 'cmStringAlgorithms_ulong'
935fbe0b04 cmStringAlgorithms: Add cmStrToLong and cmStrToULong

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3681
2019-08-16 14:49:28 -04:00
Mateusz Janek
bb6e95ca6d source_group: Improved generated filters tests 2019-08-16 14:55:47 +02:00
Kyle Edwards
7099d113ae Merge topic 'support_CMAKE_CUDA_RESOLVE_DEVICE_SYMBOLS'
8f1d22c2d9 CUDA: Support CMAKE_CUDA_RESOLVE_DEVICE_SYMBOLS global variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3636
2019-08-13 09:58:03 -04:00
Kyle Edwards
9ab15fa74a Merge topic 'cmRemoveQuotes'
27090096ef cmStringAlgorithms: Add cmRemoveQuotes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3665
2019-08-13 09:52:23 -04:00
Sebastian Holtermann
935fbe0b04 cmStringAlgorithms: Add cmStrToLong and cmStrToULong
This adds the following functions to cmStringAlgorithms:
- `cmStrToLong`: moved from `cmSystemTools::StringToLong`
- `cmStrToULong`: moved from `cmSystemTools::StringToULong`

Overloads of the given functions for `std::string` are added as well.
2019-08-10 14:39:03 +02:00
Igor Ivanov
3c94069660 Add --trace-redirect parameter to redirect trace output to a file 2019-08-10 11:41:53 +03:00
Brad King
1a901ed09e Merge topic 'fphsa-components-space'
e45187d525 FPHSA: Remove extra space in module components report

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex Turbov <i.zaufi@gmail.com>
Merge-request: !3655
2019-08-09 10:28:45 -04:00
Brad King
ea0294c281 Flang: Implement MSVC runtime library abstraction
In commit fb3370b6a1 (MSVC: Add abstraction for runtime library
selection, 2019-04-10, v3.15.0-rc1~229^2) we overlooked updating flags
for Flang on Windows.  Add them now and update the MSVCRuntimeLibrary
Fortran test to work with Flang.  Base the flags on those we already
use for the GNU-like Clang targeting the MSVC ABI.

Fixes: #19583
2019-08-09 10:18:54 -04:00
Sebastian Holtermann
27090096ef cmStringAlgorithms: Add cmRemoveQuotes
- Add `cmRemoveQuotes` function to cmStringAlgorithms
- Remove unused removeQuotes inline functions
2019-08-09 12:20:50 +02:00
Brad King
ddb1759b3e Merge topic 'cmStringAlgorithms_move_functions'
959b97a27f Tests: testStringAlgorithms: Add cmTrimWhitespace, cmEscapeQuotes, cmTokenize
7fbcc16dcd cmStringAlgorithms: cmIsSpace, cmTrimWhitespace, cmEscapeQuotes, cmTokenize

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3647
2019-08-07 11:47:54 -04:00
Brad King
ce14f6c677 Merge topic 'find_package-prefer-config-not-found'
8ed868606d find_package: Fix prefer-config mode to not fail on missing optional package

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3653
2019-08-07 09:57:35 -04:00
Robert Maynard
8f1d22c2d9 CUDA: Support CMAKE_CUDA_RESOLVE_DEVICE_SYMBOLS global variable 2019-08-06 09:55:40 -04:00
Brad King
9a384e7304 Merge branch 'find_package-prefer-config-not-found' into release-3.15
Merge-request: !3653
2019-08-06 09:43:25 -04:00
Cristian Adam
8ed868606d find_package: Fix prefer-config mode to not fail on missing optional package
When `CMAKE_FIND_PACKAGE_PREFER_CONFIG` mode was set to `ON`, failure to
find a package was fatal even if it was not `REQUIRED`.  Fix this and
add a test case.

Fixes: #19557
2019-08-06 09:36:36 -04:00
Sylvain Joubert
e45187d525 FPHSA: Remove extra space in module components report 2019-08-06 12:42:06 +02:00
Brad King
e0f735f8f5 Merge topic 'shared-deps-no-iface'
d75cad01f0 Fix rpath-link for shared lib with only private deps
4b2e1fc9ee cmGeneratorTarget: Use local var to de-duplicate CMP0022 checks
94648953be cmLinkItem: Simplify tracking of whether link interface is explicit

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3642
2019-08-05 10:37:47 -04:00
Brad King
7eb2fd6ca6 Merge topic 'fileapi-install-generators'
d70a0f8681 fileapi: Fix codemodel target install destination for cross-dir rules

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3639
2019-08-05 10:20:27 -04:00
Sebastian Holtermann
959b97a27f Tests: testStringAlgorithms: Add cmTrimWhitespace, cmEscapeQuotes, cmTokenize
Extend the testStringAlgorithms test with tests for `cmTrimWhitespace`,
`cmEscapeQuotes` and `cmTokenize`.
2019-08-05 11:25:30 +02:00
Brad King
d75cad01f0 Fix rpath-link for shared lib with only private deps
Under CMP0022 NEW behavior, the link interface is explicit even if there
are no public dependencies (`INTERFACE_LINK_LIBRARIES` is not set).
Mark it as such to activate our tracking of private runtime dependencies
of shared libraries for generation of `-rpath-link` flags.

Fixes: #19556
2019-08-02 14:50:57 -04:00
Brad King
edca8d5c3a Merge branch 'fileapi-install-generators' into release-3.15
Merge-request: !3639
2019-08-02 11:06:22 -04:00
Sebastian Holtermann
4aa555f9da Tests: Add CMakeLib.testStringAlgorithms test 2019-08-01 11:45:04 +02:00
Brad King
d70a0f8681 fileapi: Fix codemodel target install destination for cross-dir rules
Since commit e89ad0f94e (install: Allow installing targets created in
another directory, 2018-06-18, v3.13.0-rc1~407^2) we support calling
`install(TARGETS)` for targets created in another directory.  However,
install generators are associated with the directory in which the call
to `install()` appears.  This may not be the same directory in which the
target is defined.  Record in each target the list of install generators
it has.

Fixes: #19546
2019-07-31 19:32:55 -04:00
Brad King
ac7ac46fce Merge topic 'FindPythonInterp-no-version-verify'
800c3ab2e0 FindPythonInterp: Document lack of version filtering for plain `python`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Rolf Eike Beer <eike@sf-mail.de>
Merge-request: !3631
2019-07-31 11:45:38 -04:00
Brad King
cb88632790 Merge topic 'vs-spectre-off'
f9b7c660d7 VS: Fix mapping of `-Qspectre-` flag

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3629
2019-07-31 11:41:37 -04:00
Brad King
800c3ab2e0 FindPythonInterp: Document lack of version filtering for plain python
Also drop the `CMakeOnly.MajorVersionSelection-PythonInterp_2` test
because some environments now have a plain `python` executable for
Python 3.

Fixes: #19536
2019-07-30 12:09:43 -04:00
Brad King
e4193adf29 Merge topic 'swift-with-interface-libs'
601fe84bd1 Swift: Restore support for enabling with INTERFACE libraries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Wanderley Guimarães da Silva <wanderley.guimaraes@gmail.com>
Acked-by: Guillaume Egles <gegles@gmail.com>
Merge-request: !3624
2019-07-30 11:38:35 -04:00
Brad King
4053d5737d Merge branch 'vs-spectre-off' into release-3.15
Merge-request: !3629
2019-07-30 11:20:59 -04:00
Brad King
f9b7c660d7 VS: Fix mapping of -Qspectre- flag
The mapping for this flag was added by commit 43aa632f57 (VS: Populate
`-Qspectre-` flag table entry for v142, 2019-01-24, v3.14.0-rc1~74^2~7).
However, it did not do anything because the special logic added by
commit bb60ed6e72 (VS: Add flag table entry for -Qspectre, 2018-10-08,
v3.13.0-rc1~4^2) to move the `SpectreMitigation` element from
`ClCompile` to the top level only handled the presence of the setting
and not its value.  Extend the special logic to carry the value too.

Fixes: #19535
2019-07-30 11:17:28 -04:00
Brad King
601fe84bd1 Swift: Restore support for enabling with INTERFACE libraries
The check added in commit b06f4c8a74 (Swift: disallow WIN32_EXECUTABLE
properties, 2019-05-31, v3.15.0-rc1~9^2) makes sense only for
executables because the `WIN32_EXECUTABLE` property is defined only for
them.  Running the check on other target types, particularly those that
do not link such as INTERFACE libraries, violates internal assumptions.
In particular, `GetLinkerLanguage` should not be called on such targets.

Fixes: #19528
2019-07-29 15:24:29 -04:00
Brad King
f22a2a1fa5 Merge topic 'CheckCXXSymbolExists-c++-syntax'
72fcadb007 CheckCXXSymbolExists: Make C++-syntax symbols work on more compilers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3545
2019-07-29 11:50:42 -04:00
Brad King
23503ba5f0 Merge topic 'android-ndk-r19'
97bca2f9fa Android: Use unified toolchain in NDK r19+
19f36c5fb2 Android: Update test to not require GCC compiler to exist in NDK
f3e32ddae9 Android: Re-order system initialization to select sysroot last
9a0720b819 Android: Clarify name of internal variable for arch triple
4e6c58d937 Android: Select NDK host tag while determining system

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3612
2019-07-29 11:48:33 -04:00
Brad King
08cd8ef5ee Merge topic 'test-cleanup-src-dir'
d1aa9f307e Tests: Remove stray source dir modification in RunCMake.find_program

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3610
2019-07-29 11:47:30 -04:00
Hong Xu
72fcadb007 CheckCXXSymbolExists: Make C++-syntax symbols work on more compilers
On some compilers the syntax `#ifndef std::fopen` will always lead to
compilation error.  Avoid generating it in the check.
2019-07-26 15:09:28 -04:00
Brad King
97bca2f9fa Android: Use unified toolchain in NDK r19+
The NDK build system now uses only a single toolchain in

    <ndk>/toolchains/llvm/prebuilt/<host>

Its compilers are always `bin/{clang,clang++}` and its binutils are
always `bin/<triple>-*`.  It is a standalone toolchain:

* The Anrdoid API level is specified at the end of `--target=`.
* The standard library may be specified via `-stdlib=`.
* No need to pass system includes or libraries explicitly.
* No need to pass `--sysroot` or `-gcc-toolchain`.

Teach CMake to recognize NDK versions that have a unified
toolchain with its own sysroot and use the above approach.

Fixes: #18739
2019-07-26 14:17:07 -04:00
Brad King
19f36c5fb2 Android: Update test to not require GCC compiler to exist in NDK 2019-07-26 14:17:07 -04:00
Kyle Edwards
8fd481a899 Merge topic 'ep_support_no_submodule_init'
d6be117ca0 ExternalProject: Support not initializing any submodules

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3579
2019-07-26 12:02:34 -04:00
Brad King
d1aa9f307e Tests: Remove stray source dir modification in RunCMake.find_program
Since commit c76c1ea208 (find_program: Consider CWD only for paths with
separator, 2018-05-31, v3.13.0-rc1~413^2) this test has created a
directory in the source tree unnecessarily.  Remove it.
2019-07-26 09:53:25 -04:00
Jiang Yue
f08dcbffec Property: Add INSTALL_REMOVE_ENVIROMENT_RPATH property 2019-07-25 12:30:23 -04:00
Brad King
c173ed1184 Merge topic 'makefile-depend-relative-include'
d46bac5d38 Makefile: Fix regression in dependencies on relative includes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3599
2019-07-25 07:20:09 -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
070a5e3835 Merge branch 'makefile-depend-relative-include' into release-3.15
Merge-request: !3599
2019-07-25 07:15:42 -04:00