Commit Graph

1806 Commits

Author SHA1 Message Date
Marc Chevrier
056489d567 add_library/add_executable: allow local alias to imported targets
Fixes: #20641
2020-06-02 17:11:47 +02:00
Brad King
855a7158ed Merge topic 'target_link_libraries-self-link-is-an-error'
9436ad35df target_link_libraries: self-link through ALIAS is an error

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4826
2020-06-02 07:53:40 -04:00
Marc Chevrier
9436ad35df target_link_libraries: self-link through ALIAS is an error
Fixes: #19617
2020-05-30 11:47:39 +02:00
Craig Scott
8aa4d51ec5 ExternalProject: Add missing release note for git update strategy
This release note was mistakenly omitted from commit 0aea435aa1
(ExternalProject: Provide choice of git update strategies, 2020-02-12).
2020-05-29 12:10:33 -04:00
Marc Chevrier
1eca5993e2 ALIAS target: cannot overwrite an existing target
Fixes: #19616
2020-05-28 12:56:59 -04:00
Marc Chevrier
af96c0f4fa CheckLinkerFlag: Add module to check validity of linker flags
Fixes: #15934
2020-05-25 10:57:14 -04:00
Brad King
62816ff88c Merge topic 'fortran-preprocess-property'
3888de23da Ninja: Skip Fortran preprocessing if Fortran_PREPROCESS is OFF
66c4e87282 Ninja: Add helper functions to generate Fortran build
5cca1ec893 Ninja: Add helper functions to generate Fortran preprocess rule
b0a6161190 Fortran: Add Fortran_PREPROCESS property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4659
2020-05-22 10:35:10 -04:00
Craig Scott
1b0049680b Merge topic 'cmake_language-rename-from-cmake_command'
94c1e4fdb3 cmake_language: Rename command from cmake_command

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4774
2020-05-22 10:25:29 -04:00
Brad King
94c1e4fdb3 cmake_language: Rename command from cmake_command
Also rename the `INVOKE` signature to `CALL`.

Fixes: #20732
2020-05-21 13:36:52 -04:00
Brad King
9ec09f22ff Merge topic 'multi-ninja-pch-msvc'
f6cb1e646c Multi-Ninja: Fix PCHs for Visual C++

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4771
2020-05-21 11:52:12 -04:00
Peter Hill
b0a6161190 Fortran: Add Fortran_PREPROCESS property
Issue: #18870
2020-05-21 11:44:14 -04:00
Brad King
00d6e41a07 Merge topic 'ctest-log-environment'
a1612af749 CTest: Log environment variables as a test measurement

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4760
2020-05-20 09:11:03 -04:00
Cristian Adam
f6cb1e646c Multi-Ninja: Fix PCHs for Visual C++
Fixes: #20711
2020-05-20 11:20:38 +02:00
Kyle Edwards
a1612af749 CTest: Log environment variables as a test measurement 2020-05-19 10:26:57 -04:00
Brad King
d7e82a11d5 Merge topic 'fetchcontent-SOURCE_SUBDIR'
592085b94b FetchContent: Add support for SOURCE_SUBDIR

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4757
2020-05-18 12:31:54 -04:00
Craig Scott
592085b94b FetchContent: Add support for SOURCE_SUBDIR
Fixes: #19875
2020-05-16 17:01:10 +10:00
Raul Tambre
5df21adf46 CUDA: Add support for Clang compiler
When crosscompiling we pass the sysroot.

We need to try various architecture flags. Clang doesn't automatically
select one that works.  First try the ones that are more likely to work
for modern installations:

* <=sm_50 is deprecated since CUDA 10.2, try sm_52 first for
          future compatibility.
* <=sm_20 is removed since CUDA 9.0, try sm_30.

Otherwise fallback to Clang's current default. Currently that's `sm_20`,
the lowest it supports.

Separable compilation isn't supported yet.

Fixes: #16586
2020-05-15 17:46:51 +03:00
Brad King
eb93b50be9 Merge topic 'source_file_scopes'
3d4b70ea64 set_source_files_properties: Allow specification of directory scope

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4661
2020-05-15 09:58:03 -04:00
Alexandru Croitor
3d4b70ea64 set_source_files_properties: Allow specification of directory scope
Both set_source_files_properties() and set_property(SOURCE) now accept
two new optional arguments: DIRECTORY and TARGET_DIRECTORY.

The DIRECTORY option takes a list of relative or absolute paths
pointing to processed source directories (add_subdirectory was
already called on them).

These paths specify directory scopes where the source file properties
will be set. Previously the scope was always the currently processed
source directory.

Similarly TARGET_DIRECTORY takes a list of targets, whose source
directories will be used as the list of scopes where to set the
source file properties.

get_property() and get_source_file_property() also get the same
new arguments, except only one value can be specified instead
of a list.

Fixes: #20128
2020-05-14 16:31:22 +02:00
Brad King
7c4f609eed Merge topic 'FindPython-IronPython-support'
e8ffc60220 FindPython: Add IronPython support on all platforms

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4730
2020-05-13 07:41:45 -04:00
Brad King
d4b1d3d4f0 Merge topic 'source_group_forward_slashes'
faf44a8cdb source_group: Support forward slashes in group hierarchy

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4727
2020-05-11 10:14:24 -04:00
Marc Chevrier
e8ffc60220 FindPython: Add IronPython support on all platforms 2020-05-11 14:02:59 +02:00
Craig Scott
faf44a8cdb source_group: Support forward slashes in group hierarchy
Fixes: #18076
2020-05-11 08:15:25 +10:00
Robert Maynard
9f4eb352fe Unity Builds: Support explicit specification of sources to groups
Instead of having CMake determine which files should go into each
unity file, the user can now use explicitly state the mapping.
2020-05-07 11:13:34 -04:00
Marc Chevrier
c1ef70d4d1 FindPython: Add support for 'PyPy' 2020-05-01 15:03:04 +02:00
Brad King
6556e587ef Merge topic 'FPHSA-handle-components'
0b6332af60 FPHSA: REQUIRED_VARS is optional if HANDLE_COMPONENTS is specified

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4690
2020-05-01 08:33:30 -04:00
Brad King
8228246d9b Merge topic 'CTestCoverageCollectGCOV-compress-opts'
40ca6ef125 CTestCoverageCollectGCOV: Add TARBALL_COMPRESSION option
81e83510a0 Tests: Fix re-running CTestCoverageCollectGCOV on in-source build
ab7eda2591 Tests: Remove unnecessary pass regex on CTestCoverageCollectGCOV

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4649
2020-05-01 08:28:50 -04:00
Kelly (KT) Thompson
40ca6ef125 CTestCoverageCollectGCOV: Add TARBALL_COMPRESSION option
For large projects, the default bzip2 compression of gcov data is
prohibitively expensively (could take several hours).  Introduce options
that allow the consumer to choose between file size and compression time.

Add a new optional argument `TARBALL_COMPRESSION` for the macro
`ctest_coverage_collect_gcov`. This option accepts the values `GZIP`,
`BZIP2`, `XZ`, `FROM_EXT`, or an expression that evaluates to `FALSE`.
The default value is `BZIP2` to preserve prior behavior.

Fixes: #20593
2020-04-30 08:42:00 -04:00
Marc Chevrier
0b6332af60 FPHSA: REQUIRED_VARS is optional if HANDLE_COMPONENTS is specified
Fixes: #20655
2020-04-30 10:54:36 +02:00
Brad King
d63c442a6b Merge topic 'vs_platform_toolset'
197b4cbe18 VS: Add option for per-target PlatformToolset

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4682
2020-04-29 10:50:42 -04:00
Julien Jemine
197b4cbe18 VS: Add option for per-target PlatformToolset
Add a `VS_PLATFORM_TOOLSET` target property to set `PlatformToolset` in
the `.vcxproj` file for specific targets.  Document that this is safe
only when the named toolset uses the same underlying compiler as the
primary toolset.

Fixes: #17429
2020-04-29 07:35:57 -04:00
Brad King
959acdc9e6 Merge topic 'FindLibXslt-targets'
8a90ef5a44 FindLibXslt: use LIBXSLT_LIBRARY as cache variable
1aa7df4114 FindLibXslt: provide imported targets
dd506714f4 FindLibXslt: identify libexslt include directory

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4650
2020-04-29 07:33:50 -04:00
Brad King
c9fdee6a67 Merge topic 'FindPython-find-implementations'
d2c47c822b FindPython: Add capability to specify Python implementations

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4676
2020-04-29 07:30:24 -04:00
Markus Rickert
1aa7df4114 FindLibXslt: provide imported targets 2020-04-28 19:14:03 +02:00
Marc Chevrier
d2c47c822b FindPython: Add capability to specify Python implementations
Through hint Python_FIND_IMPLEMENTATIONS it is possble to specify, as an
ordered list, which implementations must be searched for.
Currently possible values are:
* CPython
* IronPython
2020-04-28 13:56:18 +02:00
Robert Maynard
4ed936d1b8 FindLAPACK: Provide the LAPACK::LAPACK import target 2020-04-27 14:19:02 -04:00
Brad King
0e3a2d9b16 Merge topic 'ccmake-custom-colors'
671fe28313 ccmake: Improve coloring, allow customization
f56a695440 ccmake: Rename cmCursesColor::{Options => Choice}

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4629
2020-04-27 10:40:25 -04:00
Brad King
0ae7232334 Merge topic 'FindBLAS-target'
85a9813a76 BLAS: Provide the BLAS::BLAS import target

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4657
2020-04-27 10:39:30 -04:00
Matthew Woehlke
671fe28313 ccmake: Improve coloring, allow customization
Change the default color for strings from BLUE (which is nearly
illegible on any terminals using the standard color palette which has
been around since at least CGA, almost 40 years ago) to CYAN. Add
ability to customize the colors via an environment variable (inspired by
LS_COLORS and using similar syntax).

Fixes: #20596
2020-04-24 11:21:13 -04:00
Robert Maynard
85a9813a76 BLAS: Provide the BLAS::BLAS import target 2020-04-23 13:59:33 -04:00
Brad King
61ac8e6dfa Merge topic 'remove-documentation-module'
306a1ba960 Modules/Documentation: remove
ad4487a96a cmIncludeCommand: add infrastructure for deprecated modules

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4617
2020-04-23 09:15:24 -04:00
Brad King
b779cb13b4 Merge topic 'ninja-compiler-PATH-windows'
e01990999a Ninja: On Windows, select the compiler occurring first in PATH

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4625
2020-04-23 09:13:56 -04:00
Ben Boeckel
306a1ba960 Modules/Documentation: remove
This is an old module from when VTK and other Kitware projects drove the
addition of commands and modules into CMake itself. Modern VTK doesn't
need this module and it can be ignored.

This module is kept around so that the ancient VTK versions which use it
are not broken by it. VTK itself stopped using the module in 2012 and
the last usage by an example in VTK was removed in 2020.

Fixes: #20591
2020-04-22 10:46:03 -04:00
Brad King
f9fbc78cd6 Merge topic 'ctest_stop_on_failure_16628'
e89aeba5c4 ctest: add option --stop-on-failure

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4630
2020-04-22 08:38:33 -04:00
Brad King
e01990999a Ninja: On Windows, select the compiler occurring first in PATH
On Windows, toolchains like MSVC require a set of environment variables
to be configured for the compiler to work correctly.  The scripts that
prepare these environments typically put the compiler's directory ahead
of others in the `PATH`.  Teach the Ninja generators to use this as a
heuristic to select the compiler when none is explicitly specified.

This is not necessary with Makefile generators because each toolchain's
environment comes with its own make tool variant, and the corresponding
Makefile generator (e.g. "NMake Makefiles") automatically implies the
matching compiler.

Fixes: #20585
2020-04-22 08:03:16 -04:00
Johnny Jazeix
e89aeba5c4 ctest: add option --stop-on-failure
To stop the tests once one has failed

Fixes: #16628
2020-04-20 23:05:15 +02:00
Marc Chevrier
4248bb452a CUDA: Device linking use now link options
properties LINK_OPTIONS and INTERFACE_LINK_OPTIONS are propagated
to the device link step.

To control which options are selected for normal link and device link steps,
the $<DEVICE_LINK> and $<HOST_LINK> generator expressions can be used.

Fixes: #18265
2020-04-19 15:53:11 +02:00
Marc Chevrier
3fdae5acaa Genex: Add generator expressions $<DEVICE_LINK> and $<HOST_LINK>
These generator expressions can only be used in link options properties.
These expressions return the arguments respectively for device and host link
step, otherwise return an empty string.
2020-04-19 15:04:54 +02:00
Brad King
d601a2c75c Merge topic 'FindPython-dev-subcomponents'
c1b4044d3e FindPython: add sub-components to Development component

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !4616
2020-04-17 08:05:39 -04:00
Kyle Edwards
5f20e85412 Merge topic 'cat_cmd_20557'
a625f30785 cmake -E: add cat command.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4600
2020-04-16 11:35:55 -04:00