mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-09 07:11:05 -06:00
Merge branch 'master' into ci-msvc-14.29-16.10
This commit is contained in:
@@ -19,6 +19,7 @@ modernize-*,\
|
||||
performance-*,\
|
||||
readability-*,\
|
||||
-readability-convert-member-functions-to-static,\
|
||||
-readability-function-cognitive-complexity,\
|
||||
-readability-function-size,\
|
||||
-readability-identifier-naming,\
|
||||
-readability-implicit-bool-conversion,\
|
||||
|
||||
9
.codespellrc
Normal file
9
.codespellrc
Normal file
@@ -0,0 +1,9 @@
|
||||
[codespell]
|
||||
check-filenames =
|
||||
check-hidden =
|
||||
count =
|
||||
# Disable warnings about binary files
|
||||
quiet-level = 2
|
||||
builtin = clear,rare,en-GB_to_en-US
|
||||
skip = */.git,*/build,*/Copyright.txt,*/doxygen.config,*/Modules/Internal/CPack/NSIS.template.in,*/Source/CursesDialog/form/*,*/Source/kwsys/*,*/Tests/RunCMake/CPack/tests/DMG_SLA/German.*,*/Utilities/cm*
|
||||
ignore-words-list = aci,ake,ans,ba,cconfiguration,conly,dependees,dne,dum,earch,ect,filetest,fo,helpfull,hiden,isnt,keypair,nd,ned,nin,nknown,ot,pard,seh,ser,te,upto,varn,vas,wee
|
||||
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -1,5 +1,6 @@
|
||||
.git* export-ignore
|
||||
.hooks* export-ignore
|
||||
.codespellrc export-ignore
|
||||
.editorconfig export-ignore
|
||||
|
||||
# Custom attribute to mark sources as using our C code style.
|
||||
|
||||
7
.gitignore
vendored
7
.gitignore
vendored
@@ -9,6 +9,13 @@ CMakeUserPresets.json
|
||||
|
||||
# Visual Studio work directory
|
||||
.vs/
|
||||
# Visual Studio build directory
|
||||
out/
|
||||
|
||||
# Visual Studio Code
|
||||
.vscode/
|
||||
|
||||
# CLion work directory
|
||||
.idea/
|
||||
# CLion build directories
|
||||
cmake-build-*/
|
||||
|
||||
333
.gitlab-ci.yml
333
.gitlab-ci.yml
@@ -46,15 +46,15 @@ prep:source-package:
|
||||
|
||||
prep:doc-package:
|
||||
extends:
|
||||
- .fedora33_sphinx_package
|
||||
- .fedora34_sphinx_package
|
||||
- .cmake_prep_doc_linux
|
||||
- .linux_builder_tags_qt
|
||||
- .cmake_doc_artifacts
|
||||
- .run_only_for_package
|
||||
|
||||
.upload:source-package:
|
||||
upload:source-package:
|
||||
extends:
|
||||
- .rsync_upload
|
||||
- .rsync_upload_binary
|
||||
- .run_only_for_package
|
||||
dependencies:
|
||||
- prep:source-package
|
||||
@@ -63,25 +63,65 @@ prep:doc-package:
|
||||
variables:
|
||||
RSYNC_DESTINATION: dev
|
||||
|
||||
# Documentation builds
|
||||
|
||||
build:help:master:
|
||||
extends:
|
||||
- .cmake_org_help
|
||||
- .run_only_for_continuous_master
|
||||
|
||||
upload:help:master:
|
||||
extends:
|
||||
- .rsync_upload_help
|
||||
- .run_only_for_continuous_master
|
||||
variables:
|
||||
RSYNC_DESTINATION: git-master
|
||||
dependencies:
|
||||
- build:help:master
|
||||
needs:
|
||||
- build:help:master
|
||||
|
||||
build:help:stage:
|
||||
extends:
|
||||
- .cmake_org_help
|
||||
- .run_only_for_continuous_stage
|
||||
|
||||
upload:help:stage:
|
||||
extends:
|
||||
- .rsync_upload_help
|
||||
- .run_only_for_continuous_stage
|
||||
variables:
|
||||
RSYNC_DESTINATION: git-stage
|
||||
dependencies:
|
||||
- build:help:stage
|
||||
needs:
|
||||
- build:help:stage
|
||||
|
||||
# Lint builds
|
||||
|
||||
build:debian10-iwyu:
|
||||
lint:codespell:
|
||||
extends:
|
||||
- .cmake_codespell_linux
|
||||
- .linux_builder_tags
|
||||
- .run_automatically
|
||||
|
||||
lint:debian10-iwyu:
|
||||
extends:
|
||||
- .debian10_iwyu
|
||||
- .cmake_build_linux
|
||||
- .linux_builder_tags
|
||||
- .run_automatically
|
||||
|
||||
build:fedora33-tidy:
|
||||
lint:fedora34-tidy:
|
||||
extends:
|
||||
- .fedora33_tidy
|
||||
- .fedora34_tidy
|
||||
- .cmake_build_linux
|
||||
- .linux_builder_tags_qt
|
||||
- .run_automatically
|
||||
|
||||
build:fedora33-sphinx:
|
||||
lint:fedora34-sphinx:
|
||||
extends:
|
||||
- .fedora33_sphinx
|
||||
- .fedora34_sphinx
|
||||
- .cmake_build_linux
|
||||
- .linux_builder_tags_qt
|
||||
- .run_automatically
|
||||
@@ -115,10 +155,7 @@ test:debian10-ninja:
|
||||
- .cmake_test_linux_release
|
||||
- .linux_builder_tags_qt
|
||||
- .run_dependent
|
||||
dependencies:
|
||||
- build:centos6-x86_64
|
||||
needs:
|
||||
- build:centos6-x86_64
|
||||
- .needs_centos6_x86_64
|
||||
|
||||
test:debian10-aarch64-ninja:
|
||||
extends:
|
||||
@@ -126,23 +163,17 @@ test:debian10-aarch64-ninja:
|
||||
- .cmake_test_linux_release
|
||||
- .linux_builder_tags_aarch64_qt
|
||||
- .run_dependent
|
||||
dependencies:
|
||||
- build:centos7-aarch64
|
||||
needs:
|
||||
- build:centos7-aarch64
|
||||
- .needs_centos7_aarch64
|
||||
variables:
|
||||
CMAKE_CI_NO_MR: "true"
|
||||
|
||||
test:fedora33-makefiles:
|
||||
test:fedora34-makefiles:
|
||||
extends:
|
||||
- .fedora33_makefiles
|
||||
- .fedora34_makefiles
|
||||
- .cmake_test_linux_release
|
||||
- .linux_builder_tags_qt
|
||||
- .run_dependent
|
||||
dependencies:
|
||||
- build:centos6-x86_64
|
||||
needs:
|
||||
- build:centos6-x86_64
|
||||
- .needs_centos6_x86_64
|
||||
|
||||
test:cuda10.2-nvidia:
|
||||
extends:
|
||||
@@ -150,41 +181,255 @@ test:cuda10.2-nvidia:
|
||||
- .cmake_test_linux_release
|
||||
- .linux_builder_tags_cuda
|
||||
- .run_dependent
|
||||
dependencies:
|
||||
- build:centos6-x86_64
|
||||
needs:
|
||||
- build:centos6-x86_64
|
||||
- .needs_centos6_x86_64
|
||||
|
||||
build:fedora33-ninja:
|
||||
build:fedora34-ninja:
|
||||
extends:
|
||||
- .fedora33_ninja
|
||||
- .fedora34_ninja
|
||||
- .cmake_build_linux
|
||||
- .cmake_build_artifacts
|
||||
- .linux_builder_tags_qt
|
||||
- .run_manually
|
||||
|
||||
test:fedora33-ninja:
|
||||
test:fedora34-ninja:
|
||||
extends:
|
||||
- .fedora33_ninja
|
||||
- .fedora34_ninja
|
||||
- .cmake_test_linux
|
||||
- .linux_builder_tags_x11
|
||||
- .cmake_test_artifacts
|
||||
- .run_dependent
|
||||
dependencies:
|
||||
- build:fedora33-ninja
|
||||
- build:fedora34-ninja
|
||||
needs:
|
||||
- build:fedora33-ninja
|
||||
- build:fedora34-ninja
|
||||
|
||||
test:fedora33-ninja-multi:
|
||||
test:fedora34-ninja-multi:
|
||||
extends:
|
||||
- .fedora33_ninja_multi
|
||||
- .fedora34_ninja_multi
|
||||
- .cmake_test_linux_external
|
||||
- .linux_builder_tags_qt
|
||||
- .run_dependent
|
||||
dependencies:
|
||||
- test:fedora33-ninja
|
||||
- test:fedora34-ninja
|
||||
needs:
|
||||
- test:fedora33-ninja
|
||||
- test:fedora34-ninja
|
||||
|
||||
test:intel2016-makefiles:
|
||||
extends:
|
||||
- .cmake_test_linux_intelclassic_makefiles
|
||||
variables:
|
||||
CMAKE_CI_BUILD_NAME: intel2016_makefiles
|
||||
CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2016-el7
|
||||
|
||||
test:intel2016u1-makefiles:
|
||||
extends:
|
||||
- .cmake_test_linux_intelclassic_makefiles
|
||||
variables:
|
||||
CMAKE_CI_BUILD_NAME: intel2016u1_makefiles
|
||||
CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2016u1-el7
|
||||
|
||||
test:intel2016u2-makefiles:
|
||||
extends:
|
||||
- .cmake_test_linux_intelclassic_makefiles
|
||||
variables:
|
||||
CMAKE_CI_BUILD_NAME: intel2016u2_makefiles
|
||||
CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2016u2-el7
|
||||
|
||||
test:intel2017-makefiles:
|
||||
extends:
|
||||
- .cmake_test_linux_intelclassic_makefiles
|
||||
variables:
|
||||
CMAKE_CI_BUILD_NAME: intel2017_makefiles
|
||||
CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2017-el7
|
||||
|
||||
test:intel2017u1-makefiles:
|
||||
extends:
|
||||
- .cmake_test_linux_intelclassic_makefiles
|
||||
variables:
|
||||
CMAKE_CI_BUILD_NAME: intel2017u1_makefiles
|
||||
CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2017u1-el7
|
||||
|
||||
test:intel2017u2-makefiles:
|
||||
extends:
|
||||
- .cmake_test_linux_intelclassic_makefiles
|
||||
variables:
|
||||
CMAKE_CI_BUILD_NAME: intel2017u2_makefiles
|
||||
CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2017u2-el7
|
||||
|
||||
test:intel2017u3-makefiles:
|
||||
extends:
|
||||
- .cmake_test_linux_intelclassic_makefiles
|
||||
variables:
|
||||
CMAKE_CI_BUILD_NAME: intel2017u3_makefiles
|
||||
CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2017u3-el7
|
||||
|
||||
test:intel2017u4-makefiles:
|
||||
extends:
|
||||
- .cmake_test_linux_intelclassic_makefiles
|
||||
variables:
|
||||
CMAKE_CI_BUILD_NAME: intel2017u4_makefiles
|
||||
CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2017u4-el7
|
||||
|
||||
test:intel2017u5-makefiles:
|
||||
extends:
|
||||
- .cmake_test_linux_intelclassic_makefiles
|
||||
variables:
|
||||
CMAKE_CI_BUILD_NAME: intel2017u5_makefiles
|
||||
CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2017u5-el7
|
||||
|
||||
test:intel2017u6-makefiles:
|
||||
extends:
|
||||
- .cmake_test_linux_intelclassic_makefiles
|
||||
variables:
|
||||
CMAKE_CI_BUILD_NAME: intel2017u6_makefiles
|
||||
CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2017u6-el7
|
||||
|
||||
test:intel2017u7-makefiles:
|
||||
extends:
|
||||
- .cmake_test_linux_intelclassic_makefiles
|
||||
variables:
|
||||
CMAKE_CI_BUILD_NAME: intel2017u7_makefiles
|
||||
CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2017u7-el7
|
||||
|
||||
test:intel2017u8-makefiles:
|
||||
extends:
|
||||
- .cmake_test_linux_intelclassic_makefiles
|
||||
variables:
|
||||
CMAKE_CI_BUILD_NAME: intel2017u8_makefiles
|
||||
CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2017u8-el7
|
||||
|
||||
test:intel2018-makefiles:
|
||||
extends:
|
||||
- .cmake_test_linux_intelclassic_makefiles
|
||||
variables:
|
||||
CMAKE_CI_BUILD_NAME: intel2018_makefiles
|
||||
CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2018-el7
|
||||
|
||||
test:intel2018u1-makefiles:
|
||||
extends:
|
||||
- .cmake_test_linux_intelclassic_makefiles
|
||||
variables:
|
||||
CMAKE_CI_BUILD_NAME: intel2018u1_makefiles
|
||||
CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2018u1-el7
|
||||
|
||||
test:intel2018u2-makefiles:
|
||||
extends:
|
||||
- .cmake_test_linux_intelclassic_makefiles
|
||||
variables:
|
||||
CMAKE_CI_BUILD_NAME: intel2018u2_makefiles
|
||||
CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2018u2-el7
|
||||
|
||||
test:intel2018u3-makefiles:
|
||||
extends:
|
||||
- .cmake_test_linux_intelclassic_makefiles
|
||||
variables:
|
||||
CMAKE_CI_BUILD_NAME: intel2018u3_makefiles
|
||||
CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2018u3-el7
|
||||
|
||||
test:intel2018u4-makefiles:
|
||||
extends:
|
||||
- .cmake_test_linux_intelclassic_makefiles
|
||||
variables:
|
||||
CMAKE_CI_BUILD_NAME: intel2018u4_makefiles
|
||||
CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2018u4-el7
|
||||
|
||||
test:intel2019-makefiles:
|
||||
extends:
|
||||
- .cmake_test_linux_intelclassic_makefiles
|
||||
variables:
|
||||
CMAKE_CI_BUILD_NAME: intel2019_makefiles
|
||||
CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2019-el7
|
||||
|
||||
test:intel2019u1-makefiles:
|
||||
extends:
|
||||
- .cmake_test_linux_intelclassic_makefiles
|
||||
variables:
|
||||
CMAKE_CI_BUILD_NAME: intel2019u1_makefiles
|
||||
CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2019u1-el7
|
||||
|
||||
test:intel2019u2-makefiles:
|
||||
extends:
|
||||
- .cmake_test_linux_intelclassic_makefiles
|
||||
variables:
|
||||
CMAKE_CI_BUILD_NAME: intel2019u2_makefiles
|
||||
CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2019u2-el7
|
||||
|
||||
test:intel2019u3-makefiles:
|
||||
extends:
|
||||
- .cmake_test_linux_intelclassic_makefiles
|
||||
variables:
|
||||
CMAKE_CI_BUILD_NAME: intel2019u3_makefiles
|
||||
CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2019u3-el7
|
||||
|
||||
test:intel2019u4-makefiles:
|
||||
extends:
|
||||
- .cmake_test_linux_intelclassic_makefiles
|
||||
variables:
|
||||
CMAKE_CI_BUILD_NAME: intel2019u4_makefiles
|
||||
CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2019u4-el7
|
||||
|
||||
test:intel2020-makefiles:
|
||||
extends:
|
||||
- .cmake_test_linux_intelclassic_makefiles
|
||||
variables:
|
||||
CMAKE_CI_BUILD_NAME: intel2020_makefiles
|
||||
CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2020-el8
|
||||
|
||||
test:intel2020u2-makefiles:
|
||||
extends:
|
||||
- .cmake_test_linux_intelclassic_makefiles
|
||||
variables:
|
||||
CMAKE_CI_BUILD_NAME: intel2020u2_makefiles
|
||||
CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2020u2-el8
|
||||
|
||||
test:intel2020u4-makefiles:
|
||||
extends:
|
||||
- .cmake_test_linux_intelclassic_makefiles
|
||||
variables:
|
||||
CMAKE_CI_BUILD_NAME: intel2020u4_makefiles
|
||||
CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2020u4-el8
|
||||
|
||||
test:intel2021.1.1-makefiles:
|
||||
extends:
|
||||
- .cmake_test_linux_intelclassic_makefiles
|
||||
variables:
|
||||
CMAKE_CI_BUILD_NAME: intel2021.1.1_makefiles
|
||||
CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2021.1.1-el8
|
||||
|
||||
test:intel2021.1.2-makefiles:
|
||||
extends:
|
||||
- .cmake_test_linux_intelclassic_makefiles
|
||||
variables:
|
||||
CMAKE_CI_BUILD_NAME: intel2021.1.2_makefiles
|
||||
CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2021.1.2-el8
|
||||
|
||||
test:intel2021.2.0-makefiles:
|
||||
extends:
|
||||
- .cmake_test_linux_intelclassic_makefiles
|
||||
variables:
|
||||
CMAKE_CI_BUILD_NAME: intel2021.2.0_makefiles
|
||||
CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2021.2.0-el8
|
||||
|
||||
test:oneapi2021.1.1-makefiles:
|
||||
extends:
|
||||
- .cmake_test_linux_inteloneapi_makefiles
|
||||
variables:
|
||||
CMAKE_CI_BUILD_NAME: oneapi2021.1.1_makefiles
|
||||
CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2021.1.1-el8
|
||||
|
||||
test:oneapi2021.1.2-makefiles:
|
||||
extends:
|
||||
- .cmake_test_linux_inteloneapi_makefiles
|
||||
variables:
|
||||
CMAKE_CI_BUILD_NAME: oneapi2021.1.2_makefiles
|
||||
CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2021.1.2-el8
|
||||
|
||||
test:oneapi2021.2.0-makefiles:
|
||||
extends:
|
||||
- .cmake_test_linux_inteloneapi_makefiles
|
||||
variables:
|
||||
CMAKE_CI_BUILD_NAME: oneapi2021.2.0_makefiles
|
||||
CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2021.2.0-el8
|
||||
|
||||
build:linux-x86_64-package:
|
||||
extends:
|
||||
@@ -199,9 +444,9 @@ build:linux-x86_64-package:
|
||||
needs:
|
||||
- prep:doc-package
|
||||
|
||||
.upload:linux-x86_64-package:
|
||||
upload:linux-x86_64-package:
|
||||
extends:
|
||||
- .rsync_upload
|
||||
- .rsync_upload_binary
|
||||
- .run_only_for_package
|
||||
dependencies:
|
||||
- build:linux-x86_64-package
|
||||
@@ -223,9 +468,9 @@ build:linux-aarch64-package:
|
||||
needs:
|
||||
- prep:doc-package
|
||||
|
||||
.upload:linux-aarch64-package:
|
||||
upload:linux-aarch64-package:
|
||||
extends:
|
||||
- .rsync_upload
|
||||
- .rsync_upload_binary
|
||||
- .run_only_for_package
|
||||
dependencies:
|
||||
- build:linux-aarch64-package
|
||||
@@ -335,9 +580,9 @@ build:macos-package:
|
||||
needs:
|
||||
- prep:doc-package
|
||||
|
||||
.upload:macos-package:
|
||||
upload:macos-package:
|
||||
extends:
|
||||
- .rsync_upload
|
||||
- .rsync_upload_binary
|
||||
- .run_only_for_package
|
||||
dependencies:
|
||||
- build:macos-package
|
||||
@@ -358,9 +603,9 @@ build:macos10.10-package:
|
||||
needs:
|
||||
- prep:doc-package
|
||||
|
||||
.upload:macos10.10-package:
|
||||
upload:macos10.10-package:
|
||||
extends:
|
||||
- .rsync_upload
|
||||
- .rsync_upload_binary
|
||||
- .run_only_for_package
|
||||
dependencies:
|
||||
- build:macos10.10-package
|
||||
|
||||
@@ -97,3 +97,12 @@
|
||||
paths:
|
||||
# Take the install tree.
|
||||
- build/install-doc/
|
||||
|
||||
.cmake_org_help_artifacts:
|
||||
artifacts:
|
||||
expire_in: 1d
|
||||
paths:
|
||||
- build/html
|
||||
exclude:
|
||||
- build/html/.buildinfo
|
||||
- build/html/objects.inv
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
set(CMake_TEST_FindALSA "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindBLAS "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindBLAS "All" CACHE STRING "")
|
||||
set(CMake_TEST_FindBLAS_STATIC "Generic" CACHE STRING "")
|
||||
set(CMake_TEST_FindBoost "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindBoost_Python "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindBZip2 "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindCups "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindCURL "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindDevIL "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindDoxygen_Dot "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindDoxygen "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindEXPAT "ON" CACHE BOOL "")
|
||||
@@ -22,7 +24,8 @@ set(CMake_TEST_FindIconv "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindIntl "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindJPEG "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindJsonCpp "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindLAPACK "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindLAPACK "All" CACHE STRING "")
|
||||
set(CMake_TEST_FindLAPACK_STATIC "Generic" CACHE STRING "")
|
||||
set(CMake_TEST_FindLibArchive "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindLibinput "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindLibLZMA "ON" CACHE BOOL "")
|
||||
@@ -45,6 +48,7 @@ set(CMake_TEST_FindPatch "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindPNG "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindPostgreSQL "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindProtobuf "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindProtobuf_gRPC "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindPython "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindPython_NumPy "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindPython_PyPy "ON" CACHE BOOL "")
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
set(CMake_TEST_FindALSA "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindBLAS "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindBLAS "All" CACHE STRING "")
|
||||
set(CMake_TEST_FindBLAS_STATIC "Generic" CACHE STRING "")
|
||||
set(CMake_TEST_FindBoost "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindBoost_Python "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindBZip2 "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindCups "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindCURL "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindDevIL "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindDoxygen_Dot "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindDoxygen "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindEXPAT "ON" CACHE BOOL "")
|
||||
@@ -22,7 +24,8 @@ set(CMake_TEST_FindIconv "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindIntl "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindJPEG "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindJsonCpp "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindLAPACK "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindLAPACK "All" CACHE STRING "")
|
||||
set(CMake_TEST_FindLAPACK_STATIC "Generic" CACHE STRING "")
|
||||
set(CMake_TEST_FindLibArchive "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindLibinput "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindLibLZMA "ON" CACHE BOOL "")
|
||||
@@ -45,6 +48,7 @@ set(CMake_TEST_FindPatch "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindPNG "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindPostgreSQL "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindProtobuf "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindProtobuf_gRPC "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindPython "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindPython_IronPython "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindPython_NumPy "ON" CACHE BOOL "")
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
set(CMake_RUN_CLANG_TIDY ON CACHE BOOL "")
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora33_common.cmake")
|
||||
@@ -1,5 +1,6 @@
|
||||
set(BUILD_CursesDialog ON CACHE BOOL "")
|
||||
set(BUILD_QtDialog ON CACHE BOOL "")
|
||||
set(CMake_QT_MAJOR_VERSION "5" CACHE STRING "")
|
||||
set(CMake_TEST_JQ "/usr/bin/jq" CACHE PATH "")
|
||||
set(CMake_TEST_JSON_SCHEMA ON CACHE BOOL "")
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
set(CMake_TEST_FindALSA "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindBLAS "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindBLAS "All" CACHE STRING "")
|
||||
set(CMake_TEST_FindBLAS_STATIC "Generic" CACHE STRING "")
|
||||
set(CMake_TEST_FindBoost "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindBoost_Python "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindBZip2 "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindCups "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindCURL "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindDevIL "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindDoxygen_Dot "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindDoxygen "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindEXPAT "ON" CACHE BOOL "")
|
||||
@@ -22,7 +24,8 @@ set(CMake_TEST_FindIconv "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindIntl "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindJPEG "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindJsonCpp "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindLAPACK "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindLAPACK "All" CACHE STRING "")
|
||||
set(CMake_TEST_FindLAPACK_STATIC "Generic" CACHE STRING "")
|
||||
set(CMake_TEST_FindLibArchive "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindLibinput "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindLibLZMA "ON" CACHE BOOL "")
|
||||
@@ -45,6 +48,7 @@ set(CMake_TEST_FindPatch "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindPNG "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindPostgreSQL "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindProtobuf "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindProtobuf_gRPC "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindPython "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindPython_NumPy "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindPython_PyPy "ON" CACHE BOOL "")
|
||||
@@ -4,4 +4,4 @@ set(CMake_TEST_GUI "ON" CACHE BOOL "")
|
||||
# Cover compilation with C++11 only and not higher standards.
|
||||
set(CMAKE_CXX_STANDARD "11" CACHE STRING "")
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora33_common.cmake")
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora34_common.cmake")
|
||||
3
.gitlab/ci/configure_fedora34_tidy.cmake
Normal file
3
.gitlab/ci/configure_fedora34_tidy.cmake
Normal file
@@ -0,0 +1,3 @@
|
||||
set(CMake_RUN_CLANG_TIDY ON CACHE BOOL "")
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora34_common.cmake")
|
||||
1
.gitlab/ci/configure_intelclassic_makefiles.cmake
Normal file
1
.gitlab/ci/configure_intelclassic_makefiles.cmake
Normal file
@@ -0,0 +1 @@
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/configure_intelcompiler_common.cmake")
|
||||
6
.gitlab/ci/configure_intelcompiler_common.cmake
Normal file
6
.gitlab/ci/configure_intelcompiler_common.cmake
Normal file
@@ -0,0 +1,6 @@
|
||||
set(CMake_TEST_FindBLAS "Intel10_64lp" CACHE STRING "")
|
||||
set(CMake_TEST_FindBLAS_STATIC "Intel10_64lp" CACHE STRING "")
|
||||
set(CMake_TEST_FindLAPACK "Intel10_64lp" CACHE STRING "")
|
||||
set(CMake_TEST_FindLAPACK_STATIC "Intel10_64lp" CACHE STRING "")
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake")
|
||||
1
.gitlab/ci/configure_inteloneapi_makefiles.cmake
Normal file
1
.gitlab/ci/configure_inteloneapi_makefiles.cmake
Normal file
@@ -0,0 +1 @@
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/configure_intelcompiler_common.cmake")
|
||||
@@ -1,4 +1,7 @@
|
||||
set(CMake_TEST_WIX_NO_VERIFY "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_GUI "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_FindOpenGL "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_IPO_WORKS_C "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_IPO_WORKS_CXX "ON" CACHE BOOL "")
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/configure_windows_common.cmake")
|
||||
|
||||
@@ -13,15 +13,6 @@ if (CTEST_CMAKE_GENERATOR MATCHES "Visual Studio")
|
||||
"^ExternalProjectUpdateSetup$")
|
||||
endif ()
|
||||
|
||||
if (CMAKE_HOST_WIN32)
|
||||
list(APPEND test_exclusions
|
||||
# This test often fails with an undiagnosed subtle race due to the test
|
||||
# re-using the same objects for many files. Some copy operations fail
|
||||
# to open their input with ERROR_SHARING_VIOLATION.
|
||||
"^Module.ExternalData$"
|
||||
)
|
||||
endif()
|
||||
|
||||
string(REPLACE ";" "|" test_exclusions "${test_exclusions}")
|
||||
if (test_exclusions)
|
||||
set(test_exclusions "(${test_exclusions})")
|
||||
|
||||
@@ -45,6 +45,7 @@ apt-get install -y \
|
||||
libgif-dev \
|
||||
libgl1-mesa-dev \
|
||||
libglew-dev \
|
||||
libgrpc++-dev libgrpc-dev \
|
||||
libgsl-dev \
|
||||
libgtest-dev \
|
||||
libgtk2.0-dev \
|
||||
@@ -56,7 +57,7 @@ apt-get install -y \
|
||||
libopenmpi-dev openmpi-bin \
|
||||
libpng-dev \
|
||||
libpq-dev postgresql-server-dev-11 \
|
||||
libprotobuf-dev libprotobuf-c-dev libprotoc-dev protobuf-compiler \
|
||||
libprotobuf-dev libprotobuf-c-dev libprotoc-dev protobuf-compiler protobuf-compiler-grpc \
|
||||
libsdl-dev \
|
||||
libsqlite3-dev \
|
||||
libtiff-dev \
|
||||
|
||||
@@ -45,6 +45,7 @@ apt-get install -y \
|
||||
libgif-dev \
|
||||
libgl1-mesa-dev \
|
||||
libglew-dev \
|
||||
libgrpc++-dev libgrpc-dev \
|
||||
libgsl-dev \
|
||||
libgtest-dev \
|
||||
libgtk2.0-dev \
|
||||
@@ -56,7 +57,7 @@ apt-get install -y \
|
||||
libopenmpi-dev openmpi-bin \
|
||||
libpng-dev \
|
||||
libpq-dev postgresql-server-dev-11 \
|
||||
libprotobuf-dev libprotobuf-c-dev libprotoc-dev protobuf-compiler \
|
||||
libprotobuf-dev libprotobuf-c-dev libprotoc-dev protobuf-compiler protobuf-compiler-grpc \
|
||||
libsdl-dev \
|
||||
libsqlite3-dev \
|
||||
libtiff-dev \
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
FROM fedora:33 as rvm-build
|
||||
FROM fedora:34 as rvm-build
|
||||
MAINTAINER Ben Boeckel <ben.boeckel@kitware.com>
|
||||
|
||||
COPY install_rvm.sh /root/install_rvm.sh
|
||||
RUN sh /root/install_rvm.sh
|
||||
|
||||
FROM fedora:33
|
||||
FROM fedora:34
|
||||
MAINTAINER Ben Boeckel <ben.boeckel@kitware.com>
|
||||
|
||||
COPY install_deps.sh /root/install_deps.sh
|
||||
@@ -6,7 +6,8 @@ set -e
|
||||
dnf install --setopt=install_weak_deps=False -y \
|
||||
ncurses-devel \
|
||||
openssl-devel \
|
||||
qt5-qtbase-devel
|
||||
qt5-qtbase-devel \
|
||||
qt6-qtbase-devel
|
||||
|
||||
# Install development tools.
|
||||
dnf install --setopt=install_weak_deps=False -y \
|
||||
@@ -19,7 +20,12 @@ dnf install --setopt=install_weak_deps=False -y \
|
||||
dnf install --setopt=install_weak_deps=False -y \
|
||||
python3-sphinx \
|
||||
texinfo \
|
||||
qt5-qttools-devel
|
||||
qt5-qttools-devel \
|
||||
qt6-qttools-devel
|
||||
|
||||
# Install lint tools.
|
||||
dnf install --setopt=install_weak_deps=False -y \
|
||||
codespell
|
||||
|
||||
# Tools needed for the test suite.
|
||||
dnf install --setopt=install_weak_deps=False -y \
|
||||
@@ -46,6 +52,7 @@ dnf install --setopt=install_weak_deps=False -y \
|
||||
glew-devel \
|
||||
gmock \
|
||||
gnutls-devel \
|
||||
grpc-devel grpc-plugins \
|
||||
gsl-devel \
|
||||
gtest-devel \
|
||||
gtk2-devel \
|
||||
@@ -61,13 +68,14 @@ dnf install --setopt=install_weak_deps=False -y \
|
||||
libuv-devel \
|
||||
libxml2-devel \
|
||||
libxslt-devel \
|
||||
mpich-devel \
|
||||
openmpi-devel \
|
||||
patch \
|
||||
perl \
|
||||
protobuf-devel protobuf-c-devel protobuf-lite-devel \
|
||||
pypy2 pypy2-devel \
|
||||
pypy3 pypy3-devel \
|
||||
python2 python2-devel python2-numpy \
|
||||
python2 python2-devel \
|
||||
python3 python3-devel python3-numpy \
|
||||
python3-jsmin python3-jsonschema \
|
||||
ruby rubygems ruby-devel \
|
||||
@@ -80,3 +88,9 @@ dnf install --setopt=install_weak_deps=False -y \
|
||||
xz-devel
|
||||
|
||||
dnf clean all
|
||||
|
||||
# Fedora no longer packages python2 numpy.
|
||||
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py
|
||||
python2 get-pip.py
|
||||
rm get-pip.py
|
||||
pip2.7 install numpy
|
||||
14
.gitlab/ci/env.sh
Normal file
14
.gitlab/ci/env.sh
Normal file
@@ -0,0 +1,14 @@
|
||||
quietly() {
|
||||
readonly log="/tmp/quietly-$RANDOM.log"
|
||||
if ! "$@" >"$log" 2>&1; then
|
||||
ret=$?
|
||||
cat "$log"
|
||||
rm -f "$log"
|
||||
exit $ret
|
||||
fi
|
||||
rm -f "$log"
|
||||
}
|
||||
|
||||
if test -r ".gitlab/ci/env_${CMAKE_CONFIGURATION}.sh"; then
|
||||
source ".gitlab/ci/env_${CMAKE_CONFIGURATION}.sh"
|
||||
fi
|
||||
@@ -1,2 +1,2 @@
|
||||
set(ENV{MY_RUBY_HOME} "/usr/local/rvm/rubies/ruby-2.7.0")
|
||||
set(ENV{PATH} "/usr/lib64/openmpi/bin:$ENV{PATH}")
|
||||
set(ENV{PATH} "/usr/lib64/mpich/bin:$ENV{PATH}")
|
||||
9
.gitlab/ci/env_intelclassic_common.sh
Normal file
9
.gitlab/ci/env_intelclassic_common.sh
Normal file
@@ -0,0 +1,9 @@
|
||||
source .gitlab/ci/env_intelcompiler_license.sh
|
||||
|
||||
if test -r /opt/intel/oneapi/setvars.sh; then
|
||||
source /opt/intel/oneapi/setvars.sh
|
||||
elif test -r /opt/intel/bin/compilervars.sh; then
|
||||
source /opt/intel/bin/compilervars.sh intel64
|
||||
fi
|
||||
|
||||
export CC=icc CXX=icpc FC=ifort
|
||||
1
.gitlab/ci/env_intelclassic_makefiles.sh
Normal file
1
.gitlab/ci/env_intelclassic_makefiles.sh
Normal file
@@ -0,0 +1 @@
|
||||
source .gitlab/ci/env_intelclassic_common.sh
|
||||
8
.gitlab/ci/env_intelcompiler_license.sh
Normal file
8
.gitlab/ci/env_intelcompiler_license.sh
Normal file
@@ -0,0 +1,8 @@
|
||||
if test -n "$CMAKE_CI_INTELCOMPILER_LICENSE"; then
|
||||
if test -d /opt/intel/licenses; then
|
||||
mv "$CMAKE_CI_INTELCOMPILER_LICENSE" /opt/intel/licenses/ci.lic
|
||||
else
|
||||
rm "$CMAKE_CI_INTELCOMPILER_LICENSE"
|
||||
fi
|
||||
unset CMAKE_CI_INTELCOMPILER_LICENSE
|
||||
fi
|
||||
7
.gitlab/ci/env_inteloneapi_common.sh
Normal file
7
.gitlab/ci/env_inteloneapi_common.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
source .gitlab/ci/env_intelcompiler_license.sh
|
||||
|
||||
if test -r /opt/intel/oneapi/setvars.sh; then
|
||||
source /opt/intel/oneapi/setvars.sh
|
||||
fi
|
||||
|
||||
export CC=icx CXX=icpx FC=ifx
|
||||
1
.gitlab/ci/env_inteloneapi_makefiles.sh
Normal file
1
.gitlab/ci/env_inteloneapi_makefiles.sh
Normal file
@@ -0,0 +1 @@
|
||||
source .gitlab/ci/env_inteloneapi_common.sh
|
||||
@@ -17,7 +17,11 @@ if ("$ENV{CMAKE_CONFIGURATION}" STREQUAL "")
|
||||
endif ()
|
||||
|
||||
# Set the build metadata.
|
||||
set(CTEST_BUILD_NAME "$ENV{CI_PROJECT_NAME}-$ENV{CMAKE_CONFIGURATION}")
|
||||
if(NOT "$ENV{CMAKE_CI_BUILD_NAME}" STREQUAL "")
|
||||
set(CTEST_BUILD_NAME "$ENV{CI_PROJECT_NAME}-$ENV{CMAKE_CI_BUILD_NAME}")
|
||||
else()
|
||||
set(CTEST_BUILD_NAME "$ENV{CI_PROJECT_NAME}-$ENV{CMAKE_CONFIGURATION}")
|
||||
endif()
|
||||
set(CTEST_SITE "gitlab-ci")
|
||||
set(ctest_model "Experimental")
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
### Release
|
||||
|
||||
.linux_prep_source:
|
||||
image: "fedora:33"
|
||||
image: "fedora:34"
|
||||
|
||||
variables:
|
||||
GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci"
|
||||
@@ -30,10 +30,22 @@
|
||||
variables:
|
||||
BOOTSTRAP_ARGS: '-- "-DCMake_DOC_ARTIFACT_PREFIX=$CI_PROJECT_DIR/build/install-doc"'
|
||||
|
||||
.needs_centos6_x86_64:
|
||||
dependencies:
|
||||
- build:centos6-x86_64
|
||||
needs:
|
||||
- build:centos6-x86_64
|
||||
|
||||
.needs_centos7_aarch64:
|
||||
dependencies:
|
||||
- build:centos7-aarch64
|
||||
needs:
|
||||
- build:centos7-aarch64
|
||||
|
||||
### Debian
|
||||
|
||||
.debian10:
|
||||
image: "kitware/cmake:ci-debian10-x86_64-2021-04-06"
|
||||
image: "kitware/cmake:ci-debian10-x86_64-2021-05-11"
|
||||
|
||||
variables:
|
||||
GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci"
|
||||
@@ -48,7 +60,7 @@
|
||||
CMake_SKIP_INSTALL: 1
|
||||
|
||||
.debian10_aarch64:
|
||||
image: "kitware/cmake:ci-debian10-aarch64-2021-04-06"
|
||||
image: "kitware/cmake:ci-debian10-aarch64-2021-05-11"
|
||||
|
||||
variables:
|
||||
GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci"
|
||||
@@ -56,8 +68,8 @@
|
||||
|
||||
### Fedora
|
||||
|
||||
.fedora33:
|
||||
image: "kitware/cmake:ci-fedora33-x86_64-2021-04-06"
|
||||
.fedora34:
|
||||
image: "kitware/cmake:ci-fedora34-x86_64-2021-05-21"
|
||||
|
||||
variables:
|
||||
GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci/long file name for testing purposes"
|
||||
@@ -65,28 +77,28 @@
|
||||
|
||||
#### Lint builds
|
||||
|
||||
.fedora33_tidy:
|
||||
extends: .fedora33
|
||||
.fedora34_tidy:
|
||||
extends: .fedora34
|
||||
|
||||
variables:
|
||||
CMAKE_CONFIGURATION: fedora33_tidy
|
||||
CMAKE_CONFIGURATION: fedora34_tidy
|
||||
CTEST_NO_WARNINGS_ALLOWED: 1
|
||||
CMake_SKIP_INSTALL: 1
|
||||
|
||||
.fedora33_sphinx:
|
||||
extends: .fedora33
|
||||
.fedora34_sphinx:
|
||||
extends: .fedora34
|
||||
|
||||
variables:
|
||||
CMAKE_CONFIGURATION: fedora33_sphinx
|
||||
CMAKE_CONFIGURATION: fedora34_sphinx
|
||||
CTEST_NO_WARNINGS_ALLOWED: 1
|
||||
CTEST_SOURCE_SUBDIRECTORY: "Utilities/Sphinx"
|
||||
CMake_SKIP_INSTALL: 1
|
||||
|
||||
.fedora33_sphinx_package:
|
||||
extends: .fedora33
|
||||
.fedora34_sphinx_package:
|
||||
extends: .fedora34
|
||||
|
||||
variables:
|
||||
CMAKE_CONFIGURATION: fedora33_sphinx_package
|
||||
CMAKE_CONFIGURATION: fedora34_sphinx_package
|
||||
CTEST_SOURCE_SUBDIRECTORY: "Utilities/Sphinx"
|
||||
|
||||
#### Build and test
|
||||
@@ -105,29 +117,50 @@
|
||||
CMAKE_CONFIGURATION: debian10_aarch64_ninja
|
||||
CTEST_NO_WARNINGS_ALLOWED: 1
|
||||
|
||||
.fedora33_ninja:
|
||||
extends: .fedora33
|
||||
.fedora34_ninja:
|
||||
extends: .fedora34
|
||||
|
||||
variables:
|
||||
CMAKE_CONFIGURATION: fedora33_ninja
|
||||
CMAKE_CONFIGURATION: fedora34_ninja
|
||||
CTEST_NO_WARNINGS_ALLOWED: 1
|
||||
|
||||
.fedora33_ninja_multi:
|
||||
extends: .fedora33
|
||||
.fedora34_ninja_multi:
|
||||
extends: .fedora34
|
||||
|
||||
variables:
|
||||
CMAKE_CONFIGURATION: fedora33_ninja_multi
|
||||
CMAKE_CONFIGURATION: fedora34_ninja_multi
|
||||
CTEST_NO_WARNINGS_ALLOWED: 1
|
||||
CMAKE_GENERATOR: "Ninja Multi-Config"
|
||||
|
||||
.fedora33_makefiles:
|
||||
extends: .fedora33
|
||||
.fedora34_makefiles:
|
||||
extends: .fedora34
|
||||
|
||||
variables:
|
||||
CMAKE_CONFIGURATION: fedora33_makefiles
|
||||
CMAKE_CONFIGURATION: fedora34_makefiles
|
||||
CTEST_NO_WARNINGS_ALLOWED: 1
|
||||
CMAKE_GENERATOR: "Unix Makefiles"
|
||||
|
||||
### Intel Compiler
|
||||
|
||||
.intelcompiler:
|
||||
image: "kitware/intelcompiler:$CMAKE_CI_INTELCOMPILER_IMAGE_TAG"
|
||||
environment:
|
||||
name: intel-compiler
|
||||
variables:
|
||||
CMAKE_ARCH: x86_64
|
||||
|
||||
.intelclassic_makefiles:
|
||||
extends: .intelcompiler
|
||||
variables:
|
||||
CMAKE_CONFIGURATION: intelclassic_makefiles
|
||||
CMAKE_GENERATOR: "Unix Makefiles"
|
||||
|
||||
.inteloneapi_makefiles:
|
||||
extends: .intelcompiler
|
||||
variables:
|
||||
CMAKE_CONFIGURATION: inteloneapi_makefiles
|
||||
CMAKE_GENERATOR: "Unix Makefiles"
|
||||
|
||||
### CUDA builds
|
||||
|
||||
.cuda10.2:
|
||||
@@ -195,6 +228,7 @@
|
||||
## Linux-specific scripts
|
||||
|
||||
.before_script_linux: &before_script_linux
|
||||
- source .gitlab/ci/env.sh
|
||||
- .gitlab/ci/cmake.sh
|
||||
- .gitlab/ci/ninja.sh
|
||||
- export PATH=$PWD/.gitlab:$PWD/.gitlab/cmake/bin:$PATH
|
||||
@@ -224,6 +258,13 @@
|
||||
|
||||
interruptible: true
|
||||
|
||||
.cmake_codespell_linux:
|
||||
stage: build
|
||||
extends: .fedora34
|
||||
script:
|
||||
- codespell
|
||||
interruptible: true
|
||||
|
||||
.cmake_build_linux:
|
||||
stage: build
|
||||
|
||||
@@ -251,6 +292,7 @@
|
||||
stage: build
|
||||
|
||||
script:
|
||||
- source .gitlab/ci/env.sh
|
||||
# Bootstrap.
|
||||
- mkdir -p build/
|
||||
# Exclude documentation. A job dependency provides it for packaging.
|
||||
@@ -313,3 +355,38 @@
|
||||
- sccache --show-stats
|
||||
|
||||
interruptible: true
|
||||
|
||||
.cmake_test_linux_intelclassic_makefiles:
|
||||
extends:
|
||||
- .intelclassic_makefiles
|
||||
- .cmake_test_linux_release
|
||||
- .linux_builder_tags_qt
|
||||
- .run_manually
|
||||
- .needs_centos6_x86_64
|
||||
variables:
|
||||
CMAKE_CI_JOB_NIGHTLY: "true"
|
||||
|
||||
.cmake_test_linux_inteloneapi_makefiles:
|
||||
extends:
|
||||
- .inteloneapi_makefiles
|
||||
- .cmake_test_linux_release
|
||||
- .linux_builder_tags_qt
|
||||
- .run_manually
|
||||
- .needs_centos6_x86_64
|
||||
variables:
|
||||
CMAKE_CI_JOB_NIGHTLY: "true"
|
||||
|
||||
### Documentation
|
||||
|
||||
.cmake_org_help:
|
||||
stage: build
|
||||
extends:
|
||||
- .fedora34
|
||||
- .linux_builder_tags
|
||||
- .cmake_org_help_artifacts
|
||||
script:
|
||||
- *before_script_linux
|
||||
- mkdir -p build/
|
||||
- cd build/
|
||||
- cmake ../Utilities/Sphinx -GNinja -DSPHINX_HTML=ON -DSPHINX_FLAGS="-A versionswitch=1"
|
||||
- ninja
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
when: never
|
||||
- if: '$CMAKE_CI_NIGHTLY == "true"'
|
||||
when: on_success
|
||||
- if: '($CMAKE_CI_PROJECT_CONTINUOUS_BRANCH != "" && $CI_COMMIT_BRANCH == $CMAKE_CI_PROJECT_CONTINUOUS_BRANCH && $CMAKE_CI_JOB_CONTINUOUS == "true")'
|
||||
- if: '$CMAKE_CI_JOB_NIGHTLY == "true"'
|
||||
when: never
|
||||
- if: '$CMAKE_CI_PROJECT_CONTINUOUS_BRANCH != null && $CI_COMMIT_BRANCH != null && $CMAKE_CI_PROJECT_CONTINUOUS_BRANCH == $CI_COMMIT_BRANCH && $CMAKE_CI_JOB_CONTINUOUS == "true"'
|
||||
when: delayed
|
||||
start_in: 5 minutes
|
||||
- if: '($CMAKE_CI_NO_MR == "true" && $CI_MERGE_REQUEST_ID)'
|
||||
@@ -24,7 +26,9 @@
|
||||
when: never
|
||||
- if: '$CMAKE_CI_NIGHTLY == "true"'
|
||||
when: on_success
|
||||
- if: '($CMAKE_CI_PROJECT_CONTINUOUS_BRANCH != "" && $CI_COMMIT_BRANCH == $CMAKE_CI_PROJECT_CONTINUOUS_BRANCH && $CMAKE_CI_JOB_CONTINUOUS == "true")'
|
||||
- if: '$CMAKE_CI_JOB_NIGHTLY == "true"'
|
||||
when: never
|
||||
- if: '$CMAKE_CI_PROJECT_CONTINUOUS_BRANCH != null && $CI_COMMIT_BRANCH != null && $CMAKE_CI_PROJECT_CONTINUOUS_BRANCH == $CI_COMMIT_BRANCH && $CMAKE_CI_JOB_CONTINUOUS == "true"'
|
||||
when: on_success
|
||||
- if: '($CMAKE_CI_NO_MR == "true" && $CI_MERGE_REQUEST_ID)'
|
||||
when: never
|
||||
@@ -43,6 +47,8 @@
|
||||
when: always
|
||||
- if: '$CMAKE_CI_NIGHTLY == "true"'
|
||||
when: on_success
|
||||
- if: '$CMAKE_CI_JOB_NIGHTLY == "true"'
|
||||
when: never
|
||||
- if: '($CMAKE_CI_NO_MR == "true" && $CI_MERGE_REQUEST_ID)'
|
||||
when: never
|
||||
- if: '$CI_MERGE_REQUEST_ID'
|
||||
@@ -56,3 +62,15 @@
|
||||
- if: '$CMAKE_CI_PACKAGE == "true"'
|
||||
when: on_success
|
||||
- when: never
|
||||
|
||||
.run_only_for_continuous_master:
|
||||
rules:
|
||||
- if: '$CMAKE_CI_PROJECT_MAIN_BRANCH != null && $CI_COMMIT_BRANCH != null && $CMAKE_CI_PROJECT_MAIN_BRANCH == $CI_COMMIT_BRANCH'
|
||||
when: on_success
|
||||
- when: never
|
||||
|
||||
.run_only_for_continuous_stage:
|
||||
rules:
|
||||
- if: '$CMAKE_CI_PROJECT_CONTINUOUS_BRANCH != null && $CI_COMMIT_BRANCH != null && $CMAKE_CI_PROJECT_CONTINUOUS_BRANCH == $CI_COMMIT_BRANCH'
|
||||
when: on_success
|
||||
- when: never
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
# Steps for uploading artifacts
|
||||
|
||||
.rsync_upload:
|
||||
image: "fedora:32"
|
||||
.rsync_upload_binary:
|
||||
image: "fedora:34"
|
||||
stage: upload
|
||||
tags:
|
||||
- cmake
|
||||
- docker
|
||||
- linux
|
||||
- build
|
||||
@@ -16,3 +17,21 @@
|
||||
- chmod 400 $RSYNC_BINARY_KEY
|
||||
- ssh-keygen -y -f $RSYNC_BINARY_KEY > $RSYNC_BINARY_KEY.pub
|
||||
- rsync -tv --recursive -e "ssh -i $RSYNC_BINARY_KEY -o StrictHostKeyChecking=no -o LogLevel=ERROR" build/ kitware@cmake.org:$RSYNC_DESTINATION/
|
||||
|
||||
.rsync_upload_help:
|
||||
stage: upload
|
||||
image: "fedora:34"
|
||||
tags:
|
||||
- cmake
|
||||
- docker
|
||||
- linux
|
||||
- build
|
||||
environment:
|
||||
name: rsync-upload
|
||||
|
||||
script:
|
||||
- ls build/html/index.html
|
||||
- dnf install -y --setopt=install_weak_deps=False rsync openssh-clients
|
||||
- chmod 400 $RSYNC_HELP_KEY
|
||||
- ssh-keygen -y -f $RSYNC_HELP_KEY > $RSYNC_HELP_KEY.pub
|
||||
- rsync -tv --recursive --delete -e "ssh -i $RSYNC_HELP_KEY -o StrictHostKeyChecking=no -o LogLevel=ERROR" build/html/ kitware@cmake.org:$RSYNC_DESTINATION/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
" Former Maintainer: Karthik Krishnan <karthik.krishnan@kitware.com>
|
||||
" Last Change: @DATE@
|
||||
"
|
||||
" Licence: The CMake license applies to this file. See
|
||||
" License: The CMake license applies to this file. See
|
||||
" https://cmake.org/licensing
|
||||
" This implies that distribution with Vim is allowed
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
" Former Maintainer: Karthik Krishnan <karthik.krishnan@kitware.com>
|
||||
" Last Change: 2017 Aug 30
|
||||
"
|
||||
" Licence: The CMake license applies to this file. See
|
||||
" License: The CMake license applies to this file. See
|
||||
" https://cmake.org/licensing
|
||||
" This implies that distribution with Vim is allowed
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
" Former Maintainer: Karthik Krishnan <karthik.krishnan@kitware.com>
|
||||
" Last Change: 2020 oct. 28
|
||||
"
|
||||
" Licence: The CMake license applies to this file. See
|
||||
" License: The CMake license applies to this file. See
|
||||
" https://cmake.org/licensing
|
||||
" This implies that distribution with Vim is allowed
|
||||
|
||||
@@ -92,6 +92,7 @@ syn keyword cmakeProperty contained
|
||||
\ AUTOUIC_EXECUTABLE
|
||||
\ AUTOUIC_OPTIONS
|
||||
\ AUTOUIC_SEARCH_PATHS
|
||||
\ AUTOUIC_SOURCE_GROUP
|
||||
\ BINARY_DIR
|
||||
\ BUILDSYSTEM_TARGETS
|
||||
\ BUILD_RPATH
|
||||
|
||||
@@ -133,6 +133,9 @@ if(CMake_INSTALL_COMPONENTS)
|
||||
if(SPHINX_QTHELP)
|
||||
list(APPEND _CPACK_IFW_COMPONENTS_ALL sphinx-qthelp)
|
||||
endif()
|
||||
if(SPHINX_LATEXPDF)
|
||||
list(APPEND _CPACK_IFW_COMPONENTS_ALL sphinx-latexpdf)
|
||||
endif()
|
||||
if(CMake_BUILD_DEVELOPER_REFERENCE)
|
||||
if(CMake_BUILD_DEVELOPER_REFERENCE_HTML)
|
||||
list(APPEND _CPACK_IFW_COMPONENTS_ALL cmake-developer-reference-html)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1...3.18 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION 3.1...3.19 FATAL_ERROR)
|
||||
set(CMAKE_USER_MAKE_RULES_OVERRIDE_C ${CMAKE_CURRENT_SOURCE_DIR}/Source/Modules/OverrideC.cmake)
|
||||
set(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX ${CMAKE_CURRENT_SOURCE_DIR}/Source/Modules/OverrideCXX.cmake)
|
||||
project(CMake)
|
||||
@@ -579,6 +579,7 @@ macro (CMAKE_BUILD_UTILITIES)
|
||||
set(LIBLZMA_INCLUDE_DIR
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/Utilities/cmliblzma/liblzma/api")
|
||||
set(LIBLZMA_LIBRARY cmliblzma)
|
||||
set(HAVE_LZMA_STREAM_ENCODER_MT 1)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -643,7 +644,11 @@ macro (CMAKE_BUILD_UTILITIES)
|
||||
#---------------------------------------------------------------------
|
||||
# Build libuv library.
|
||||
if(CMAKE_USE_SYSTEM_LIBUV)
|
||||
find_package(LibUV 1.10.0)
|
||||
if(WIN32)
|
||||
find_package(LibUV 1.38.0)
|
||||
else()
|
||||
find_package(LibUV 1.10.0)
|
||||
endif()
|
||||
if(NOT LIBUV_FOUND)
|
||||
message(FATAL_ERROR
|
||||
"CMAKE_USE_SYSTEM_LIBUV is ON but a libuv is not found!")
|
||||
|
||||
@@ -38,7 +38,7 @@ To contribute patches:
|
||||
#. Push the topic branch to a personal repository fork on GitLab.
|
||||
#. Create a GitLab Merge Request targeting the upstream ``master`` branch
|
||||
(even if the change is intended for merge to the ``release`` branch).
|
||||
Check the box labelled "Allow commits from members who can merge to the
|
||||
Check the box labeled "Allow commits from members who can merge to the
|
||||
target branch". This will allow maintainers to make minor edits on your
|
||||
behalf.
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION
|
||||
"warning LNK4221"
|
||||
"warning LNK4204" # Occurs by race condition with objects in small libs
|
||||
"variable .var_args[2]*. is used before its value is set"
|
||||
"warning: variable .__d[01]. was set but never used" # FD_ZERO on NVHPC
|
||||
"jobserver unavailable"
|
||||
"warning: \\(Long double usage is reported only once for each file"
|
||||
"warning: To disable this warning use"
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
Host And Device Specific Link Options
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. versionadded:: 3.18
|
||||
When a device link step is involved, which is controlled by
|
||||
|
||||
@@ -11,8 +11,8 @@ The general signature is:
|
||||
|FIND_XXX| (
|
||||
<VAR>
|
||||
name | |NAMES|
|
||||
[HINTS path1 [path2 ... ENV var]]
|
||||
[PATHS path1 [path2 ... ENV var]]
|
||||
[HINTS [path | ENV var]... ]
|
||||
[PATHS [path | ENV var]... ]
|
||||
[PATH_SUFFIXES suffix1 [suffix2 ...]]
|
||||
[DOC "cache documentation string"]
|
||||
[REQUIRED]
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
Handling Compiler Driver Differences
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
To pass options to the linker tool, each compiler driver has its own syntax.
|
||||
The ``LINKER:`` prefix and ``,`` separator can be used to specify, in a portable
|
||||
way, options to pass to the linker tool. ``LINKER:`` is replaced by the
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
The final set of compile or link options used for a target is constructed by
|
||||
Option De-duplication
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
The final set of options used for a target is constructed by
|
||||
accumulating options from the current target and the usage requirements of
|
||||
its dependencies. The set of options is de-duplicated to avoid repetition.
|
||||
|
||||
.. versionadded:: 3.12
|
||||
While beneficial for individual options, the de-duplication step can break
|
||||
up option groups. For example, ``-D A -D B`` becomes ``-D A B``. One may
|
||||
specify a group of options using shell-like quoting along with a ``SHELL:``
|
||||
prefix. The ``SHELL:`` prefix is dropped, and the rest of the option string
|
||||
is parsed using the :command:`separate_arguments` ``UNIX_COMMAND`` mode.
|
||||
For example, ``"SHELL:-D A" "SHELL:-D B"`` becomes ``-D A -D B``.
|
||||
up option groups. For example, ``-option A -option B`` becomes
|
||||
``-option A B``. One may specify a group of options using shell-like
|
||||
quoting along with a ``SHELL:`` prefix. The ``SHELL:`` prefix is dropped,
|
||||
and the rest of the option string is parsed using the
|
||||
:command:`separate_arguments` ``UNIX_COMMAND`` mode. For example,
|
||||
``"SHELL:-option A" "SHELL:-option B"`` becomes ``-option A -option B``.
|
||||
|
||||
@@ -271,21 +271,28 @@ The options are:
|
||||
``DEPFILE``
|
||||
.. versionadded:: 3.7
|
||||
|
||||
Specify a ``.d`` depfile for the :generator:`Ninja` generator and
|
||||
:ref:`Makefile Generators`.
|
||||
A ``.d`` file holds dependencies usually emitted by the custom
|
||||
command itself.
|
||||
Using ``DEPFILE`` with other generators than :generator:`Ninja` or
|
||||
:ref:`Makefile Generators` is an error.
|
||||
Specify a ``.d`` depfile for the :generator:`Ninja`, :generator:`Xcode` and
|
||||
:ref:`Makefile <Makefile Generators>` generators. The depfile may use
|
||||
"generator expressions" with the syntax ``$<...>``. See the
|
||||
:manual:`generator-expressions(7) <cmake-generator-expressions(7)>` manual
|
||||
for available expressions. A ``.d`` file holds dependencies usually emitted
|
||||
by the custom command itself.
|
||||
|
||||
Using ``DEPFILE`` with other generators than :generator:`Ninja`,
|
||||
:generator:`Xcode` or :ref:`Makefile <Makefile Generators>` is an error.
|
||||
|
||||
.. versionadded:: 3.20
|
||||
Added the support of :ref:`Makefile Generators`.
|
||||
|
||||
.. versionadded:: 3.21
|
||||
Added the support of :generator:`Xcode` generator and
|
||||
:manual:`generator expressions <cmake-generator-expressions(7)>`.
|
||||
|
||||
If the ``DEPFILE`` argument is relative, it should be relative to
|
||||
:variable:`CMAKE_CURRENT_BINARY_DIR`, and any relative paths inside the
|
||||
``DEPFILE`` should also be relative to :variable:`CMAKE_CURRENT_BINARY_DIR`
|
||||
(see policy :policy:`CMP0116`. This policy is always ``NEW`` for
|
||||
:ref:`Makefile Generators`).
|
||||
:ref:`Makefile <Makefile Generators>` and :generator:`Xcode` generators).
|
||||
|
||||
.. note::
|
||||
|
||||
|
||||
@@ -8,23 +8,29 @@ This is mainly intended for internal use by the :module:`CTest` module.
|
||||
|
||||
build_command(<variable>
|
||||
[CONFIGURATION <config>]
|
||||
[PARALLEL_LEVEL <parallel>]
|
||||
[TARGET <target>]
|
||||
[PROJECT_NAME <projname>] # legacy, causes warning
|
||||
)
|
||||
|
||||
Sets the given ``<variable>`` to a command-line string of the form::
|
||||
|
||||
<cmake> --build . [--config <config>] [--target <target>...] [-- -i]
|
||||
<cmake> --build . [--config <config>] [--parallel <parallel>] [--target <target>...] [-- -i]
|
||||
|
||||
where ``<cmake>`` is the location of the :manual:`cmake(1)` command-line
|
||||
tool, and ``<config>`` and ``<target>`` are the values provided to the
|
||||
``CONFIGURATION`` and ``TARGET`` options, if any. The trailing ``-- -i``
|
||||
option is added for :ref:`Makefile Generators` if policy :policy:`CMP0061`
|
||||
is not set to ``NEW``.
|
||||
tool, and ``<config>``, ``<parallel>`` and ``<target>`` are the values
|
||||
provided to the ``CONFIGURATION``, ``PARALLEL_LEVEL`` and ``TARGET``
|
||||
options, if any. The trailing ``-- -i`` option is added for
|
||||
:ref:`Makefile Generators` if policy :policy:`CMP0061` is not set to
|
||||
``NEW``.
|
||||
|
||||
When invoked, this ``cmake --build`` command line will launch the
|
||||
underlying build system tool.
|
||||
|
||||
.. versionadded:: 3.21
|
||||
The ``PARALLEL_LEVEL`` argument can be used to set the ``--parallel``
|
||||
flag.
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
build_command(<cachevariable> <makecommand>)
|
||||
|
||||
@@ -190,7 +190,7 @@ For example, the code:
|
||||
.. code-block:: cmake
|
||||
|
||||
cmake_language(DEFER CALL message "${deferred_message}")
|
||||
cmake_language(DEFER ID_VAR id CALL message "Cancelled Message")
|
||||
cmake_language(DEFER ID_VAR id CALL message "Canceled Message")
|
||||
cmake_language(DEFER CANCEL_CALL ${id})
|
||||
message("Immediate Message")
|
||||
set(deferred_message "Deferred Message")
|
||||
@@ -201,7 +201,7 @@ prints::
|
||||
Deferred Message
|
||||
|
||||
The ``Cancelled Message`` is never printed because its command is
|
||||
cancelled. The ``deferred_message`` variable reference is not evaluated
|
||||
canceled. The ``deferred_message`` variable reference is not evaluated
|
||||
until the call site, so it can be set after the deferred call is scheduled.
|
||||
|
||||
In order to evaluate variable references immediately when scheduling a
|
||||
|
||||
@@ -5,21 +5,21 @@ Require a minimum version of cmake.
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
cmake_minimum_required(VERSION <min>[...<max>] [FATAL_ERROR])
|
||||
cmake_minimum_required(VERSION <min>[...<policy_max>] [FATAL_ERROR])
|
||||
|
||||
.. versionadded:: 3.12
|
||||
The optional ``<max>`` version.
|
||||
The optional ``<policy_max>`` version.
|
||||
|
||||
Sets the minimum required version of cmake for a project.
|
||||
Also updates the policy settings as explained below.
|
||||
|
||||
``<min>`` and the optional ``<max>`` are each CMake versions of the form
|
||||
``major.minor[.patch[.tweak]]``, and the ``...`` is literal.
|
||||
``<min>`` and the optional ``<policy_max>`` are each CMake versions of the
|
||||
form ``major.minor[.patch[.tweak]]``, and the ``...`` is literal.
|
||||
|
||||
If the running version of CMake is lower than the ``<min>`` required
|
||||
version it will stop processing the project and report an error.
|
||||
The optional ``<max>`` version, if specified, must be at least the
|
||||
``<min>`` version and affects policy settings as described below.
|
||||
The optional ``<policy_max>`` version, if specified, must be at least the
|
||||
``<min>`` version and affects policy settings as described in `Policy Settings`_.
|
||||
If the running version of CMake is older than 3.12, the extra ``...``
|
||||
dots will be seen as version component separators, resulting in the
|
||||
``...<max>`` part being ignored and preserving the pre-3.12 behavior
|
||||
@@ -40,8 +40,15 @@ with an error instead of just a warning.
|
||||
they may affect. See also policy :policy:`CMP0000`.
|
||||
|
||||
Calling ``cmake_minimum_required()`` inside a :command:`function`
|
||||
limits some effects to the function scope when invoked. Such calls
|
||||
should not be made with the intention of having global effects.
|
||||
limits some effects to the function scope when invoked. For example,
|
||||
the :variable:`CMAKE_MINIMUM_REQUIRED_VERSION` variable won't be set
|
||||
in the calling scope. Functions do not introduce their own policy
|
||||
scope though, so policy settings of the caller *will* be affected
|
||||
(see below). Due to this mix of things that do and do not affect the
|
||||
calling scope, calling ``cmake_minimum_required()`` inside a function
|
||||
is generally discouraged.
|
||||
|
||||
.. _`Policy Settings`:
|
||||
|
||||
Policy Settings
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -687,7 +687,8 @@ When the ``NORMALIZE`` option is specified, the path is :ref:`normalized
|
||||
<Normalization>` after the path computation.
|
||||
|
||||
Because ``cmake_path()`` does not access the filesystem, symbolic links are
|
||||
not resolved. To compute a real path with symbolic links resolved, use the
|
||||
not resolved and any leading tilde is not expanded. To compute a real path
|
||||
with symbolic links resolved and leading tildes expanded, use the
|
||||
:command:`file(REAL_PATH)` command instead.
|
||||
|
||||
Native Conversion
|
||||
|
||||
@@ -36,8 +36,30 @@ or
|
||||
depending on whether ``VAR`` is set in CMake to any value not considered
|
||||
a false constant by the :command:`if` command. The "..." content on the
|
||||
line after the variable name, if any, is processed as above.
|
||||
Input file lines of the form ``#cmakedefine01 VAR`` will be replaced with
|
||||
either ``#define VAR 1`` or ``#define VAR 0`` similarly.
|
||||
|
||||
Unlike lines of the form ``#cmakedefine VAR ...``, in lines of the form
|
||||
``#cmakedefine01 VAR``, ``VAR`` itself will expand to ``VAR 0`` or ``VAR 1``
|
||||
rather than being assigned the value ``...``. Therefore, input lines of the form
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
#cmakedefine01 VAR
|
||||
|
||||
will be replaced with either
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
#define VAR 0
|
||||
|
||||
or
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
#define VAR 1
|
||||
|
||||
Input lines of the form ``#cmakedefine01 VAR ...`` will expand
|
||||
as ``#cmakedefine01 VAR ... 0`` or ``#cmakedefine01 VAR ... 0``,
|
||||
which may lead to undefined behavior.
|
||||
|
||||
.. versionadded:: 3.10
|
||||
The result lines (with the exception of the ``#undef`` comments) can be
|
||||
|
||||
@@ -7,6 +7,7 @@ Perform the :ref:`CTest Build Step` as a :ref:`Dashboard Client`.
|
||||
|
||||
ctest_build([BUILD <build-dir>] [APPEND]
|
||||
[CONFIGURATION <config>]
|
||||
[PARALLEL_LEVEL <parallel>]
|
||||
[FLAGS <flags>]
|
||||
[PROJECT_NAME <project-name>]
|
||||
[TARGET <target-name>]
|
||||
@@ -42,6 +43,13 @@ The options are:
|
||||
Otherwise the ``-C <cfg>`` option given to the :manual:`ctest(1)`
|
||||
command will be used, if any.
|
||||
|
||||
``PARALLEL_LEVEL <parallel>``
|
||||
.. versionadded:: 3.21
|
||||
|
||||
Specify the parallel level of the underlying build system. If not
|
||||
specified, the :envvar:`CMAKE_BUILD_PARALLEL_LEVEL` environment
|
||||
variable will be checked.
|
||||
|
||||
``FLAGS <flags>``
|
||||
Pass additional arguments to the underlying build command.
|
||||
If not specified the ``CTEST_BUILD_FLAGS`` variable will be checked.
|
||||
|
||||
@@ -25,6 +25,7 @@ Perform the :ref:`CTest Test Step` as a :ref:`Dashboard Client`.
|
||||
[RETURN_VALUE <result-var>]
|
||||
[CAPTURE_CMAKE_ERROR <result-var>]
|
||||
[REPEAT <mode>:<n>]
|
||||
[OUTPUT_JUNIT <file>]
|
||||
[QUIET]
|
||||
)
|
||||
|
||||
@@ -150,6 +151,15 @@ The options are:
|
||||
Store in the ``<result-var>`` variable -1 if there are any errors running
|
||||
the command and prevent ctest from returning non-zero if an error occurs.
|
||||
|
||||
``OUTPUT_JUNIT``
|
||||
.. versionadded:: 3.21
|
||||
|
||||
Write test results to ``<file>`` in JUnit XML format. If ``<file>`` is a
|
||||
relative path it will be placed in the build directory. If ``<file>>``
|
||||
already exists it will be overwritten. Note that the resulting JUnit XML
|
||||
file is **not** uploaded to CDash because it would be redundant with
|
||||
CTest's ``Test.xml`` file.
|
||||
|
||||
``QUIET``
|
||||
.. versionadded:: 3.3
|
||||
|
||||
@@ -160,3 +170,83 @@ The options are:
|
||||
|
||||
See also the :variable:`CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE`
|
||||
and :variable:`CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE` variables.
|
||||
|
||||
.. _`Additional Test Measurements`:
|
||||
|
||||
Additional Test Measurements
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
CTest can parse the output of your tests for extra measurements to report
|
||||
to CDash.
|
||||
|
||||
When run as a :ref:`Dashboard Client`, CTest will include these custom
|
||||
measurements in the ``Test.xml`` file that gets uploaded to CDash.
|
||||
|
||||
Check the `CDash test measurement documentation
|
||||
<https://github.com/Kitware/CDash/blob/master/docs/test_measurements.md>`_
|
||||
for more information on the types of test measurements that CDash recognizes.
|
||||
|
||||
The following example demonstrates how to output a variety of custom test
|
||||
measurements.
|
||||
|
||||
.. code-block:: c++
|
||||
|
||||
std::cout <<
|
||||
"<DartMeasurement type=\"numeric/double\" name=\"score\">28.3</DartMeasurement>"
|
||||
<< std::endl;
|
||||
|
||||
std::cout <<
|
||||
"<DartMeasurement type=\"text/string\" name=\"color\">red</DartMeasurement>"
|
||||
<< std::endl;
|
||||
|
||||
std::cout <<
|
||||
"<DartMeasurement type=\"text/link\" name=\"CMake URL\">https://cmake.org</DartMeasurement>"
|
||||
<< std::endl;
|
||||
|
||||
std::cout <<
|
||||
"<DartMeasurement type=\"text/preformatted\" name=\"Console Output\">" <<
|
||||
"line 1.\n" <<
|
||||
" \033[31;1m line 2. Bold red, and indented!\033[0;0ml\n" <<
|
||||
"line 3. Not bold or indented...\n" <<
|
||||
"</DartMeasurement>" << std::endl;
|
||||
|
||||
Image Measurements
|
||||
""""""""""""""""""
|
||||
|
||||
The following example demonstrates how to upload test images to CDash.
|
||||
|
||||
.. code-block:: c++
|
||||
|
||||
std::cout <<
|
||||
"<DartMeasurementFile type=\"image/jpg\" name=\"TestImage\">" <<
|
||||
"/dir/to/test_img.jpg</DartMeasurementFile>" << std::endl;
|
||||
|
||||
std::cout <<
|
||||
"<DartMeasurementFile type=\"image/gif\" name=\"ValidImage\">" <<
|
||||
"/dir/to/valid_img.gif</DartMeasurementFile>" << std::endl;
|
||||
|
||||
std::cout <<
|
||||
"<DartMeasurementFile type=\"image/png\" name=\"AlgoResult\"> <<
|
||||
"/dir/to/img.png</DartMeasurementFile>"
|
||||
<< std::endl;
|
||||
|
||||
Images will be displayed together in an interactive comparison mode on CDash
|
||||
if they are provided with two or more of the following names.
|
||||
|
||||
* ``TestImage``
|
||||
* ``ValidImage``
|
||||
* ``BaselineImage``
|
||||
* ``DifferenceImage2``
|
||||
|
||||
By convention, ``TestImage`` is the image generated by your test, and
|
||||
``ValidImage`` (or ``BaselineImage``) is basis of comparison used to determine
|
||||
if the test passed or failed.
|
||||
|
||||
If another image name is used it will be displayed by CDash as a static image
|
||||
separate from the interactive comparison UI.
|
||||
|
||||
Attached Files
|
||||
""""""""""""""
|
||||
|
||||
To associate other types of files with a test, use the
|
||||
:prop_test:`ATTACHED_FILES` or :prop_test:`ATTACHED_FILES_ON_FAIL` test properties.
|
||||
|
||||
@@ -38,7 +38,8 @@ Synopsis
|
||||
|
||||
`Filesystem`_
|
||||
file({`GLOB`_ | `GLOB_RECURSE`_} <out-var> [...] [<globbing-expr>...])
|
||||
file(`RENAME`_ <oldname> <newname>)
|
||||
file(`RENAME`_ <oldname> <newname> [...])
|
||||
file(`COPY_FILE`_ <oldname> <newname> [...])
|
||||
file({`REMOVE`_ | `REMOVE_RECURSE`_ } [<files>...])
|
||||
file(`MAKE_DIRECTORY`_ [<dir>...])
|
||||
file({`COPY`_ | `INSTALL`_} <file>... DESTINATION <dir> [...])
|
||||
@@ -49,7 +50,7 @@ Synopsis
|
||||
file(`CHMOD_RECURSE`_ <files>... <directories>... PERMISSIONS <permissions>... [...])
|
||||
|
||||
`Path Conversion`_
|
||||
file(`REAL_PATH`_ <path> <out-var> [BASE_DIRECTORY <dir>])
|
||||
file(`REAL_PATH`_ <path> <out-var> [BASE_DIRECTORY <dir>] [EXPAND_TILDE])
|
||||
file(`RELATIVE_PATH`_ <out-var> <directory> <file>)
|
||||
file({`TO_CMAKE_PATH`_ | `TO_NATIVE_PATH`_} <path> <out-var>)
|
||||
|
||||
@@ -675,11 +676,46 @@ Examples of recursive globbing include::
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
file(RENAME <oldname> <newname>)
|
||||
file(RENAME <oldname> <newname>
|
||||
[RESULT <result>]
|
||||
[NO_REPLACE])
|
||||
|
||||
Move a file or directory within a filesystem from ``<oldname>`` to
|
||||
``<newname>``, replacing the destination atomically.
|
||||
|
||||
The options are:
|
||||
|
||||
``RESULT <result>``
|
||||
Set ``<result>`` variable to ``0`` on success or an error message otherwise.
|
||||
If ``RESULT`` is not specified and the operation fails, an error is emitted.
|
||||
|
||||
``NO_REPLACE``
|
||||
If the ``<newname>`` path already exists, do not replace it.
|
||||
If ``RESULT <result>`` is used, the result variable will be
|
||||
set to ``NO_REPLACE``. Otherwise, an error is emitted.
|
||||
|
||||
.. _COPY_FILE:
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
file(COPY_FILE <oldname> <newname>
|
||||
[RESULT <result>]
|
||||
[ONLY_IF_DIFFERENT])
|
||||
|
||||
Copy a file from ``<oldname>`` to ``<newname>``. Directories are not
|
||||
supported. Symlinks are ignored and ``<oldfile>``'s content is read and
|
||||
written to ``<newname>`` as a new file.
|
||||
|
||||
The options are:
|
||||
|
||||
``RESULT <result>``
|
||||
Set ``<result>`` variable to ``0`` on success or an error message otherwise.
|
||||
If ``RESULT`` is not specified and the operation fails, an error is emitted.
|
||||
|
||||
``ONLY_IF_DIFFERENT``
|
||||
If the ``<newname>`` path already exists, do not replace it if it is the
|
||||
same as ``<oldname>``. Otherwise, an error is emitted.
|
||||
|
||||
.. _REMOVE:
|
||||
.. _REMOVE_RECURSE:
|
||||
|
||||
@@ -888,16 +924,26 @@ Path Conversion
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
file(REAL_PATH <path> <out-var> [BASE_DIRECTORY <dir>])
|
||||
file(REAL_PATH <path> <out-var> [BASE_DIRECTORY <dir>] [EXPAND_TILDE])
|
||||
|
||||
.. versionadded:: 3.19
|
||||
|
||||
Compute the absolute path to an existing file or directory with symlinks
|
||||
resolved.
|
||||
|
||||
If the provided ``<path>`` is a relative path, it is evaluated relative to the
|
||||
given base directory ``<dir>``. If no base directory is provided, the default
|
||||
base directory will be :variable:`CMAKE_CURRENT_SOURCE_DIR`.
|
||||
``BASE_DIRECTORY <dir>``
|
||||
If the provided ``<path>`` is a relative path, it is evaluated relative to the
|
||||
given base directory ``<dir>``. If no base directory is provided, the default
|
||||
base directory will be :variable:`CMAKE_CURRENT_SOURCE_DIR`.
|
||||
|
||||
``EXPAND_TILDE``
|
||||
.. versionadded:: 3.21
|
||||
|
||||
If the ``<path>`` is ``~`` or starts with ``~/``, the ``~`` is replaced by
|
||||
the user's home directory. The path to the home directory is obtained from
|
||||
environment variables. On Windows, the ``USERPROFILE`` environment variable
|
||||
is used, falling back to the ``HOME`` environment variable if ``USERPROFILE``
|
||||
is not defined. On all other platforms, only ``HOME`` is used.
|
||||
|
||||
.. _RELATIVE_PATH:
|
||||
|
||||
@@ -1024,7 +1070,7 @@ If neither ``NETRC`` option is given CMake will check variables
|
||||
For ``https://`` URLs CMake must be built with OpenSSL support. ``TLS/SSL``
|
||||
certificates are not checked by default. Set ``TLS_VERIFY`` to ``ON`` to
|
||||
check certificates. If neither ``TLS`` option is given CMake will check
|
||||
variables ``CMAKE_TLS_VERIFY`` and ``CMAKE_TLS_CAINFO``, respectively.
|
||||
variables :variable:`CMAKE_TLS_VERIFY` and ``CMAKE_TLS_CAINFO``, respectively.
|
||||
|
||||
Additional options to ``DOWNLOAD`` are:
|
||||
|
||||
|
||||
@@ -14,9 +14,12 @@ semicolon or whitespace.
|
||||
All commands between ``foreach`` and the matching ``endforeach`` are recorded
|
||||
without being invoked. Once the ``endforeach`` is evaluated, the recorded
|
||||
list of commands is invoked once for each item in ``<items>``.
|
||||
At the beginning of each iteration the variable ``loop_var`` will be set
|
||||
At the beginning of each iteration the variable ``<loop_var>`` will be set
|
||||
to the value of the current item.
|
||||
|
||||
The scope of ``<loop_var>`` is restricted to the loop scope. See policy
|
||||
:policy:`CMP0124` for details.
|
||||
|
||||
The commands :command:`break` and :command:`continue` provide means to
|
||||
escape from the normal control flow.
|
||||
|
||||
|
||||
@@ -619,7 +619,7 @@ Custom Installation Logic
|
||||
.. code-block:: cmake
|
||||
|
||||
install([[SCRIPT <file>] [CODE <code>]]
|
||||
[COMPONENT <component>] [EXCLUDE_FROM_ALL] [...])
|
||||
[COMPONENT <component>] [EXCLUDE_FROM_ALL] [ALL_COMPONENTS] [...])
|
||||
|
||||
The ``SCRIPT`` form will invoke the given CMake script files during
|
||||
installation. If the script file name is a relative path it will be
|
||||
@@ -634,6 +634,12 @@ example, the code
|
||||
|
||||
will print a message during installation.
|
||||
|
||||
The option ``ALL_COMPONENTS``
|
||||
.. versionadded:: 3.21
|
||||
|
||||
Run the custom installation script code for every component of a
|
||||
component-specific installation.
|
||||
|
||||
.. versionadded:: 3.14
|
||||
``<file>`` or ``<code>`` may use "generator expressions" with the syntax
|
||||
``$<...>`` (in the case of ``<file>``, this refers to their use in the file
|
||||
@@ -724,7 +730,7 @@ executable from the installation tree using the imported target name
|
||||
``mp_myexe`` as if the target were built in its own tree.
|
||||
|
||||
.. note::
|
||||
This command supercedes the :command:`install_targets` command and
|
||||
This command supersedes the :command:`install_targets` command and
|
||||
the :prop_tgt:`PRE_INSTALL_SCRIPT` and :prop_tgt:`POST_INSTALL_SCRIPT`
|
||||
target properties. It also replaces the ``FILES`` forms of the
|
||||
:command:`install_files` and :command:`install_programs` commands.
|
||||
|
||||
@@ -5,7 +5,7 @@ install_files
|
||||
|
||||
Use the :command:`install(FILES)` command instead.
|
||||
|
||||
This command has been superceded by the :command:`install` command. It is
|
||||
This command has been superseded by the :command:`install` command. It is
|
||||
provided for compatibility with older CMake code. The ``FILES`` form is
|
||||
directly replaced by the ``FILES`` form of the :command:`install`
|
||||
command. The regexp form can be expressed more clearly using the ``GLOB``
|
||||
|
||||
@@ -5,7 +5,7 @@ install_programs
|
||||
|
||||
Use the :command:`install(PROGRAMS)` command instead.
|
||||
|
||||
This command has been superceded by the :command:`install` command. It is
|
||||
This command has been superseded by the :command:`install` command. It is
|
||||
provided for compatibility with older CMake code. The ``FILES`` form is
|
||||
directly replaced by the ``PROGRAMS`` form of the :command:`install`
|
||||
command. The regexp form can be expressed more clearly using the ``GLOB``
|
||||
|
||||
@@ -5,7 +5,7 @@ install_targets
|
||||
|
||||
Use the :command:`install(TARGETS)` command instead.
|
||||
|
||||
This command has been superceded by the :command:`install` command. It is
|
||||
This command has been superseded by the :command:`install` command. It is
|
||||
provided for compatibility with older CMake code.
|
||||
|
||||
::
|
||||
|
||||
@@ -20,12 +20,18 @@ Sets the name of the project, and stores it in the variable
|
||||
``CMakeLists.txt`` also stores the project name in the
|
||||
variable :variable:`CMAKE_PROJECT_NAME`.
|
||||
|
||||
Also sets the variables
|
||||
Also sets the variables:
|
||||
|
||||
* :variable:`PROJECT_SOURCE_DIR`,
|
||||
:variable:`<PROJECT-NAME>_SOURCE_DIR`
|
||||
* :variable:`PROJECT_BINARY_DIR`,
|
||||
:variable:`<PROJECT-NAME>_BINARY_DIR`
|
||||
:variable:`PROJECT_SOURCE_DIR`, :variable:`<PROJECT-NAME>_SOURCE_DIR`
|
||||
Absolute path to the source directory for the project.
|
||||
|
||||
:variable:`PROJECT_BINARY_DIR`, :variable:`<PROJECT-NAME>_BINARY_DIR`
|
||||
Absolute path to the binary directory for the project.
|
||||
|
||||
:variable:`PROJECT_IS_TOP_LEVEL`, :variable:`<PROJECT-NAME>_IS_TOP_LEVEL`
|
||||
.. versionadded:: 3.21
|
||||
|
||||
Boolean value indicating whether the project is top-level.
|
||||
|
||||
Further variables are set by the optional arguments described in the following.
|
||||
If any of these arguments is not used, then the corresponding variables are
|
||||
|
||||
@@ -68,9 +68,13 @@ users.
|
||||
|
||||
If the cache entry does not exist prior to the call or the ``FORCE``
|
||||
option is given then the cache entry will be set to the given value.
|
||||
Furthermore, any normal variable binding in the current scope will
|
||||
be removed to expose the newly cached value to any immediately
|
||||
following evaluation.
|
||||
|
||||
.. note::
|
||||
|
||||
The content of the cache variable will not be directly accessible if a normal
|
||||
variable of the same name already exists (see :ref:`rules of variable
|
||||
evaluation <CMake Language Variables>`). If policy :policy:`CMP0126` is set
|
||||
to ``OLD``, any normal variable binding in the current scope will be removed.
|
||||
|
||||
It is possible for the cache entry to exist prior to the call but
|
||||
have no type set if it was created on the :manual:`cmake(1)` command
|
||||
|
||||
@@ -82,7 +82,8 @@ CPack generators which are essentially archives at their core. These include:
|
||||
|
||||
See also the :variable:`CPACK_THREADS` variable.
|
||||
|
||||
.. note::
|
||||
.. versionadded:: 3.21
|
||||
|
||||
Official CMake binaries available on ``cmake.org`` ship with a ``liblzma``
|
||||
that does not support parallel compression.
|
||||
Official CMake binaries available on ``cmake.org`` now ship
|
||||
with a ``liblzma`` that supports parallel compression.
|
||||
Older versions did not.
|
||||
|
||||
@@ -289,7 +289,7 @@ List of CPack DEB generator specific variables:
|
||||
* Default : "optional"
|
||||
|
||||
.. versionadded:: 3.5
|
||||
Per-component ``CPACK_DEBIAN_<COMPONENT>_PACKAGE_PRIORITY`` varables.
|
||||
Per-component ``CPACK_DEBIAN_<COMPONENT>_PACKAGE_PRIORITY`` variables.
|
||||
|
||||
See https://www.debian.org/doc/debian-policy/ch-archive.html#s-priorities
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ on macOS:
|
||||
|
||||
.. versionadded:: 3.6
|
||||
|
||||
Default behaviour is to include a symlink to ``/Applications`` in the DMG.
|
||||
Default behavior is to include a symlink to ``/Applications`` in the DMG.
|
||||
Set this option to ``ON`` to avoid adding the symlink.
|
||||
|
||||
.. variable:: CPACK_DMG_SLA_DIR
|
||||
@@ -103,6 +103,12 @@ on macOS:
|
||||
|
||||
- Default: ``CPACK_PACKAGE_FILE_NAME-<component>``
|
||||
|
||||
.. variable:: CPACK_DMG_FILESYSTEM
|
||||
|
||||
The filesystem format. Common values are ``APFS`` and ``HFS+``.
|
||||
See ``man hdiutil`` for a full list of supported formats.
|
||||
Defaults to ``HFS+``.
|
||||
|
||||
.. variable:: CPACK_COMMAND_HDIUTIL
|
||||
|
||||
Path to the ``hdiutil(1)`` command used to operate on disk image files on
|
||||
|
||||
@@ -195,3 +195,9 @@ on Windows Nullsoft Scriptable Install System.
|
||||
If set, trim down the size of the control to the size of the branding text string.
|
||||
Allowed values for this variable are ``LEFT``, ``CENTER`` or ``RIGHT``.
|
||||
If not specified, the default behavior is ``LEFT``.
|
||||
|
||||
.. variable:: CPACK_NSIS_EXECUTABLE
|
||||
|
||||
.. versionadded:: 3.21
|
||||
|
||||
If set, specify the name of the NSIS executable. Default is ``makensis``.
|
||||
|
||||
@@ -39,7 +39,10 @@ to the file specified by the ``<DEP_FILE>`` placeholder, and write module
|
||||
dependencies to the file specified by the ``<DYNDEP_FILE>`` placeholder.
|
||||
|
||||
The module dependencies should be written in the format described
|
||||
by the `P1689r3`_ paper.
|
||||
by the `P1689r3`_ paper, with the following updates:
|
||||
|
||||
* Omit the ``outputs``, ``inputs``, and ``depends`` fields from
|
||||
each entry in the ``rules`` array. They are unused.
|
||||
|
||||
Compiler writers may try out their scanning functionality using
|
||||
the `cxx-modules-sandbox`_ test project, modified to set variables
|
||||
|
||||
@@ -20,8 +20,10 @@ creating a *merge request* ("MR"). The new MR will appear on the
|
||||
process is managed by the merge request page for the change.
|
||||
|
||||
During the review process, the MR submitter should address review comments
|
||||
or test failures by updating the MR with a (force-)push of the topic
|
||||
branch. The update initiates a new round of review.
|
||||
or test failures by updating their local topic branch to fix their commits
|
||||
(e.g. via ``git commit --amend`` or ``git rebase -i``), and then issuing a
|
||||
(force-)push of the topic branch to their remote (e.g. ``git push --force``).
|
||||
This will automatically initiate a new round of review on the existing MR.
|
||||
|
||||
We recommend that users enable the "Remove source branch when merge
|
||||
request is accepted" option when creating the MR or by editing it.
|
||||
@@ -254,7 +256,8 @@ The preferred form for references to other commits is
|
||||
The author date of the commit, in its original time zone, formatted as
|
||||
``CCYY-MM-DD``. ``git-log(1)`` shows the original time zone by default.
|
||||
|
||||
This may be generated with
|
||||
This may be generated with ``git show -s --pretty=reference <commit>`` with
|
||||
Git 2.25 and newer. Older versions of Git can generate the same format via
|
||||
``git show -s --date=short --pretty="format:%h (%s, %ad)" <commit>``.
|
||||
|
||||
If the commit is a fix for the mentioned commit, consider using a ``Fixes:``
|
||||
|
||||
@@ -15,6 +15,10 @@ ignored if the :variable:`CMAKE_CUDA_HOST_COMPILER` variable is defined.
|
||||
This environment variable is primarily meant for use with projects that
|
||||
enable ``CUDA`` as a first-class language.
|
||||
|
||||
.. note::
|
||||
|
||||
Ignored when using :ref:`Visual Studio Generators`.
|
||||
|
||||
.. versionadded:: 3.13
|
||||
The :module:`FindCUDA`
|
||||
module will use this variable to initialize its ``CUDA_HOST_COMPILER`` setting.
|
||||
|
||||
@@ -8,4 +8,4 @@
|
||||
See the :variable:`CMAKE_GENERATOR_TOOLSET` variable for details.
|
||||
|
||||
.. versionadded:: 3.14
|
||||
Added suport for ``host=x86`` option.
|
||||
Added support for ``host=x86`` option.
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
project(MathFunctions)
|
||||
|
||||
# make cache variables for install destinations
|
||||
include(GNUInstallDirs)
|
||||
|
||||
# specify the C++ standard
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
||||
@@ -12,26 +15,26 @@ add_library(MathFunctions STATIC MathFunctions.cxx)
|
||||
target_include_directories(MathFunctions
|
||||
PUBLIC
|
||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>"
|
||||
"$<INSTALL_INTERFACE:include>"
|
||||
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
|
||||
)
|
||||
|
||||
# install the target and create export-set
|
||||
install(TARGETS MathFunctions
|
||||
EXPORT MathFunctionsTargets
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
RUNTIME DESTINATION bin
|
||||
INCLUDES DESTINATION include
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
)
|
||||
|
||||
# install header file
|
||||
install(FILES MathFunctions.h DESTINATION include)
|
||||
install(FILES MathFunctions.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
|
||||
# generate and install export file
|
||||
install(EXPORT MathFunctionsTargets
|
||||
FILE MathFunctionsTargets.cmake
|
||||
NAMESPACE MathFunctions::
|
||||
DESTINATION lib/cmake/MathFunctions
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/MathFunctions
|
||||
)
|
||||
|
||||
# include CMakePackageConfigHelpers macro
|
||||
@@ -58,14 +61,14 @@ write_basic_package_version_file(
|
||||
# create config file
|
||||
configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/MathFunctionsConfig.cmake"
|
||||
INSTALL_DESTINATION lib/cmake/MathFunctions
|
||||
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/MathFunctions
|
||||
)
|
||||
|
||||
# install config files
|
||||
install(FILES
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/MathFunctionsConfig.cmake"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/MathFunctionsConfigVersion.cmake"
|
||||
DESTINATION lib/cmake/MathFunctions
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/MathFunctions
|
||||
)
|
||||
|
||||
# generate the export targets for the build tree
|
||||
|
||||
@@ -7,24 +7,24 @@ add_library(MathFunctions::Addition ALIAS Addition)
|
||||
target_include_directories(Addition
|
||||
PUBLIC
|
||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>"
|
||||
$<INSTALL_INTERFACE:include>
|
||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
||||
)
|
||||
|
||||
# install the target and create export-set
|
||||
install(TARGETS Addition
|
||||
EXPORT AdditionTargets
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
RUNTIME DESTINATION bin
|
||||
INCLUDES DESTINATION include
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
)
|
||||
|
||||
# install header file
|
||||
install(FILES Addition.h DESTINATION include)
|
||||
install(FILES Addition.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
|
||||
# generate and install export file
|
||||
install(EXPORT AdditionTargets
|
||||
FILE MathFunctionsAdditionTargets.cmake
|
||||
NAMESPACE MathFunctions::
|
||||
DESTINATION lib/cmake/MathFunctions
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/MathFunctions
|
||||
)
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
project(MathFunctionsComponents)
|
||||
|
||||
# make cache variables for install destinations
|
||||
include(GNUInstallDirs)
|
||||
|
||||
# specify the C++ standard
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
||||
@@ -24,7 +27,7 @@ write_basic_package_version_file(
|
||||
# create config file
|
||||
configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/MathFunctionsConfig.cmake"
|
||||
INSTALL_DESTINATION lib/cmake/MathFunctions
|
||||
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/MathFunctions
|
||||
NO_CHECK_REQUIRED_COMPONENTS_MACRO
|
||||
)
|
||||
|
||||
@@ -32,5 +35,5 @@ configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in
|
||||
install(FILES
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/MathFunctionsConfig.cmake"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/MathFunctionsConfigVersion.cmake"
|
||||
DESTINATION lib/cmake/MathFunctions
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/MathFunctions
|
||||
)
|
||||
|
||||
@@ -7,24 +7,24 @@ add_library(MathFunctions::SquareRoot ALIAS SquareRoot)
|
||||
target_include_directories(SquareRoot
|
||||
PUBLIC
|
||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>"
|
||||
"$<INSTALL_INTERFACE:include>"
|
||||
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
|
||||
)
|
||||
|
||||
# install the target and create export-set
|
||||
install(TARGETS SquareRoot
|
||||
EXPORT SquareRootTargets
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
RUNTIME DESTINATION bin
|
||||
INCLUDES DESTINATION include
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
)
|
||||
|
||||
# install header file
|
||||
install(FILES SquareRoot.h DESTINATION include)
|
||||
install(FILES SquareRoot.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
|
||||
# generate and install export file
|
||||
install(EXPORT SquareRootTargets
|
||||
FILE MathFunctionsSquareRootTargets.cmake
|
||||
NAMESPACE MathFunctions::
|
||||
DESTINATION lib/cmake/MathFunctions
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/MathFunctions
|
||||
)
|
||||
|
||||
@@ -202,6 +202,10 @@ project. Start by specifying the :command:`cmake_minimum_required` version and
|
||||
:language: cmake
|
||||
:end-before: # create library
|
||||
|
||||
The :module:`GNUInstallDirs` module is included in order to provide the
|
||||
project with the flexibility to install into different platform layouts by
|
||||
making the directories available as cache variables.
|
||||
|
||||
Create a library called ``MathFunctions`` with the :command:`add_library`
|
||||
command:
|
||||
|
||||
@@ -636,7 +640,7 @@ We can use the :command:`find_package` command:
|
||||
:start-after: # find MathFunctions
|
||||
:end-before: # create executable
|
||||
|
||||
Create an exectuable:
|
||||
Create an executable:
|
||||
|
||||
.. literalinclude:: Downstream/CMakeLists.txt
|
||||
:language: cmake
|
||||
|
||||
@@ -110,6 +110,7 @@ write_basic_package_version_file(
|
||||
# install the configuration file
|
||||
install(FILES
|
||||
${CMAKE_CURRENT_BINARY_DIR}/MathFunctionsConfig.cmake
|
||||
${CMAKE_CURRENT_BINARY_DIR}/MathFunctionsConfigVersion.cmake
|
||||
DESTINATION lib/cmake/MathFunctions
|
||||
)
|
||||
|
||||
|
||||
@@ -76,6 +76,14 @@
|
||||
native build system to choose a compiler or SDK. See the
|
||||
:variable:`CMAKE_GENERATOR_PLATFORM` variable for details.
|
||||
|
||||
``--toolchain <path-to-file>``
|
||||
Specify the cross compiling toolchain file, equivalent to setting
|
||||
:variable:`CMAKE_TOOLCHAIN_FILE` variable.
|
||||
|
||||
``--install-prefix <directory>``
|
||||
Specify the installation directory, used by the
|
||||
:variable:`CMAKE_INSTALL_PREFIX` variable. Must be an absolute path.
|
||||
|
||||
``-Wno-dev``
|
||||
Suppress developer warnings.
|
||||
|
||||
|
||||
@@ -261,6 +261,7 @@ following :variable:`compiler ids <CMAKE_<LANG>_COMPILER_ID>` as of the
|
||||
versions specified for each:
|
||||
|
||||
* ``Cray``: Cray Compiler Environment version 8.1+.
|
||||
* ``Fujitsu``: Fujitsu HPC compiler 4.0+.
|
||||
* ``PGI``: PGI version 12.10+.
|
||||
* ``NVHPC``: NVIDIA HPC compilers version 11.0+.
|
||||
* ``TI``: Texas Instruments compiler.
|
||||
|
||||
@@ -350,6 +350,24 @@ look.
|
||||
PATHS ${PC_Foo_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
Alternatively, if the library is available with multiple configurations, you can
|
||||
use :module:`SelectLibraryConfigurations` to automatically set the
|
||||
``Foo_LIBRARY`` variable instead:
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
find_library(Foo_LIBRARY_RELEASE
|
||||
NAMES foo
|
||||
PATHS ${PC_Foo_LIBRARY_DIRS}/Release
|
||||
)
|
||||
find_library(Foo_LIBRARY_DEBUG
|
||||
NAMES foo
|
||||
PATHS ${PC_Foo_LIBRARY_DIRS}/Debug
|
||||
)
|
||||
|
||||
include(SelectLibraryConfigurations)
|
||||
select_library_configurations(Foo)
|
||||
|
||||
If you have a good way of getting the version (from a header file, for
|
||||
example), you can use that information to set ``Foo_VERSION`` (although
|
||||
note that find modules have traditionally used ``Foo_VERSION_STRING``,
|
||||
|
||||
@@ -443,7 +443,8 @@ Version 1 does not exist to avoid confusion with that from
|
||||
"hasInstallRule": true,
|
||||
"minimumCMakeVersion": {
|
||||
"string": "3.14"
|
||||
}
|
||||
},
|
||||
"jsonFile": "<file>"
|
||||
},
|
||||
{
|
||||
"source": "sub",
|
||||
@@ -453,7 +454,8 @@ Version 1 does not exist to avoid confusion with that from
|
||||
"targetIndexes": [ 1 ],
|
||||
"minimumCMakeVersion": {
|
||||
"string": "3.14"
|
||||
}
|
||||
},
|
||||
"jsonFile": "<file>"
|
||||
}
|
||||
],
|
||||
"projects": [
|
||||
@@ -569,6 +571,13 @@ The members specific to ``codemodel`` objects are:
|
||||
:command:`install` rules, i.e. whether a ``make install``
|
||||
or equivalent rule is available.
|
||||
|
||||
``jsonFile``
|
||||
A JSON string specifying a path relative to the codemodel file
|
||||
to another JSON file containing a
|
||||
`"codemodel" version 2 "directory" object`_.
|
||||
|
||||
This field was added in codemodel version 2.3.
|
||||
|
||||
``projects``
|
||||
A JSON array of entries corresponding to the top-level project
|
||||
and sub-projects defined in the build system. Each (sub-)project
|
||||
@@ -633,6 +642,187 @@ The members specific to ``codemodel`` objects are:
|
||||
to another JSON file containing a
|
||||
`"codemodel" version 2 "target" object`_.
|
||||
|
||||
"codemodel" version 2 "directory" object
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
A codemodel "directory" object is referenced by a `"codemodel" version 2`_
|
||||
object's ``directories`` array. Each "directory" object is a JSON object
|
||||
with members:
|
||||
|
||||
``paths``
|
||||
A JSON object containing members:
|
||||
|
||||
``source``
|
||||
A string specifying the path to the source directory, represented
|
||||
with forward slashes. If the directory is inside the top-level
|
||||
source directory then the path is specified relative to that
|
||||
directory (with ``.`` for the top-level source directory itself).
|
||||
Otherwise the path is absolute.
|
||||
|
||||
``build``
|
||||
A string specifying the path to the build directory, represented
|
||||
with forward slashes. If the directory is inside the top-level
|
||||
build directory then the path is specified relative to that
|
||||
directory (with ``.`` for the top-level build directory itself).
|
||||
Otherwise the path is absolute.
|
||||
|
||||
``installers``
|
||||
A JSON array of entries corresponding to :command:`install` rules.
|
||||
Each entry is a JSON object containing members:
|
||||
|
||||
``component``
|
||||
A string specifying the component selected by the corresponding
|
||||
:command:`install` command invocation.
|
||||
|
||||
``destination``
|
||||
Optional member that is present for specific ``type`` values below.
|
||||
The value is a string specifying the install destination path.
|
||||
The path may be absolute or relative to the install prefix.
|
||||
|
||||
``paths``
|
||||
Optional member that is present for specific ``type`` values below.
|
||||
The value is a JSON array of entries corresponding to the paths
|
||||
(files or directories) to be installed. Each entry is one of:
|
||||
|
||||
* A string specifying the path from which a file or directory
|
||||
is to be installed. The portion of the path not preceded by
|
||||
a ``/`` also specifies the path (name) to which the file
|
||||
or directory is to be installed under the destination.
|
||||
|
||||
* A JSON object with members:
|
||||
|
||||
``from``
|
||||
A string specifying the path from which a file or directory
|
||||
is to be installed.
|
||||
|
||||
``to``
|
||||
A string specifying the path to which the file or directory
|
||||
is to be installed under the destination.
|
||||
|
||||
In both cases the paths are represented with forward slashes. If
|
||||
the "from" path is inside the top-level directory documented by the
|
||||
corresponding ``type`` value, then the path is specified relative
|
||||
to that directory. Otherwise the path is absolute.
|
||||
|
||||
``type``
|
||||
A string specifying the type of installation rule. The value is one
|
||||
of the following, with some variants providing additional members:
|
||||
|
||||
``file``
|
||||
An :command:`install(FILES)` or :command:`install(PROGRAMS)` call.
|
||||
The ``destination`` and ``paths`` members are populated, with paths
|
||||
under the top-level *source* directory expressed relative to it.
|
||||
The ``isOptional`` member may exist.
|
||||
This type has no additional members.
|
||||
|
||||
``directory``
|
||||
An :command:`install(DIRECTORY)` call.
|
||||
The ``destination`` and ``paths`` members are populated, with paths
|
||||
under the top-level *source* directory expressed relative to it.
|
||||
The ``isOptional`` member may exist.
|
||||
This type has no additional members.
|
||||
|
||||
``target``
|
||||
An :command:`install(TARGETS)` call.
|
||||
The ``destination`` and ``paths`` members are populated, with paths
|
||||
under the top-level *build* directory expressed relative to it.
|
||||
The ``isOptional`` member may exist.
|
||||
This type has additional members ``targetId``, ``targetIndex``,
|
||||
``targetIsImportLibrary``, and ``targetInstallNamelink``.
|
||||
|
||||
``export``
|
||||
An :command:`install(EXPORT)` call.
|
||||
The ``destination`` and ``paths`` members are populated, with paths
|
||||
under the top-level *build* directory expressed relative to it.
|
||||
The ``paths`` entries refer to files generated automatically by
|
||||
CMake for installation, and their actual values are considered
|
||||
private implementation details.
|
||||
This type has additional members ``exportName`` and ``exportTargets``.
|
||||
|
||||
``script``
|
||||
An :command:`install(SCRIPT)` call.
|
||||
This type has additional member ``scriptFile``.
|
||||
|
||||
``code``
|
||||
An :command:`install(CODE)` call.
|
||||
This type has no additional members.
|
||||
|
||||
``isExcludeFromAll``
|
||||
Optional member that is present with boolean value ``true`` when
|
||||
:command:`install` is called with the ``EXCLUDE_FROM_ALL`` option.
|
||||
|
||||
``isForAllComponents``
|
||||
Optional member that is present with boolean value ``true`` when
|
||||
:command:`install(SCRIPT|CODE)` is called with the
|
||||
``ALL_COMPONENTS`` option.
|
||||
|
||||
``isOptional``
|
||||
Optional member that is present with boolean value ``true`` when
|
||||
:command:`install` is called with the ``OPTIONAL`` option.
|
||||
This is allowed when ``type`` is ``file``, ``directory``, or ``target``.
|
||||
|
||||
``targetId``
|
||||
Optional member that is present when ``type`` is ``target``.
|
||||
The value is a string uniquely identifying the target to be installed.
|
||||
This matches the ``id`` member of the target in the main
|
||||
"codemodel" object's ``targets`` array.
|
||||
|
||||
``targetIndex``
|
||||
Optional member that is present when ``type`` is ``target``.
|
||||
The value is an unsigned integer 0-based index into the main "codemodel"
|
||||
object's ``targets`` array for the target to be installed.
|
||||
|
||||
``targetIsImportLibrary``
|
||||
Optional member that is present when ``type`` is ``target`` and
|
||||
the installer is for a Windows DLL import library file or for an
|
||||
AIX linker import file. If present, it has boolean value ``true``.
|
||||
|
||||
``targetInstallNamelink``
|
||||
Optional member that is present when ``type`` is ``target`` and
|
||||
the installer corresponds to a target that may use symbolic links
|
||||
to implement the :prop_tgt:`VERSION` and :prop_tgt:`SOVERSION`
|
||||
target properties.
|
||||
The value is a string indicating how the installer is supposed to
|
||||
handle the symlinks: ``skip`` means the installer should skip the
|
||||
symlinks and install only the real file, and ``only`` means the
|
||||
installer should install only the symlinks and not the real file.
|
||||
In all cases the ``paths`` member lists what it actually installs.
|
||||
|
||||
``exportName``
|
||||
Optional member that is present when ``type`` is ``export``.
|
||||
The value is a string specifying the name of the export.
|
||||
|
||||
``exportTargets``
|
||||
Optional member that is present when ``type`` is ``export``.
|
||||
The value is a JSON array of entries corresponding to the targets
|
||||
included in the export. Each entry is a JSON object with members:
|
||||
|
||||
``id``
|
||||
A string uniquely identifying the target. This matches
|
||||
the ``id`` member of the target in the main "codemodel"
|
||||
object's ``targets`` array.
|
||||
|
||||
``index``
|
||||
An unsigned integer 0-based index into the main "codemodel"
|
||||
object's ``targets`` array for the target.
|
||||
|
||||
``scriptFile``
|
||||
Optional member that is present when ``type`` is ``script``.
|
||||
The value is a string specifying the path to the script file on disk,
|
||||
represented with forward slashes. If the file is inside the top-level
|
||||
source directory then the path is specified relative to that directory.
|
||||
Otherwise the path is absolute.
|
||||
|
||||
``backtrace``
|
||||
Optional member that is present when a CMake language backtrace to
|
||||
the :command:`install` or other command invocation that added this
|
||||
installer is available. The value is an unsigned integer 0-based
|
||||
index into the ``backtraceGraph`` member's ``nodes`` array.
|
||||
|
||||
``backtraceGraph``
|
||||
A `"codemodel" version 2 "backtrace graph"`_ whose nodes are referenced
|
||||
from ``backtrace`` members elsewhere in this "directory" object.
|
||||
|
||||
"codemodel" version 2 "target" object
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -964,40 +1154,48 @@ with members:
|
||||
with forward slashes.
|
||||
|
||||
``backtraceGraph``
|
||||
A JSON object describing the graph of backtraces whose nodes are
|
||||
referenced from ``backtrace`` members elsewhere. The members are:
|
||||
A `"codemodel" version 2 "backtrace graph"`_ whose nodes are referenced
|
||||
from ``backtrace`` members elsewhere in this "target" object.
|
||||
|
||||
``nodes``
|
||||
A JSON array listing nodes in the backtrace graph. Each entry
|
||||
is a JSON object with members:
|
||||
"codemodel" version 2 "backtrace graph"
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
``file``
|
||||
An unsigned integer 0-based index into the backtrace ``files`` array.
|
||||
The ``backtraceGraph`` member of a `"codemodel" version 2 "directory" object`_,
|
||||
or `"codemodel" version 2 "target" object`_ is a JSON object describing a
|
||||
graph of backtraces. Its nodes are referenced from ``backtrace`` members
|
||||
elsewhere in the containing object. The backtrace graph object members are:
|
||||
|
||||
``line``
|
||||
An optional member present when the node represents a line within
|
||||
the file. The value is an unsigned integer 1-based line number.
|
||||
``nodes``
|
||||
A JSON array listing nodes in the backtrace graph. Each entry
|
||||
is a JSON object with members:
|
||||
|
||||
``command``
|
||||
An optional member present when the node represents a command
|
||||
invocation within the file. The value is an unsigned integer
|
||||
0-based index into the backtrace ``commands`` array.
|
||||
``file``
|
||||
An unsigned integer 0-based index into the backtrace ``files`` array.
|
||||
|
||||
``parent``
|
||||
An optional member present when the node is not the bottom of
|
||||
the call stack. The value is an unsigned integer 0-based index
|
||||
of another entry in the backtrace ``nodes`` array.
|
||||
``line``
|
||||
An optional member present when the node represents a line within
|
||||
the file. The value is an unsigned integer 1-based line number.
|
||||
|
||||
``commands``
|
||||
A JSON array listing command names referenced by backtrace nodes.
|
||||
Each entry is a string specifying a command name.
|
||||
``command``
|
||||
An optional member present when the node represents a command
|
||||
invocation within the file. The value is an unsigned integer
|
||||
0-based index into the backtrace ``commands`` array.
|
||||
|
||||
``files``
|
||||
A JSON array listing CMake language files referenced by backtrace nodes.
|
||||
Each entry is a string specifying the path to a file, represented
|
||||
with forward slashes. If the file is inside the top-level source
|
||||
directory then the path is specified relative to that directory.
|
||||
Otherwise the path is absolute.
|
||||
``parent``
|
||||
An optional member present when the node is not the bottom of
|
||||
the call stack. The value is an unsigned integer 0-based index
|
||||
of another entry in the backtrace ``nodes`` array.
|
||||
|
||||
``commands``
|
||||
A JSON array listing command names referenced by backtrace nodes.
|
||||
Each entry is a string specifying a command name.
|
||||
|
||||
``files``
|
||||
A JSON array listing CMake language files referenced by backtrace nodes.
|
||||
Each entry is a string specifying the path to a file, represented
|
||||
with forward slashes. If the file is inside the top-level source
|
||||
directory then the path is specified relative to that directory.
|
||||
Otherwise the path is absolute.
|
||||
|
||||
Object Kind "cache"
|
||||
-------------------
|
||||
@@ -1244,7 +1442,7 @@ The members specific to ``toolchains`` objects are:
|
||||
|
||||
``language``
|
||||
A JSON string specifying the toolchain language, like C or CXX. Language
|
||||
names are the same as langauge names that can be passed to the
|
||||
names are the same as language names that can be passed to the
|
||||
:command:`project` command. Because CMake only supports a single toolchain
|
||||
per language, this field can be used as a key.
|
||||
|
||||
|
||||
@@ -940,6 +940,29 @@ which is just the string ``tgt``.
|
||||
:ref:`Target Usage Requirements` this is the consuming target rather
|
||||
than the target specifying the requirement.
|
||||
|
||||
.. genex:: $<TARGET_RUNTIME_DLLS:tgt>
|
||||
|
||||
List of DLLs that the target depends on at runtime. This is determined by
|
||||
the locations of all the ``SHARED`` and ``MODULE`` targets in the target's
|
||||
transitive dependencies. Using this generator expression on targets other
|
||||
than executables, ``SHARED`` libraries, and ``MODULE`` libraries is an error.
|
||||
On non-DLL platforms, it evaluates to an empty string.
|
||||
|
||||
This generator expression can be used to copy all of the DLLs that a target
|
||||
depends on into its output directory in a ``POST_BUILD`` custom command. For
|
||||
example:
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
find_package(foo REQUIRED)
|
||||
|
||||
add_executable(exe main.c)
|
||||
target_link_libraries(exe PRIVATE foo::foo foo::bar)
|
||||
add_custom_command(TARGET exe POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_RUNTIME_DLLS:exe> $<TARGET_FILE_DIR:exe>
|
||||
COMMAND_EXPAND_LISTS
|
||||
)
|
||||
|
||||
.. genex:: $<INSTALL_PREFIX>
|
||||
|
||||
Content of the install prefix when the target is exported via
|
||||
|
||||
@@ -185,6 +185,7 @@ They are normally called through the :command:`find_package` command.
|
||||
/module/FindMPEG
|
||||
/module/FindMPEG2
|
||||
/module/FindMPI
|
||||
/module/FindMsys
|
||||
/module/FindODBC
|
||||
/module/FindOpenACC
|
||||
/module/FindOpenAL
|
||||
|
||||
@@ -51,6 +51,19 @@ The :variable:`CMAKE_MINIMUM_REQUIRED_VERSION` variable may also be used
|
||||
to determine whether to report an error on use of deprecated macros or
|
||||
functions.
|
||||
|
||||
Policies Introduced by CMake 3.21
|
||||
=================================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
CMP0126: set(CACHE) does not remove a normal variable of the same name. </policy/CMP0126>
|
||||
CMP0125: find_(path|file|library|program) have consistent behavior for cache variables. </policy/CMP0125>
|
||||
CMP0124: foreach() loop variables are only available in the loop scope. </policy/CMP0124>
|
||||
CMP0123: ARMClang cpu/arch compile and link flags must be set explicitly. </policy/CMP0123>
|
||||
CMP0122: UseSWIG use standard library name conventions for csharp language. </policy/CMP0122>
|
||||
CMP0121: The list command detects invalid indices. </policy/CMP0121>
|
||||
|
||||
Policies Introduced by CMake 3.20
|
||||
=================================
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ The root object recognizes the following fields:
|
||||
``version``
|
||||
|
||||
A required integer representing the version of the JSON schema.
|
||||
The supported versions are ``1`` and ``2``.
|
||||
The supported versions are ``1``, ``2``, and ``3``.
|
||||
|
||||
``cmakeMinimumRequired``
|
||||
|
||||
@@ -70,17 +70,17 @@ The root object recognizes the following fields:
|
||||
``configurePresets``
|
||||
|
||||
An optional array of `Configure Preset`_ objects.
|
||||
This is allowed in preset files specifying version 1 or above.
|
||||
This is allowed in preset files specifying version ``1`` or above.
|
||||
|
||||
``buildPresets``
|
||||
|
||||
An optional array of `Build Preset`_ objects.
|
||||
This is allowed in preset files specifying version 2 or above.
|
||||
This is allowed in preset files specifying version ``2`` or above.
|
||||
|
||||
``testPresets``
|
||||
|
||||
An optional array of `Test Preset`_ objects.
|
||||
This is allowed in preset files specifying version 2 or above.
|
||||
This is allowed in preset files specifying version ``2`` or above.
|
||||
|
||||
Configure Preset
|
||||
^^^^^^^^^^^^^^^^
|
||||
@@ -119,6 +119,11 @@ that may contain the following fields:
|
||||
This field can also be a string, which is equivalent to an array
|
||||
containing one string.
|
||||
|
||||
``condition``
|
||||
|
||||
An optional `Condition`_ object. This is allowed in preset files specifying
|
||||
version ``3`` or above.
|
||||
|
||||
``vendor``
|
||||
|
||||
An optional map containing vendor-specific information. CMake does not
|
||||
@@ -140,7 +145,9 @@ that may contain the following fields:
|
||||
|
||||
An optional string representing the generator to use for the preset. If
|
||||
``generator`` is not specified, it must be inherited from the
|
||||
``inherits`` preset (unless this preset is ``hidden``).
|
||||
``inherits`` preset (unless this preset is ``hidden``). In version ``3``
|
||||
or above, this field may be omitted to fall back to regular generator
|
||||
discovery procedure.
|
||||
|
||||
Note that for Visual Studio generators, unlike in the command line ``-G``
|
||||
argument, you cannot include the platform name in the generator name. Use
|
||||
@@ -175,13 +182,29 @@ that may contain the following fields:
|
||||
ignore the field, but the IDE can use them to set up the environment
|
||||
before invoking CMake.
|
||||
|
||||
``toolchainFile``
|
||||
|
||||
An optional string representing the path to the toolchain file.
|
||||
This field supports `macro expansion`_. If a relative path is specified,
|
||||
it is calculated relative to the build directory, and if not found,
|
||||
relative to the source directory. Takes precedence over any `CMAKE_TOOLCHAIN_FILE`
|
||||
value. This is allowed in preset files specifying version ``3`` or above.
|
||||
|
||||
``binaryDir``
|
||||
|
||||
An optional string representing the path to the output binary directory.
|
||||
This field supports `macro expansion`_. If a relative path is specified,
|
||||
it is calculated relative to the source directory. If ``binaryDir`` is not
|
||||
specified, it must be inherited from the ``inherits`` preset (unless this
|
||||
preset is ``hidden``).
|
||||
preset is ``hidden``). In version ``3`` or above, this field may be
|
||||
omitted.
|
||||
|
||||
``installDir``
|
||||
|
||||
An optional string representing the path to the installation directory.
|
||||
This field supports `macro expansion`_. If a relative path is specified,
|
||||
it is calculated relative to the source directory. This is allowed in
|
||||
preset files specifying version ``3`` or above.
|
||||
|
||||
``cmakeExecutable``
|
||||
|
||||
@@ -338,6 +361,11 @@ that may contain the following fields:
|
||||
This field can also be a string, which is equivalent to an array
|
||||
containing one string.
|
||||
|
||||
``condition``
|
||||
|
||||
An optional `Condition`_ object. This is allowed in preset files specifying
|
||||
version ``3`` or above.
|
||||
|
||||
``vendor``
|
||||
|
||||
An optional map containing vendor-specific information. CMake does not
|
||||
@@ -457,6 +485,11 @@ that may contain the following fields:
|
||||
This field can also be a string, which is equivalent to an array
|
||||
containing one string.
|
||||
|
||||
``condition``
|
||||
|
||||
An optional `Condition`_ object. This is allowed in preset files specifying
|
||||
version ``3`` or above.
|
||||
|
||||
``vendor``
|
||||
|
||||
An optional map containing vendor-specific information. CMake does not
|
||||
@@ -782,6 +815,103 @@ that may contain the following fields:
|
||||
|
||||
Equivalent to passing ``--no-tests=ignore`` on the command line.
|
||||
|
||||
Condition
|
||||
^^^^^^^^^
|
||||
|
||||
The ``condition`` field of a preset, allowed in preset files specifying version
|
||||
``3`` or above, is used to determine whether or not the preset is enabled. For
|
||||
example, this can be used to disable a preset on platforms other than Windows.
|
||||
``condition`` may be either a boolean, ``null``, or an object. If it is a
|
||||
boolean, the boolean indicates whether the preset is enabled or disabled. If it
|
||||
is ``null``, the preset is enabled, but the ``null`` condition is not inherited
|
||||
by any presets that may inherit from the preset. Sub-conditions (for example in
|
||||
a ``not``, ``anyOf``, or ``allOf`` condition) may not be ``null``. If it is an
|
||||
object, it has the following fields:
|
||||
|
||||
``type``
|
||||
|
||||
A required string with one of the following values:
|
||||
|
||||
``"const"``
|
||||
|
||||
Indicates that the condition is constant. This is equivalent to using a
|
||||
boolean in place of the object. The condition object will have the
|
||||
following additional fields:
|
||||
|
||||
``value``
|
||||
|
||||
A required boolean which provides a constant value for the condition's
|
||||
evaluation.
|
||||
|
||||
``"equals"``
|
||||
|
||||
``"notEquals"``
|
||||
|
||||
Indicates that the condition compares two strings to see if they are equal
|
||||
(or not equal). The condition object will have the following additional
|
||||
fields:
|
||||
|
||||
``lhs``
|
||||
|
||||
First string to compare. This field supports macro expansion.
|
||||
|
||||
``rhs``
|
||||
|
||||
Second string to compare. This field supports macro expansion.
|
||||
|
||||
``"inList"``
|
||||
|
||||
``"notInList"``
|
||||
|
||||
Indicates that the condition searches for a string in a list of strings.
|
||||
The condition object will have the following additional fields:
|
||||
|
||||
``string``
|
||||
|
||||
A required string to search for. This field supports macro expansion.
|
||||
|
||||
``list``
|
||||
|
||||
A required list of strings to search. This field supports macro
|
||||
expansion, and uses short-circuit evaluation.
|
||||
|
||||
``"matches"``
|
||||
|
||||
``"notMatches"``
|
||||
|
||||
Indicates that the condition searches for a regular expression in a string.
|
||||
The condition object will have the following additional fields:
|
||||
|
||||
``string``
|
||||
|
||||
A required string to search. This field supports macro expansion.
|
||||
|
||||
``regex``
|
||||
|
||||
A required regular expression to search for. This field supports macro
|
||||
expansion.
|
||||
|
||||
``"anyOf"``
|
||||
|
||||
``"allOf"``
|
||||
|
||||
Indicates that the condition is an aggregation of zero or more nested
|
||||
conditions. The condition object will have the following additional fields:
|
||||
|
||||
``conditions``
|
||||
|
||||
A required array of condition objects. These conditions use short-circuit
|
||||
evaluation.
|
||||
|
||||
``"not"``
|
||||
|
||||
Indicates that the condition is an inversion of another condition. The
|
||||
condition object will have the following additional fields:
|
||||
|
||||
``condition``
|
||||
|
||||
A required condition object.
|
||||
|
||||
Macro Expansion
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -823,6 +953,12 @@ Recognized macros include:
|
||||
test presets, this will evaluate to the generator specified by
|
||||
``configurePreset``.
|
||||
|
||||
``${hostSystemName}``
|
||||
|
||||
The name of the host operating system. Contains the same value as
|
||||
:variable:`CMAKE_HOST_SYSTEM_NAME`. This is allowed in preset files
|
||||
specifying version ``3`` or above.
|
||||
|
||||
``${dollar}``
|
||||
|
||||
A literal dollar sign (``$``).
|
||||
|
||||
@@ -21,6 +21,7 @@ Properties of Global Scope
|
||||
/prop_gbl/AUTOMOC_SOURCE_GROUP
|
||||
/prop_gbl/AUTOMOC_TARGETS_FOLDER
|
||||
/prop_gbl/AUTORCC_SOURCE_GROUP
|
||||
/prop_gbl/AUTOUIC_SOURCE_GROUP
|
||||
/prop_gbl/CMAKE_C_KNOWN_FEATURES
|
||||
/prop_gbl/CMAKE_CUDA_KNOWN_FEATURES
|
||||
/prop_gbl/CMAKE_CXX_KNOWN_FEATURES
|
||||
@@ -402,7 +403,9 @@ Properties on Targets
|
||||
/prop_tgt/XCODE_EMBED_FRAMEWORKS_CODE_SIGN_ON_COPY
|
||||
/prop_tgt/XCODE_EMBED_FRAMEWORKS_REMOVE_HEADERS_ON_COPY
|
||||
/prop_tgt/XCODE_EMBED_type
|
||||
/prop_tgt/XCODE_EMBED_type_CODE_SIGN_ON_COPY
|
||||
/prop_tgt/XCODE_EMBED_type_PATH
|
||||
/prop_tgt/XCODE_EMBED_type_REMOVE_HEADERS_ON_COPY
|
||||
/prop_tgt/XCODE_EXPLICIT_FILE_TYPE
|
||||
/prop_tgt/XCODE_GENERATE_SCHEME
|
||||
/prop_tgt/XCODE_LINK_BUILD_PHASE_MODE
|
||||
|
||||
@@ -96,8 +96,8 @@ Cross Compiling
|
||||
===============
|
||||
|
||||
If :manual:`cmake(1)` is invoked with the command line parameter
|
||||
``-DCMAKE_TOOLCHAIN_FILE=path/to/file``, the file will be loaded early to set
|
||||
values for the compilers.
|
||||
``--toolchain path/to/file`` or ``-DCMAKE_TOOLCHAIN_FILE=path/to/file``, the
|
||||
file will be loaded early to set values for the compilers.
|
||||
The :variable:`CMAKE_CROSSCOMPILING` variable is set to true when CMake is
|
||||
cross-compiling.
|
||||
|
||||
|
||||
@@ -130,6 +130,7 @@ Variables that Provide Information
|
||||
/variable/PROJECT-NAME_BINARY_DIR
|
||||
/variable/PROJECT-NAME_DESCRIPTION
|
||||
/variable/PROJECT-NAME_HOMEPAGE_URL
|
||||
/variable/PROJECT-NAME_IS_TOP_LEVEL
|
||||
/variable/PROJECT-NAME_SOURCE_DIR
|
||||
/variable/PROJECT-NAME_VERSION
|
||||
/variable/PROJECT-NAME_VERSION_MAJOR
|
||||
@@ -139,6 +140,7 @@ Variables that Provide Information
|
||||
/variable/PROJECT_BINARY_DIR
|
||||
/variable/PROJECT_DESCRIPTION
|
||||
/variable/PROJECT_HOMEPAGE_URL
|
||||
/variable/PROJECT_IS_TOP_LEVEL
|
||||
/variable/PROJECT_NAME
|
||||
/variable/PROJECT_SOURCE_DIR
|
||||
/variable/PROJECT_VERSION
|
||||
@@ -243,6 +245,7 @@ Variables that Change Behavior
|
||||
/variable/CMAKE_SYSTEM_LIBRARY_PATH
|
||||
/variable/CMAKE_SYSTEM_PREFIX_PATH
|
||||
/variable/CMAKE_SYSTEM_PROGRAM_PATH
|
||||
/variable/CMAKE_TLS_VERIFY
|
||||
/variable/CMAKE_USER_MAKE_RULES_OVERRIDE
|
||||
/variable/CMAKE_WARN_DEPRECATED
|
||||
/variable/CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION
|
||||
@@ -644,6 +647,7 @@ Variables for CTest
|
||||
/variable/CTEST_RESOURCE_SPEC_FILE
|
||||
/variable/CTEST_RUN_CURRENT_SCRIPT
|
||||
/variable/CTEST_SCP_COMMAND
|
||||
/variable/CTEST_SCRIPT_DIRECTORY
|
||||
/variable/CTEST_SITE
|
||||
/variable/CTEST_SUBMIT_URL
|
||||
/variable/CTEST_SOURCE_DIRECTORY
|
||||
@@ -667,6 +671,7 @@ Variables for CPack
|
||||
|
||||
/variable/CPACK_ABSOLUTE_DESTINATION_FILES
|
||||
/variable/CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY
|
||||
/variable/CPACK_CUSTOM_INSTALL_VARIABLES
|
||||
/variable/CPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION
|
||||
/variable/CPACK_INCLUDE_TOPLEVEL_DIRECTORY
|
||||
/variable/CPACK_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS
|
||||
|
||||
@@ -381,9 +381,9 @@ Options
|
||||
``--preset <preset>``, ``--preset=<preset>``
|
||||
Reads a :manual:`preset <cmake-presets(7)>` from
|
||||
``<path-to-source>/CMakePresets.json`` and
|
||||
``<path-to-source>/CMakeUserPresets.json``. The preset specifies the
|
||||
generator and the build directory, and optionally a list of variables and
|
||||
other arguments to pass to CMake. The current working directory must contain
|
||||
``<path-to-source>/CMakeUserPresets.json``. The preset may specify the
|
||||
generator and the build directory, and a list of variables and other
|
||||
arguments to pass to CMake. The current working directory must contain
|
||||
CMake preset files. The :manual:`CMake GUI <cmake-gui(1)>` can
|
||||
also recognize ``CMakePresets.json`` and ``CMakeUserPresets.json`` files. For
|
||||
full details on these files, see :manual:`cmake-presets(7)`.
|
||||
@@ -575,6 +575,12 @@ Available commands are:
|
||||
``true`` if the generator supports toolsets and ``false`` otherwise.
|
||||
``platformSupport``
|
||||
``true`` if the generator supports platforms and ``false`` otherwise.
|
||||
``supportedPlatforms``
|
||||
.. versionadded:: 3.21
|
||||
|
||||
Optional member that may be present when the generator supports
|
||||
platform specification via :variable:`CMAKE_GENERATOR_PLATFORM`
|
||||
(``-A ...``). The value is a list of platforms known to be supported.
|
||||
``extraGenerators``
|
||||
A list of strings with all the extra generators compatible with
|
||||
the generator.
|
||||
@@ -702,7 +708,7 @@ Available commands are:
|
||||
``remove [-f] <file>...``
|
||||
.. deprecated:: 3.17
|
||||
|
||||
Remove the file(s). The planned behaviour was that if any of the
|
||||
Remove the file(s). The planned behavior was that if any of the
|
||||
listed files already do not exist, the command returns a non-zero exit code,
|
||||
but no message is logged. The ``-f`` option changes the behavior to return a
|
||||
zero exit code (i.e. success) in such situations instead.
|
||||
|
||||
@@ -134,6 +134,12 @@ Options
|
||||
|
||||
This option tells CTest to write all its output to a ``<file>`` log file.
|
||||
|
||||
``--output-junit <file>``
|
||||
Write test results in JUnit format.
|
||||
|
||||
This option tells CTest to write test results to a ``<file>`` JUnit XML file.
|
||||
If ``<file>`` already exists it will be overwritten.
|
||||
|
||||
``-N,--show-only[=<format>]``
|
||||
Disable actual execution of tests.
|
||||
|
||||
@@ -155,7 +161,10 @@ Options
|
||||
Run tests with labels matching regular expression.
|
||||
|
||||
This option tells CTest to run only the tests whose labels match the
|
||||
given regular expression.
|
||||
given regular expression. When more than one ``-L`` option is given,
|
||||
a test will only be run if each regular expression matches at least one
|
||||
of the test's labels (i.e. the multiple ``-L`` labels form an ``AND``
|
||||
relationship). See `Label Matching`_.
|
||||
|
||||
``-R <regex>, --tests-regex <regex>``
|
||||
Run tests matching regular expression.
|
||||
@@ -173,7 +182,10 @@ Options
|
||||
Exclude tests with labels matching regular expression.
|
||||
|
||||
This option tells CTest to NOT run the tests whose labels match the
|
||||
given regular expression.
|
||||
given regular expression. When more than one ``-LE`` option is given,
|
||||
a test will only be excluded if each regular expression matches at least one
|
||||
of the test's labels (i.e. the multiple ``-LE`` labels form an ``AND``
|
||||
relationship). See `Label Matching`_.
|
||||
|
||||
``-FA <regex>, --fixture-exclude-any <regex>``
|
||||
Exclude fixtures matching ``<regex>`` from automatically adding any tests to
|
||||
@@ -398,6 +410,46 @@ Specify the directory in which to look for tests.
|
||||
|
||||
.. include:: OPTIONS_HELP.txt
|
||||
|
||||
.. _`Label Matching`:
|
||||
|
||||
Label Matching
|
||||
==============
|
||||
|
||||
Tests may have labels attached to them. Tests may be included
|
||||
or excluded from a test run by filtering on the labels.
|
||||
Each individual filter is a regular expression applied to
|
||||
the labels attached to a test.
|
||||
|
||||
When ``-L`` is used, in order for a test to be included in a
|
||||
test run, each regular expression must match at least one
|
||||
label. Using more than one ``-L`` option means "match **all**
|
||||
of these".
|
||||
|
||||
The ``-LE`` option works just like ``-L``, but excludes tests
|
||||
rather than including them. A test is excluded if each regular
|
||||
expression matches at least one label.
|
||||
|
||||
If a test has no labels attached to it, then ``-L`` will never
|
||||
include that test, and ``-LE`` will never exclude that test.
|
||||
As an example of tests with labels, consider five tests,
|
||||
with the following labels:
|
||||
|
||||
* *test1* has labels *tuesday* and *production*
|
||||
* *test2* has labels *tuesday* and *test*
|
||||
* *test3* has labels *wednesday* and *production*
|
||||
* *test4* has label *wednesday*
|
||||
* *test5* has labels *friday* and *test*
|
||||
|
||||
Running ``ctest`` with ``-L tuesday -L test`` will select *test2*, which has
|
||||
both labels. Running CTest with ``-L test`` will select *test2* and
|
||||
*test5*, because both of them have a label that matches that regular
|
||||
expression.
|
||||
|
||||
Because the matching works with regular expressions, take note that
|
||||
running CTest with ``-L es`` will match all five tests.
|
||||
To select the *tuesday* and *wednesday* tests together, use a single
|
||||
regular expression that matches either of them, like ``-L "tue|wed"``.
|
||||
|
||||
.. _`Label and Subproject Summary`:
|
||||
|
||||
Label and Subproject Summary
|
||||
@@ -1043,6 +1095,8 @@ Configuration settings include:
|
||||
* `CTest Script`_ variable: :variable:`CTEST_TEST_TIMEOUT`
|
||||
* :module:`CTest` module variable: ``DART_TESTING_TIMEOUT``
|
||||
|
||||
To report extra test values to CDash, see :ref:`Additional Test Measurements`.
|
||||
|
||||
.. _`CTest Coverage Step`:
|
||||
|
||||
CTest Coverage Step
|
||||
@@ -1619,4 +1673,4 @@ See Also
|
||||
|
||||
.. include:: LINKS.txt
|
||||
|
||||
.. _`CDash`: http://cdash.org/
|
||||
_`CDash`: https://cdash.org
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": 2,
|
||||
"version": 3,
|
||||
"cmakeMinimumRequired": {
|
||||
"major": 3,
|
||||
"minor": 20,
|
||||
@@ -35,6 +35,17 @@
|
||||
"displayName": "Ninja Multi-Config",
|
||||
"description": "Default build using Ninja Multi-Config generator",
|
||||
"generator": "Ninja Multi-Config"
|
||||
},
|
||||
{
|
||||
"name": "windows-only",
|
||||
"inherits": "default",
|
||||
"displayName": "Windows-only configuration",
|
||||
"description": "This build is only available on Windows",
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Windows"
|
||||
}
|
||||
}
|
||||
],
|
||||
"buildPresets": [
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
},
|
||||
"cmakeMinimumRequired": { "$ref": "#/definitions/cmakeMinimumRequired"},
|
||||
"vendor": { "$ref": "#/definitions/vendor" },
|
||||
"configurePresets": { "$ref": "#/definitions/configurePresets"}
|
||||
"configurePresets": { "$ref": "#/definitions/configurePresetsV1"}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
@@ -23,9 +23,23 @@
|
||||
},
|
||||
"cmakeMinimumRequired": { "$ref": "#/definitions/cmakeMinimumRequired"},
|
||||
"vendor": { "$ref": "#/definitions/vendor" },
|
||||
"configurePresets": { "$ref": "#/definitions/configurePresets"},
|
||||
"buildPresets": { "$ref": "#/definitions/buildPresets"},
|
||||
"testPresets": { "$ref": "#/definitions/testPresets"}
|
||||
"configurePresets": { "$ref": "#/definitions/configurePresetsV1"},
|
||||
"buildPresets": { "$ref": "#/definitions/buildPresetsV2"},
|
||||
"testPresets": { "$ref": "#/definitions/testPresetsV2"}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"version": {
|
||||
"const": 3,
|
||||
"description": "A required integer representing the version of the JSON schema."
|
||||
},
|
||||
"cmakeMinimumRequired": { "$ref": "#/definitions/cmakeMinimumRequired"},
|
||||
"vendor": { "$ref": "#/definitions/vendor" },
|
||||
"configurePresets": { "$ref": "#/definitions/configurePresetsV3"},
|
||||
"buildPresets": { "$ref": "#/definitions/buildPresetsV3"},
|
||||
"testPresets": { "$ref": "#/definitions/testPresetsV3"}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
@@ -58,7 +72,34 @@
|
||||
"description": "An optional map containing vendor-specific information. CMake does not interpret the contents of this field except to verify that it is a map if it does exist. However, the keys should be a vendor-specific domain name followed by a /-separated path. For example, the Example IDE 1.0 could use example.com/ExampleIDE/1.0. The value of each field can be anything desired by the vendor, though will typically be a map.",
|
||||
"properties": {}
|
||||
},
|
||||
"configurePresets": {
|
||||
"configurePresetsItemsV3": {
|
||||
"type": "array",
|
||||
"description": "A configure preset object.",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"description": "A configure preset object.",
|
||||
"properties": {
|
||||
"binaryDir": {
|
||||
"type": "string",
|
||||
"description": "An optional string representing the path to the output binary directory. This field supports macro expansion. If a relative path is specified, it is calculated relative to the source directory. If binaryDir is not specified, the path is calculated using regular methods."
|
||||
},
|
||||
"generator": {
|
||||
"type": "string",
|
||||
"description": "An optional string representing the generator to use for the preset. If generator is not specified, the normal generator discovery procedure is used. Note that for Visual Studio generators, unlike in the command line -G argument, you cannot include the platform name in the generator name. Use the architecture field instead."
|
||||
},
|
||||
"toolchainFile": {
|
||||
"type": "string",
|
||||
"description": "An optional string representing the path to the toolchain file. This field supports macro expansion. If a relative path is specified, it is calculated relative to the build directory, and if not found, relative to the source directory."
|
||||
},
|
||||
"installDir": {
|
||||
"type": "string",
|
||||
"description": "An optional string representing the path to the installation directory. This field supports macro expansion. If a relative path is specified, it is calculated relative to the source directory."
|
||||
},
|
||||
"condition": { "$ref": "#/definitions/topCondition" }
|
||||
}
|
||||
}
|
||||
},
|
||||
"configurePresetsItemsV1": {
|
||||
"type": "array",
|
||||
"description": "An optional array of configure preset objects.",
|
||||
"items": {
|
||||
@@ -302,6 +343,37 @@
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"configurePresetsV3": {
|
||||
"type": "array",
|
||||
"description": "An optional array of configure preset objects.",
|
||||
"allOf": [
|
||||
{ "$ref": "#/definitions/configurePresetsItemsV1" },
|
||||
{ "$ref": "#/definitions/configurePresetsItemsV3" }
|
||||
],
|
||||
"items": {
|
||||
"properties": {
|
||||
"name": {},
|
||||
"hidden": {},
|
||||
"inherits": {},
|
||||
"vendor": {},
|
||||
"displayName": {},
|
||||
"description": {},
|
||||
"generator": {},
|
||||
"architecture": {},
|
||||
"toolset": {},
|
||||
"toolchainFile": {},
|
||||
"binaryDir": {},
|
||||
"installDir": {},
|
||||
"cmakeExecutable": {},
|
||||
"cacheVariables": {},
|
||||
"environment": {},
|
||||
"warnings": {},
|
||||
"errors": {},
|
||||
"debug": {},
|
||||
"condition": {}
|
||||
},
|
||||
"required": [
|
||||
"name"
|
||||
@@ -309,7 +381,48 @@
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"buildPresets": {
|
||||
"configurePresetsV1": {
|
||||
"type": "array",
|
||||
"description": "An optional array of configure preset objects.",
|
||||
"allOf": [
|
||||
{ "$ref": "#/definitions/configurePresetsItemsV1" }
|
||||
],
|
||||
"items": {
|
||||
"properties": {
|
||||
"name": {},
|
||||
"hidden": {},
|
||||
"inherits": {},
|
||||
"vendor": {},
|
||||
"displayName": {},
|
||||
"description": {},
|
||||
"generator": {},
|
||||
"architecture": {},
|
||||
"toolset": {},
|
||||
"binaryDir": {},
|
||||
"cmakeExecutable": {},
|
||||
"cacheVariables": {},
|
||||
"environment": {},
|
||||
"warnings": {},
|
||||
"errors": {},
|
||||
"debug": {}
|
||||
},
|
||||
"required": [
|
||||
"name"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"buildPresetsItemsV3": {
|
||||
"type": "array",
|
||||
"description": "An optional array of build preset objects. Used to specify arguments to cmake --build. Available in version 2 and higher.",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"condition": { "$ref": "#/definitions/topCondition" }
|
||||
}
|
||||
}
|
||||
},
|
||||
"buildPresetsItemsV2": {
|
||||
"type": "array",
|
||||
"description": "An optional array of build preset objects. Used to specify arguments to cmake --build. Available in version 2 and higher.",
|
||||
"items": {
|
||||
@@ -425,13 +538,86 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name"
|
||||
]
|
||||
}
|
||||
},
|
||||
"buildPresetsV3": {
|
||||
"type": "array",
|
||||
"description": "An optional array of build preset objects. Used to specify arguments to cmake --build. Available in version 2 and higher.",
|
||||
"allOf": [
|
||||
{ "$ref": "#/definitions/buildPresetsItemsV3" },
|
||||
{ "$ref": "#/definitions/buildPresetsItemsV2" }
|
||||
],
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {},
|
||||
"hidden": {},
|
||||
"inherits": {},
|
||||
"configurePreset": {},
|
||||
"vendor": {},
|
||||
"displayName": {},
|
||||
"description": {},
|
||||
"inheritConfigureEnvironment": {},
|
||||
"environment": {},
|
||||
"jobs": {},
|
||||
"targets": {},
|
||||
"configuration": {},
|
||||
"cleanFirst": {},
|
||||
"verbose": {},
|
||||
"nativeToolOptions": {},
|
||||
"condition": {}
|
||||
},
|
||||
"required": [
|
||||
"name"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"testPresets": {
|
||||
"buildPresetsV2": {
|
||||
"type": "array",
|
||||
"description": "An optional array of build preset objects. Used to specify arguments to cmake --build. Available in version 2 and higher.",
|
||||
"allOf": [
|
||||
{ "$ref": "#/definitions/buildPresetsItemsV2" }
|
||||
],
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {},
|
||||
"hidden": {},
|
||||
"inherits": {},
|
||||
"configurePreset": {},
|
||||
"vendor": {},
|
||||
"displayName": {},
|
||||
"description": {},
|
||||
"inheritConfigureEnvironment": {},
|
||||
"environment": {},
|
||||
"jobs": {},
|
||||
"targets": {},
|
||||
"configuration": {},
|
||||
"cleanFirst": {},
|
||||
"verbose": {},
|
||||
"nativeToolOptions": {}
|
||||
},
|
||||
"required": [
|
||||
"name"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"testPresetsItemsV3": {
|
||||
"type": "array",
|
||||
"description": "An optional array of test preset objects. Used to specify arguments to ctest. Available in version 2 and higher.",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"condition": { "$ref": "#/definitions/topCondition" }
|
||||
}
|
||||
}
|
||||
},
|
||||
"testPresetsItemsV2": {
|
||||
"type": "array",
|
||||
"description": "An optional array of test preset objects. Used to specify arguments to ctest. Available in version 2 and higher.",
|
||||
"items": {
|
||||
@@ -741,11 +927,314 @@
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name"
|
||||
]
|
||||
}
|
||||
},
|
||||
"testPresetsV3": {
|
||||
"type": "array",
|
||||
"description": "An optional array of test preset objects. Used to specify arguments to ctest. Available in version 2 and higher.",
|
||||
"allOf": [
|
||||
{ "$ref": "#/definitions/testPresetsItemsV2" },
|
||||
{ "$ref": "#/definitions/testPresetsItemsV3" }
|
||||
],
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {},
|
||||
"hidden": {},
|
||||
"inherits": {},
|
||||
"configurePreset": {},
|
||||
"vendor": {},
|
||||
"displayName": {},
|
||||
"description": {},
|
||||
"inheritConfigureEnvironment": {},
|
||||
"environment": {},
|
||||
"configuration": {},
|
||||
"overwriteConfigurationFile": {},
|
||||
"output": {},
|
||||
"filter": {},
|
||||
"execution": {},
|
||||
"condition": {}
|
||||
},
|
||||
"required": [
|
||||
"name"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"testPresetsV2": {
|
||||
"type": "array",
|
||||
"description": "An optional array of test preset objects. Used to specify arguments to ctest. Available in version 2 and higher.",
|
||||
"allOf": [
|
||||
{ "$ref": "#/definitions/testPresetsItemsV2" }
|
||||
],
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {},
|
||||
"hidden": {},
|
||||
"inherits": {},
|
||||
"configurePreset": {},
|
||||
"vendor": {},
|
||||
"displayName": {},
|
||||
"description": {},
|
||||
"inheritConfigureEnvironment": {},
|
||||
"environment": {},
|
||||
"configuration": {},
|
||||
"overwriteConfigurationFile": {},
|
||||
"output": {},
|
||||
"filter": {},
|
||||
"execution": {}
|
||||
},
|
||||
"required": [
|
||||
"name"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"condition": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "boolean",
|
||||
"description": "A boolean which provides a constant value for the condition's evaluation."
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"description": "A required string specifying the type of the condition.",
|
||||
"const": "const"
|
||||
},
|
||||
"value": {
|
||||
"type": "boolean",
|
||||
"description": "A required boolean which provides a constant value for the condition's evaluation."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type",
|
||||
"value"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"description": "A required string specifying the type of the condition.",
|
||||
"const": "equals"
|
||||
},
|
||||
"lhs": {
|
||||
"type": "string",
|
||||
"description": "First string to compare. This field supports macro expansion."
|
||||
},
|
||||
"rhs": {
|
||||
"type": "string",
|
||||
"description": "Second string to compare. This field supports macro expansion."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type",
|
||||
"lhs",
|
||||
"rhs"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"description": "A required string specifying the type of the condition.",
|
||||
"const": "notEquals"
|
||||
},
|
||||
"lhs": {
|
||||
"type": "string",
|
||||
"description": "First string to compare. This field supports macro expansion."
|
||||
},
|
||||
"rhs": {
|
||||
"type": "string",
|
||||
"description": "Second string to compare. This field supports macro expansion."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type",
|
||||
"lhs",
|
||||
"rhs"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"description": "A required string specifying the type of the condition.",
|
||||
"const": "inList"
|
||||
},
|
||||
"string": {
|
||||
"type": "string",
|
||||
"description": "A required string to search for. This field supports macro expansion."
|
||||
},
|
||||
"list": {
|
||||
"type": "array",
|
||||
"description": "A required list of strings to search. This field supports macro expansion, and uses short-circuit evaluation.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type",
|
||||
"string",
|
||||
"list"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"description": "A required string specifying the type of the condition.",
|
||||
"const": "notInList"
|
||||
},
|
||||
"string": {
|
||||
"type": "string",
|
||||
"description": "A required string to search for. This field supports macro expansion."
|
||||
},
|
||||
"list": {
|
||||
"type": "array",
|
||||
"description": "A required list of strings to search. This field supports macro expansion, and uses short-circuit evaluation.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type",
|
||||
"string",
|
||||
"list"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"description": "A required string specifying the type of the condition.",
|
||||
"const": "matches"
|
||||
},
|
||||
"string": {
|
||||
"type": "string",
|
||||
"description": "A required string to search. This field supports macro expansion."
|
||||
},
|
||||
"regex": {
|
||||
"type": "string",
|
||||
"description": "A required regular expression to search for. This field supports macro expansion."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type",
|
||||
"string",
|
||||
"regex"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"description": "A required string specifying the type of the condition.",
|
||||
"const": "notMatches"
|
||||
},
|
||||
"string": {
|
||||
"type": "string",
|
||||
"description": "A required string to search. This field supports macro expansion."
|
||||
},
|
||||
"regex": {
|
||||
"type": "string",
|
||||
"description": "A required regular expression to search for. This field supports macro expansion."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type",
|
||||
"string",
|
||||
"regex"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"description": "A required string specifying the type of the condition.",
|
||||
"const": "anyOf"
|
||||
},
|
||||
"conditions": {
|
||||
"type": "array",
|
||||
"description": "A required array of condition objects. These conditions use short-circuit evaluation.",
|
||||
"items": { "$ref": "#/definitions/condition" }
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type",
|
||||
"conditions"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"description": "A required string specifying the type of the condition.",
|
||||
"const": "allOf"
|
||||
},
|
||||
"conditions": {
|
||||
"type": "array",
|
||||
"description": "A required array of condition objects. These conditions use short-circuit evaluation.",
|
||||
"items": { "$ref": "#/definitions/condition" }
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type",
|
||||
"conditions"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"description": "A required string specifying the type of the condition.",
|
||||
"const": "not"
|
||||
},
|
||||
"condition": { "$ref": "#/definitions/condition" }
|
||||
},
|
||||
"required": [
|
||||
"type",
|
||||
"condition"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"topCondition": {
|
||||
"anyOf": [
|
||||
{ "$ref": "#/definitions/condition" },
|
||||
{
|
||||
"type": "null",
|
||||
"description": "Null indicates that the condition always evaluates to true and is not inherited."
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
1
Help/module/FindMsys.rst
Normal file
1
Help/module/FindMsys.rst
Normal file
@@ -0,0 +1 @@
|
||||
.. cmake-module:: ../../Modules/FindMsys.cmake
|
||||
@@ -41,7 +41,7 @@ Examples
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
set_property(TARGET tgt PROPERTY CUDA_ARCHITECTURES 35 50 72)
|
||||
set_target_properties(tgt PROPERTIES CUDA_ARCHITECTURES "35;50;72")
|
||||
|
||||
Generates code for real and virtual architectures ``30``, ``50`` and ``72``.
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ CMP0110
|
||||
:command:`add_test` can now (officially) create tests with whitespace and
|
||||
other special characters in its name. Before CMake version 3.19 that was not
|
||||
allowed, however, it was possible to work around this limitation by explicitly
|
||||
putting escaped quotes arount the test's name in the ``add_test`` command.
|
||||
putting escaped quotes around the test's name in the ``add_test`` command.
|
||||
|
||||
Although never officially supported several projects in the wild found and
|
||||
implemented this workaround. However, the new change which officially allows
|
||||
|
||||
21
Help/policy/CMP0121.rst
Normal file
21
Help/policy/CMP0121.rst
Normal file
@@ -0,0 +1,21 @@
|
||||
CMP0121
|
||||
-------
|
||||
|
||||
.. versionadded:: 3.21
|
||||
|
||||
The :command:`list` command now detects invalid indices.
|
||||
|
||||
Prior to CMake version 3.21, the :command:`list` command's ``GET``,
|
||||
``INSERT``, ``SUBLIST``, and ``REMOVE_AT`` subcommands did not detect invalid
|
||||
index arguments.
|
||||
|
||||
The ``OLD`` behavior of this policy is for invalid indices to be treated as
|
||||
their integer value (if any) at the start of the string. For example,
|
||||
``2good4you`` is a ``2`` and ``not_an_integer`` is a ``0``. The ``NEW``
|
||||
behavior is for invalid indices to trigger an error.
|
||||
|
||||
This policy was introduced in CMake version 3.21. CMake version |release|
|
||||
warns when the policy is not set and uses ``OLD`` behavior. Use the
|
||||
:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly.
|
||||
|
||||
.. include:: DEPRECATED.txt
|
||||
17
Help/policy/CMP0122.rst
Normal file
17
Help/policy/CMP0122.rst
Normal file
@@ -0,0 +1,17 @@
|
||||
CMP0122
|
||||
-------
|
||||
|
||||
.. versionadded:: 3.21
|
||||
|
||||
:module:`UseSWIG` use library name conventions for ``CSharp`` language.
|
||||
|
||||
Starting with CMake 3.21, :module:`UseSWIG` generates now a library using
|
||||
default naming conventions. This policy provides compatibility with projects
|
||||
that expect the legacy behavior.
|
||||
|
||||
This policy was introduced in CMake version 3.21. CMake version
|
||||
|release| warns when the policy is not set and uses ``OLD`` behavior.
|
||||
Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW``
|
||||
explicitly.
|
||||
|
||||
.. include:: DEPRECATED.txt
|
||||
32
Help/policy/CMP0123.rst
Normal file
32
Help/policy/CMP0123.rst
Normal file
@@ -0,0 +1,32 @@
|
||||
CMP0123
|
||||
-------
|
||||
|
||||
.. versionadded:: 3.21
|
||||
|
||||
``ARMClang`` cpu/arch compile and link flags must be set explicitly.
|
||||
|
||||
CMake 3.20 and lower automatically maps the :variable:`CMAKE_SYSTEM_PROCESSOR`
|
||||
variable and an undocumented ``CMAKE_SYSTEM_ARCH`` to compile and link options
|
||||
for ``ARMClang``. For example, the ``-mcpu=cortex-m33`` flag is added when
|
||||
:variable:`CMAKE_SYSTEM_PROCESSOR` equals ``cortex-m33``. CMake requires
|
||||
projects to set either variable or it raises a fatal error. However, the
|
||||
project may need to additionally specify CPU features using e.g.
|
||||
``-mcpu=cortex-m33+nodsp``, conflicting with the ``-mcpu=cortex-m33`` added
|
||||
by CMake. This results in either link errors or unusable binaries.
|
||||
|
||||
CMake 3.21 and above prefer instead to not add any cpu/arch compile and link
|
||||
flags automatically. Instead, projects must specify them explicitly.
|
||||
This policy provides compatibility for projects that have not been updated.
|
||||
|
||||
The ``OLD`` behavior of this policy requires projects that use ``ARMClang``
|
||||
to set either :variable:`CMAKE_SYSTEM_PROCESSOR` or ``CMAKE_SYSTEM_ARCH``
|
||||
and it automatically adds a compile option ``-mcpu=`` or ``-march=`` and
|
||||
a link option ``--cpu=`` based on those variables. The ``NEW`` behavior
|
||||
does not add compile or link options, and projects are responsible for
|
||||
setting correct options.
|
||||
|
||||
This policy was introduced in CMake version 3.21. CMake version |release|
|
||||
warns when the policy is not set and uses ``OLD`` behavior. Use the
|
||||
:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly.
|
||||
|
||||
.. include:: DEPRECATED.txt
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user