Commit Graph

4945 Commits

Author SHA1 Message Date
Craig Scott
17e5516e60 FetchContent: Invoke steps directly and avoid a separate sub-build
The cost of setting up and executing a separate sub-build to do the
download, update and patch steps required for FetchContent population
can be significant with some platforms and CMake generators. Avoid the
sub-build altogether by invoking the step scripts directly.

Previously, if no generator was set (e.g. population was being done in
script mode), a generator needed to be available on the default PATH.
Since we no longer use a sub-build, this restriction is also now gone.

Fixes: #21703
2021-02-05 07:33:38 +11:00
Craig Scott
4f3d1abbb4 ExternalProject: Refactor pre-configure steps to support no-target uses
The mkdir, download, update and patch steps are used by
FetchContent during the configure phase of the main build. Because
these steps need a target, this has so far required a sub-build to be
set up. The changes here factor out the preparation of the scripts
from the creation of the targets, allowing future work to leverage these
steps without a sub-build (see #21703).

As part of the refactoring, some rationalisation of the stamp files,
repository info files and script names was done to make things more
consistent between download methods and step implementations.
Every download method now records its own specific repository info
in a file and that file is a dependency of the download step. The source
directory is also written to that file, so if the SOURCE_DIR changes, the
download will be retriggered (the existing implementation fails in this
scenario). Each download method now also has just one driver script
that implements the whole step (it may pull in other scripts to do its
task though). The patch step gained support for USES_TERMINAL as
a result of generalising the implementation for custom commands.

Fixes: #21748
2021-02-05 07:33:38 +11:00
William R. Dieter
a90d2a9eed IntelLLVM: Add support for Intel LLVM-based compilers
Using a single ID 'IntelLLVM' for the suite of Intel compilers based on
the LLVM backend.  The 'IntelLLVM' ID are used for C, C++, and Fortran.
Data Parallel C++ will be handled in a separate commit.

The C and C++ definitions are based on the Clang definitions.  The Intel
LLVM-based C and C++ compilers are based on the Clang front end, so
existing Clang options are more likely to be a good match than options
for the older Intel compilers.

Fortran is based on the older Fortran front end with the LLVM backend.
It has a similar interface to the older versions, though many options
are shared with the C and C++ compilers.

Fixes: #21561
Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
2021-01-28 09:05:35 -05:00
Tin Huynh
83ea49818f NVHPC: Add support for NVIDIA HPC SDK compilers based on PGI
Identify the compilers as `NVHPC` to distinguish it from the older PGI
compilers from which they evolved, and from other `NVIDIA` compilers.

Fixes: #20887
2021-01-27 09:53:02 -05:00
Brad King
a0e44fc16b Merge topic 'rel-package-names'
2186f8988f Utilities/Release: Rename Windows packages to 'windows-$arch'
dc9340dbc4 Utilities/Release: Rename Linux packages to 'linux-$arch'

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5738
2021-01-27 09:07:09 -05:00
Brad King
f39fb0b90d Merge topic 'outdir-target-genex'
64c3857780 OUTPUT_DIRECTORY: Support tgt genex in output artifact vars

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5690
2021-01-27 09:04:29 -05:00
Brad King
977811a8ff Merge topic 'doc-system-processor'
5a6379f1fd Help: Clarify meaning of CMAKE_SYSTEM_PROCESSOR

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5744
2021-01-27 09:03:37 -05:00
Brad King
7ab6d1e831 Merge topic 'cpack-compression-threads'
bdf30bdad8 CPack: add CPACK_THREADS variable to control compression threads
bcdb5b52a0 libarchive: Fix lzma_stream_encoder_mt detection

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5716
2021-01-27 09:02:35 -05:00
Asit Dhal
64c3857780 OUTPUT_DIRECTORY: Support tgt genex in output artifact vars
Following variables now support target dependent generator expressions.
- CMAKE_RUNTIME_OUTPUT_DIRECTORY
- CMAKE_LIBRARY_OUTPUT_DIRECTORY
- CMAKE_ARCHIVE_OUTPUT_DIRECTORY

Fixes: #18055
2021-01-26 12:13:15 -05:00
Brad King
5a6379f1fd Help: Clarify meaning of CMAKE_SYSTEM_PROCESSOR
On Windows the value may not match the compiler's target architecture.
Update the documentation to state this explicitly.

Issue: #15170
2021-01-26 11:04:22 -05:00
Rodolfo Lima
bdf30bdad8 CPack: add CPACK_THREADS variable to control compression threads
This allows setting how many threads the compressor will use.
Currently only implemented for XZ when using system's lzma library.

Fixes: #21715
2021-01-26 16:23:37 +01:00
Michael Hirsch, Ph.D
e63e83d2b8 Help: Document that if(EXISTS) does not expand ~
Fixes: #21729
2021-01-26 09:50:01 -05:00
Brad King
2186f8988f Utilities/Release: Rename Windows packages to 'windows-$arch' 2021-01-26 09:11:14 -05:00
Brad King
dc9340dbc4 Utilities/Release: Rename Linux packages to 'linux-$arch' 2021-01-25 13:53:40 -05:00
Brad King
2ea4f390c1 Merge topic 'doc-multi-config-prop'
1d7daa668c Help: Add Ninja Multi-Config to list in GENERATOR_IS_MULTI_CONFIG

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kyle Edwards <kyle.edwards@kitware.com>
Merge-request: !5737
2021-01-25 11:40:50 -05:00
Brad King
adaa393115 Merge topic 'cpack-deb-shlibdeps-private-search-dirs'
d586a4ad60 CPackDeb: dpkg-shlibdeps now supports searching for private shared libs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5718
2021-01-25 11:39:39 -05:00
Brad King
1d7daa668c Help: Add Ninja Multi-Config to list in GENERATOR_IS_MULTI_CONFIG
Fixes: #21739
2021-01-25 10:52:49 -05:00
Craig Scott
72974fe339 Merge topic 'doc-xcode-attr'
3c80666f00 Help: Document intended purpose of XCODE_ATTRIBUTE_<an-attribute>

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5726
2021-01-24 03:26:35 -05:00
Brad King
3c80666f00 Help: Document intended purpose of XCODE_ATTRIBUTE_<an-attribute>
Also warn the reader against setting values CMake normally generates.

Issue: #21728
2021-01-23 07:29:10 +11:00
Deniz Bahadir
d586a4ad60 CPackDeb: dpkg-shlibdeps now supports searching for private shared libs
The new CPack variable `CPACK_DEBIAN_PACKAGE_SHLIBDEPS_PRIVATE_DIRS`
can be set to a list of directories. If `CPACK_DEBIAN_PACKAGE_SHLIBDEPS`
or `CPACK_DEBIAN_<component>_PACKAGE_SHLIBDEPS` are set to `ON` these
directories will be searched by `dpkg-shlibdeps` in order to find
private shared library dependencies of the libraries/executables that
shall be packed.
2021-01-22 08:33:01 -05:00
Marc Chevrier
89b01b04fa UseSWIG: use swig tool to generate dependencies
add_custom_command() supports option DEPFILE when generator is
Makefiles or Ninja. And swig tool is able to generate a dependencies
file which is compatible with DEPFILE option.
2021-01-21 19:29:04 +01:00
Brad King
fddbb7db4b Merge topic 'vs-sdk-selection'
1e67482daf VS: Generalize Win10 max SDK version to all VS generators

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5721
2021-01-21 09:18:31 -05:00
jonathan molinatto
1e67482daf VS: Generalize Win10 max SDK version to all VS generators
The `CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION_MAXIMUM` variable added in
CMake 3.19 by commit ba497111f6 (VS: Add option for custom Win10 SDK
version maximum, 2020-08-20, v3.19.0-rc1~262^2) was documented as if it
worked for all generators but implemented only to override CMake's
builtin default for the VS 2015 max SDK version.  Generalize the
variable to set a custom max SDK version for later VS versions too.

Fixes: #21720
2021-01-20 14:46:34 -05:00
Brad King
c2dc7e0f53 Help: Convert genex documentation to sphinx domain objects
This makes them linkable, indexed, and enables cross-references.
2021-01-18 12:35:41 -05:00
Brad King
778321beb4 Help: Remove extra blank line from cmake-generator-expressions(7) 2021-01-18 12:35:41 -05:00
Brad King
7d498d6b43 Utilities/Sphinx: Add role and directive for 'genex' in CMake domain
This enables cross-reference syntax for CMake generator expressions:

    :genex:`SOME_GENEX`
    :genex:`$<SOME_GENEX>`
    :genex:`$<SOME_GENEX:...>`

and definition of CMake generator expressions via a directive:

    .. genex:: SOME_GENEX
    .. genex:: $<SOME_GENEX>
    .. genex:: $<SOME_GENEX:...>

It also adds generator expressions defined by the directive and by
`Help/genex/SOME_GENEX.rst` documents to the index.
2021-01-18 12:35:41 -05:00
Brad King
cc1f53351c Help/dev: Mention 'cpack_gen' domain object in CMake Documentation Guide
This was accidentally left out of commit 2a2829cc75 (Help: Add new
section for CPack generators, 2018-06-15, v3.13.0-rc1~394^2~3).
2021-01-18 12:35:40 -05:00
Brad King
954a9e9893 Help/dev: Mention 'envvar' domain object in CMake Documentation Guide
This was accidentally left out of commit 8acf46caf1 (Utilities/Sphinx:
Add role and directive for 'envvar' in CMake domain, 2018-04-19,
v3.12.0-rc1~200^2~1).
2021-01-18 12:35:40 -05:00
Brad King
2f047081fb Merge topic 'fileapi-toolchains'
66b33c8cd4 Help: Add release note for fileapi "toolchains" object

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5707
2021-01-18 11:19:16 -05:00
Marc Chevrier
d9e66b814d Merge topic 'cmake_path_docs'
c3ddb484d7 Help: Restructure and clarify cmake_path() docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Shannon Booth <shannon.ml.booth@gmail.com>
Merge-request: !5682
2021-01-18 09:05:41 -05:00
Craig Scott
c3ddb484d7 Help: Restructure and clarify cmake_path() docs
Relates: #21385
2021-01-16 23:58:09 +11:00
Brad King
66b33c8cd4 Help: Add release note for fileapi "toolchains" object
This release note was accidentally left out of commit f72bb2ee0d (Help:
Add documentation for "toolchains" object kind, 2021-01-07).
2021-01-15 13:29:09 -05:00
Brad King
ddd9545895 Merge topic 'doc-preset-layout'
3115cc3895 Help: Fix layout of architecture/toolset fields in cmake-presets(7) manual
69dbaba6fb Help: Add section heading for configure presets in cmake-presets(7)
501bcb6327 Help: Add section heading for macro expansion in cmake-presets(7)
1c4c742f40 Help: Remove unnecessary indentation in cmake-presets(7)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5700
2021-01-15 10:36:38 -05:00
Marc Chevrier
50b8dc8735 Merge topic 'cmake_path-stabilization'
76f0bcdfb6 cmake_path: various updates

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5695
2021-01-15 05:47:02 -05:00
Brad King
6baffecab9 Merge topic 'memory_check_sanitizer_options_docs'
4426ddda1c Help: Clarify memory check sanitizer option behavior for `log_path`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !5699
2021-01-14 14:18:16 -05:00
Brad King
810b8e5102 Merge topic 'tutorial-step5'
174b1e5da5 Tutorial: Remove incorrect instructions from Step 5

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5697
2021-01-14 14:17:00 -05:00
Brad King
3115cc3895 Help: Fix layout of architecture/toolset fields in cmake-presets(7) manual
These two fields share common documentation and so should be a single
entry in the definition list.

Fixes: #21642
2021-01-14 13:44:50 -05:00
Brad King
69dbaba6fb Help: Add section heading for configure presets in cmake-presets(7)
Cross-reference it from the main `configurePresets` field.
This removes an extra layer of indentation and makes the
section linkable.
2021-01-14 13:40:16 -05:00
Brad King
501bcb6327 Help: Add section heading for macro expansion in cmake-presets(7)
Also cross-reference it from the prose.
2021-01-14 13:40:04 -05:00
Brad King
1c4c742f40 Help: Remove unnecessary indentation in cmake-presets(7)
The entire "Format" section had an extra 2 spaces of indentation.
2021-01-14 13:40:02 -05:00
Betsy McPhail
174b1e5da5 Tutorial: Remove incorrect instructions from Step 5
The first section of Step 5 is not tested, incorrect, and not the
recommended solution.

Fixes: #21539
2021-01-14 13:05:09 -05:00
Brad King
cc47f4ebf9 Merge topic 'fileapi-toolchains'
6418dabb87 Tests: Add test for toolchains-v1 File API object
1c5bd1bed5 Tests: Add toolchains kind to capabilities test
f72bb2ee0d Help: Add documentation for "toolchains" object kind
bb069c0857 cmFileAPI: Add "toolchains" object kind.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5678
2021-01-14 13:02:54 -05:00
Brad King
967d1f7dde Merge topic 'install-FILES-rename-genex'
ac3ccc393e install(files): Support genex in rename option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5694
2021-01-14 13:00:16 -05:00
Pawel Dac
4426ddda1c Help: Clarify memory check sanitizer option behavior for log_path
Added information about prepending [ASAN/LSAN/TSAN/MSAN/UBSAN]_OPTIONS
to MemoryTesterEnvironmentVariable and `log_path` limitation.
2021-01-13 23:14:26 +01:00
Marc Chevrier
76f0bcdfb6 cmake_path: various updates
To follow discussions in #21385 and !5682:
* Fix bug in cmCMakePath::IsSuffix() method
* cmake_path(HASH) always normalized paths (NORMALIZE option removed)
2021-01-13 15:27:49 +01:00
Brad King
438ed46c13 Merge topic 'ExternalProject-configure-handled-by-build'
7155e358c9 ExternalProject: Add CONFIGURE_HANDLED_BY_BUILD option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5626
2021-01-13 09:21:47 -05:00
Craig Scott
4274b4aaaf Merge topic 'doc-standard-module-var-names'
cc32eeae17 Help: Clarify standard module variable naming

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5679
2021-01-13 06:31:01 -05:00
Asit Dhal
ac3ccc393e install(files): Support genex in rename option
Fixes: #19903
2021-01-13 11:27:56 +01:00
Ben McMorran
6418dabb87 Tests: Add test for toolchains-v1 File API object 2021-01-12 15:43:38 -08:00
Ben McMorran
f72bb2ee0d Help: Add documentation for "toolchains" object kind 2021-01-12 11:21:28 -08:00