diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index efd15b3268b..1b1ddbe5c7a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -59,50 +59,32 @@ p:doc-package: - .cmake_doc_artifacts - .run_only_for_package -.u:source-package: +u:source-package: extends: - - .rsync_upload_binary + - .rsync_upload_package - .run_only_for_package dependencies: - p:source-package needs: - p:source-package - variables: - RSYNC_DESTINATION: dev # Documentation builds -b:help:master: +b:cmake.org-help: extends: - .cmake_org_help - - .run_only_for_continuous_master + - .run_cmake_org_help + dependencies: [] + needs: [] -.u:help:master: +u:cmake.org-help: extends: - .rsync_upload_help - - .run_only_for_continuous_master - variables: - RSYNC_DESTINATION: git-master + - .run_cmake_org_help dependencies: - - b:help:master + - b:cmake.org-help needs: - - b:help:master - -b:help:stage: - extends: - - .cmake_org_help - - .run_only_for_continuous_stage - -.u:help:stage: - extends: - - .rsync_upload_help - - .run_only_for_continuous_stage - variables: - RSYNC_DESTINATION: git-stage - dependencies: - - b:help:stage - needs: - - b:help:stage + - b:cmake.org-help # Lint builds @@ -548,16 +530,14 @@ b:linux-x86_64-package: needs: - p:doc-package -.u:linux-x86_64-package: +u:linux-x86_64-package: extends: - - .rsync_upload_binary + - .rsync_upload_package - .run_only_for_package dependencies: - b:linux-x86_64-package needs: - b:linux-x86_64-package - variables: - RSYNC_DESTINATION: dev b:linux-aarch64-package: extends: @@ -572,16 +552,14 @@ b:linux-aarch64-package: needs: - p:doc-package -.u:linux-aarch64-package: +u:linux-aarch64-package: extends: - - .rsync_upload_binary + - .rsync_upload_package - .run_only_for_package dependencies: - b:linux-aarch64-package needs: - b:linux-aarch64-package - variables: - RSYNC_DESTINATION: dev ## Sanitizer builds @@ -713,16 +691,14 @@ b:macos-package: needs: - p:doc-package -.u:macos-package: +u:macos-package: extends: - - .rsync_upload_binary + - .rsync_upload_package - .run_only_for_package dependencies: - b:macos-package needs: - b:macos-package - variables: - RSYNC_DESTINATION: dev b:macos10.10-package: extends: @@ -736,16 +712,14 @@ b:macos10.10-package: needs: - p:doc-package -.u:macos10.10-package: +u:macos10.10-package: extends: - - .rsync_upload_binary + - .rsync_upload_package - .run_only_for_package dependencies: - b:macos10.10-package needs: - b:macos10.10-package - variables: - RSYNC_DESTINATION: dev # Windows builds diff --git a/.gitlab/artifacts.yml b/.gitlab/artifacts.yml index 982f50b3bdb..5472c0ace9f 100644 --- a/.gitlab/artifacts.yml +++ b/.gitlab/artifacts.yml @@ -116,4 +116,3 @@ - build/html exclude: - build/html/.buildinfo - - build/html/objects.inv diff --git a/.gitlab/os-linux.yml b/.gitlab/os-linux.yml index ddcd0d3889c..af540f95885 100644 --- a/.gitlab/os-linux.yml +++ b/.gitlab/os-linux.yml @@ -512,5 +512,10 @@ - *before_script_linux - mkdir -p build/ - cd build/ - - cmake ../Utilities/Sphinx -GNinja -DSPHINX_HTML=ON -DSPHINX_FLAGS="-A versionswitch=1" + - cmake ../Utilities/Sphinx -GNinja + -DSPHINX_HTML=ON + -DSPHINX_QTHELP=$CMAKE_CI_SPHINX_QTHELP + -DCMake_SPHINX_CMAKE_ORG=ON + -DCMake_SPHINX_CMAKE_ORG_OUTDATED=$CMAKE_CI_SPHINX_OUTDATED + -DCMake_VERSION_NO_GIT=$CMAKE_CI_VERSION_NO_GIT - ninja diff --git a/.gitlab/rules.yml b/.gitlab/rules.yml index a871b8f6f28..20603f52fdf 100644 --- a/.gitlab/rules.yml +++ b/.gitlab/rules.yml @@ -2,7 +2,7 @@ .run_manually: rules: - - if: '$CMAKE_CI_PACKAGE == "true"' + - if: '$CMAKE_CI_PACKAGE != null' when: never - if: '$CMAKE_CI_NIGHTLY == "true"' when: on_success @@ -23,7 +23,7 @@ .run_automatically: rules: - - if: '$CMAKE_CI_PACKAGE == "true"' + - if: '$CMAKE_CI_PACKAGE != null' when: never - if: '$CMAKE_CI_NIGHTLY == "true"' when: on_success @@ -44,7 +44,7 @@ .run_dependent: rules: - - if: '$CMAKE_CI_PACKAGE == "true"' + - if: '$CMAKE_CI_PACKAGE != null' when: never - if: '($CMAKE_CI_NIGHTLY == "true" && $CMAKE_CI_NIGHTLY_IGNORE_DEPS == "true")' when: always @@ -62,18 +62,34 @@ .run_only_for_package: rules: - - if: '$CMAKE_CI_PACKAGE == "true"' + - if: '$CMAKE_CI_PACKAGE == "dev"' + variables: + RSYNC_DESTINATION: "dev" + when: on_success + - if: '$CMAKE_CI_PACKAGE != null && $CI_JOB_STAGE == "prep"' + when: manual + - if: '$CMAKE_CI_PACKAGE != null && $CI_JOB_STAGE != "upload"' when: on_success - when: never -.run_only_for_continuous_master: +.run_cmake_org_help: rules: + - if: '$CMAKE_CI_PACKAGE =~ /v[0-9]+\.[0-9]+/' + variables: + RSYNC_DESTINATION: "$CMAKE_CI_PACKAGE" + CMAKE_CI_SPHINX_QTHELP: "ON" + CMAKE_CI_VERSION_NO_GIT: "ON" + when: manual - if: '$CMAKE_CI_PROJECT_MAIN_BRANCH != null && $CI_COMMIT_BRANCH != null && $CMAKE_CI_PROJECT_MAIN_BRANCH == $CI_COMMIT_BRANCH' + variables: + RSYNC_DESTINATION: "git-master" + CMAKE_CI_SPHINX_QTHELP: "OFF" + CMAKE_CI_VERSION_NO_GIT: "OFF" 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' + variables: + RSYNC_DESTINATION: "git-stage" + CMAKE_CI_SPHINX_QTHELP: "OFF" + CMAKE_CI_VERSION_NO_GIT: "OFF" when: on_success - when: never diff --git a/.gitlab/upload.yml b/.gitlab/upload.yml index dc7da7e080f..d831c3e55cf 100644 --- a/.gitlab/upload.yml +++ b/.gitlab/upload.yml @@ -1,6 +1,6 @@ # Steps for uploading artifacts -.rsync_upload_binary: +.rsync_upload_package: image: "fedora:35" stage: upload tags: @@ -16,6 +16,7 @@ - dnf install -y --setopt=install_weak_deps=False rsync openssh-clients - chmod 400 $RSYNC_BINARY_KEY - ssh-keygen -y -f $RSYNC_BINARY_KEY > $RSYNC_BINARY_KEY.pub + - test -n "$RSYNC_DESTINATION" - rsync -tv --recursive -e "ssh -i $RSYNC_BINARY_KEY -o StrictHostKeyChecking=no -o LogLevel=ERROR" build/ kitware@cmake.org:$RSYNC_DESTINATION/ .rsync_upload_help: @@ -34,4 +35,5 @@ - 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 + - test -n "$RSYNC_DESTINATION" - rsync -tv --recursive --delete -e "ssh -i $RSYNC_HELP_KEY -o StrictHostKeyChecking=no -o LogLevel=ERROR" build/html/ kitware@cmake.org:$RSYNC_DESTINATION/ diff --git a/Help/command/install.rst b/Help/command/install.rst index 18b80dd4d86..cd8ccb5c189 100644 --- a/Help/command/install.rst +++ b/Help/command/install.rst @@ -828,7 +828,7 @@ of the ``Development`` component in the package metadata, ensuring that the library is always installed if the headers and CMake export file are present. .. versionadded:: 3.7 - In addition to cmake language files, the ``EXPORT_ANDROID_MK`` mode maybe + In addition to cmake language files, the ``EXPORT_ANDROID_MK`` mode may be used to specify an export to the android ndk build system. This mode accepts the same options as the normal export mode. The Android NDK supports the use of prebuilt libraries, both static and shared. This diff --git a/Help/command/string.rst b/Help/command/string.rst index 9c62f7a7fcb..8703da1e6eb 100644 --- a/Help/command/string.rst +++ b/Help/command/string.rst @@ -612,7 +612,7 @@ Requires an element of object type. .. code-block:: cmake string(JSON [ERROR_VARIABLE ] - LENGTH [ ...]) + LENGTH [ ...]) Get the length of an element in ```` at the location given by the list of ```` arguments. diff --git a/Help/command/target_sources.rst b/Help/command/target_sources.rst index 75432b18cbc..5052295a979 100644 --- a/Help/command/target_sources.rst +++ b/Help/command/target_sources.rst @@ -77,7 +77,7 @@ have zero or more named file sets. Each file set has a name, a type, a scope of ``INTERFACE``, ``PUBLIC``, or ``PRIVATE``, one or more base directories, and files within those directories. The only acceptable type is ``HEADERS``. The optional default file sets are named after their type. The target may not be a -custom target. +custom target or :prop_tgt:`FRAMEWORK` target. Files in a ``PRIVATE`` or ``PUBLIC`` file set are marked as source files for the purposes of IDE integration. Additionally, files in ``HEADERS`` file sets diff --git a/Help/dev/maint.rst b/Help/dev/maint.rst index 151ea5a1b2f..53be91f0052 100644 --- a/Help/dev/maint.rst +++ b/Help/dev/maint.rst @@ -245,20 +245,6 @@ Commit with a message such as:: Release versions do not have the development topic section of the CMake Release Notes index page. -Update ``.gitlab-ci.yml`` to drop the upload jobs from the -packaging pipeline by renaming them to start in ``.``: - -.. code-block:: shell - - sed -i 's/^u:/.u:/' .gitlab-ci.yml - -Commit with a message such as:: - - gitlab-ci: Drop package pipeline upload jobs for release branch - - The package pipeline for release versions should not upload packages - automatically to our archive of nightly development versions. - Update ``Source/CMakeVersion.cmake`` to set the version to ``$major.$minor.0-rc0``: @@ -290,15 +276,13 @@ Merge the ``release-$ver`` branch to ``master``: git merge --no-ff release-$ver Begin post-release development by restoring the development branch release -note infrastructure, the nightly package pipeline upload jobs, and -the version date from ``origin/master``: +note infrastructure, and the version date from ``origin/master``: .. code-block:: shell git checkout origin/master -- \ Source/CMakeVersion.cmake Help/release/dev/0-sample-topic.rst sed -i $'/^Releases/ i\\\n.. include:: dev.txt\\\n' Help/release/index.rst - sed -i 's/^\.u:/u:/' .gitlab-ci.yml Update ``Source/CMakeVersion.cmake`` to set the version to ``$major.$minor.$date``: diff --git a/Help/policy/CMP0112.rst b/Help/policy/CMP0112.rst index 313a51e82d1..5b00d071054 100644 --- a/Help/policy/CMP0112.rst +++ b/Help/policy/CMP0112.rst @@ -24,7 +24,9 @@ file name components no longer add a dependency on the evaluated target. In CMake 3.18 and lower a dependency on the evaluated target of the above generator expressions would always be added. CMake 3.19 and above prefer to not add this dependency. This policy provides compatibility for projects -that have not been updated to expect the new behavior. +that have not been updated to expect the new behavior. The policy setting +is recorded on each target when it is created, and decides whether generator +expressions referencing that target imply a dependency on it. The ``OLD`` behavior for this policy is to add a dependency on the evaluated target for the above generator expressions. The ``NEW`` behavior of diff --git a/Help/prop_tgt/HEADER_SETS.rst b/Help/prop_tgt/HEADER_SETS.rst index fcf723e4191..ceb1df50620 100644 --- a/Help/prop_tgt/HEADER_SETS.rst +++ b/Help/prop_tgt/HEADER_SETS.rst @@ -3,14 +3,13 @@ HEADER_SETS .. versionadded:: 3.23 -List of the target's ``PRIVATE`` and ``PUBLIC`` header sets (i.e. all -file sets with the type ``HEADERS``). Files listed in these file sets -are treated as source files for the purpose of IDE integration. -The files also have their :prop_sf:`HEADER_FILE_ONLY` property set to -``TRUE``. +Read-only list of the target's ``PRIVATE`` and ``PUBLIC`` header sets (i.e. +all file sets with the type ``HEADERS``). Files listed in these file sets are +treated as source files for the purpose of IDE integration. The files also +have their :prop_sf:`HEADER_FILE_ONLY` property set to ``TRUE``. -This property is normally only set by :command:`target_sources(FILE_SET)` -rather than being manipulated directly. +Header sets may be defined using the :command:`target_sources` command +``FILE_SET`` option with type ``HEADERS``. See also :prop_tgt:`HEADER_SET_`, :prop_tgt:`HEADER_SET` and :prop_tgt:`INTERFACE_HEADER_SETS`. diff --git a/Help/prop_tgt/INTERFACE_HEADER_SETS.rst b/Help/prop_tgt/INTERFACE_HEADER_SETS.rst index 62db5b30447..2d3bdacfcf0 100644 --- a/Help/prop_tgt/INTERFACE_HEADER_SETS.rst +++ b/Help/prop_tgt/INTERFACE_HEADER_SETS.rst @@ -3,12 +3,12 @@ INTERFACE_HEADER_SETS .. versionadded:: 3.23 -List of the target's ``INTERFACE`` and ``PUBLIC`` header sets (i.e. all -file sets with the type ``HEADERS``). Files listed in these header sets +Read-only list of the target's ``INTERFACE`` and ``PUBLIC`` header sets (i.e. +all file sets with the type ``HEADERS``). Files listed in these header sets can be installed with :command:`install(TARGETS)` and exported with :command:`install(EXPORT)` and :command:`export`. -This property is normally only set by :command:`target_sources(FILE_SET)` -rather than being manipulated directly. +Header sets may be defined using the :command:`target_sources` command +``FILE_SET`` option with type ``HEADERS``. See also :prop_tgt:`HEADER_SETS`. diff --git a/Help/release/3.22.rst b/Help/release/3.22.rst index 1f773e66c70..00e93f62a91 100644 --- a/Help/release/3.22.rst +++ b/Help/release/3.22.rst @@ -143,12 +143,17 @@ Other Changes * The :cpack_gen:`CPack NSIS Generator` now requires NSIS 3.03 or later. +Updates +======= + +Changes made since CMake 3.22.0 include the following. + 3.22.1 ------ -This version made no changes to documented features or interfaces. -Some implementation updates were made to support ecosystem changes -and/or fix regressions. +* This version made no changes to documented features or interfaces. + Some implementation updates were made to support ecosystem changes + and/or fix regressions. 3.22.2 ------ @@ -164,3 +169,10 @@ and/or fix regressions. errors in existing projects. The fix has been reverted to restore compatibility. The fix may be restored in a future version of CMake via a policy. + +3.22.4 +------ + +* This version made no changes to documented features or interfaces. + Some implementation updates were made to support ecosystem changes + and/or fix regressions. diff --git a/Help/release/3.23.rst b/Help/release/3.23.rst index 1a3f53ecc02..2febbec3cb4 100644 --- a/Help/release/3.23.rst +++ b/Help/release/3.23.rst @@ -114,8 +114,8 @@ Variables Properties ---------- -* The :prop_tgt:`HEADER_SETS` and :prop_tgt:`INTERFACE_HEADER_SETS` target - properties were added to list header sets associated with a target. +* The :prop_tgt:`HEADER_SETS` and :prop_tgt:`INTERFACE_HEADER_SETS` read-only + target properties were added to list header sets associated with a target. * The :prop_tgt:`HEADER_SET` and :prop_tgt:`HEADER_SET_` target properties were added to list files in the default header set @@ -264,3 +264,21 @@ Other Changes * :manual:`ccmake(1)` may now be enabled on Windows when building CMake from source. This is experimental, and so is not included in official distributions. + +Updates +======= + +Changes made since CMake 3.23.0 include the following. + +3.23.1 +------ + +* The :command:`target_sources` ``FILE_SET`` feature added in CMake 3.23.0 + does not yet place header files properly in Apple :prop_tgt:`FRAMEWORK` + targets. Pending further work in a future version of CMake, it is now + an error to add a ``FILE_SET`` of type ``HEADERS`` to such targets on + Apple platforms. + +* The :prop_tgt:`HEADER_SETS` and :prop_tgt:`INTERFACE_HEADER_SETS` target + properties added in CMake 3.23.0 are now read-only records of the header + sets created by the :command:`target_sources` command. diff --git a/Help/variable/CMAKE_CACHEFILE_DIR.rst b/Help/variable/CMAKE_CACHEFILE_DIR.rst index 8604d0e8c84..3fee09f37b3 100644 --- a/Help/variable/CMAKE_CACHEFILE_DIR.rst +++ b/Help/variable/CMAKE_CACHEFILE_DIR.rst @@ -1,7 +1,6 @@ CMAKE_CACHEFILE_DIR ------------------- -The directory with the ``CMakeCache.txt`` file. - -This is the full path to the directory that has the ``CMakeCache.txt`` -file in it. This is the same as :variable:`CMAKE_BINARY_DIR`. +This variable is used internally by CMake, and may not be set during +the first configuration of a build tree. When it is set, it has the +same value as :variable:`CMAKE_BINARY_DIR`. Use that variable instead. diff --git a/Modules/CMakeDependentOption.cmake b/Modules/CMakeDependentOption.cmake index b7c478f6440..ac0e2624a33 100644 --- a/Modules/CMakeDependentOption.cmake +++ b/Modules/CMakeDependentOption.cmake @@ -16,13 +16,18 @@ conditions are true. cmake_dependent_option(