summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJinWang An <jinwang.an@samsung.com>2022-12-27 17:20:09 +0900
committerJinWang An <jinwang.an@samsung.com>2022-12-27 17:20:09 +0900
commitd8dda6a1d51c315af1d76019ff567617c738320c (patch)
tree2480ac9bd06dba6b15eb64a537627b55d4c23a8f
parent7d0194465f58c820df7f2285a2a2167818718da2 (diff)
downloadcmake-d8dda6a1d51c315af1d76019ff567617c738320c.tar.gz
cmake-d8dda6a1d51c315af1d76019ff567617c738320c.tar.bz2
cmake-d8dda6a1d51c315af1d76019ff567617c738320c.zip
Imported Upstream version 3.22.4upstream/3.22.4
-rw-r--r--Help/dev/maint.rst18
-rw-r--r--Help/release/3.22.rst18
-rw-r--r--Modules/CMakeFindBinUtils.cmake10
-rw-r--r--Modules/Compiler/AppleClang-CXX.cmake10
-rw-r--r--Modules/FindMatlab.cmake1
-rw-r--r--Modules/FindPython/Support.cmake35
-rw-r--r--Modules/InstallRequiredSystemLibraries.cmake1
-rw-r--r--Modules/Internal/CPack/NSIS.template.in8
-rw-r--r--Source/CMakeVersion.cmake4
-rw-r--r--Source/cmLocalGenerator.cxx10
-rw-r--r--Source/cmMakefileExecutableTargetGenerator.cxx6
-rw-r--r--Tests/RunCMake/PrecompileHeaders/PchIncludedOneLanguage.cmake17
-rw-r--r--Tests/RunCMake/PrecompileHeaders/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/RunCMake.cmake2
-rw-r--r--Utilities/Release/linux/aarch64/cache.txt2
-rw-r--r--Utilities/Release/linux/x86_64/cache.txt2
-rw-r--r--Utilities/Release/win/x86/Dockerfile4
-rw-r--r--Utilities/Release/win/x86/cache-i386.txt2
-rw-r--r--Utilities/Release/win/x86/cache-x86_64.txt2
-rw-r--r--Utilities/Sphinx/CMakeLists.txt56
-rw-r--r--Utilities/Sphinx/conf.py.in1
-rw-r--r--Utilities/Sphinx/static/cmake.css12
-rw-r--r--Utilities/Sphinx/templates/layout.html40
23 files changed, 199 insertions, 63 deletions
diff --git a/Help/dev/maint.rst b/Help/dev/maint.rst
index 54d627dd5..4c2b6a14b 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/release/3.22.rst b/Help/release/3.22.rst
index 1f773e66c..00e93f62a 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/Modules/CMakeFindBinUtils.cmake b/Modules/CMakeFindBinUtils.cmake
index 6dbe62675..a6bd0d192 100644
--- a/Modules/CMakeFindBinUtils.cmake
+++ b/Modules/CMakeFindBinUtils.cmake
@@ -82,7 +82,8 @@ if(("x${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_SIMULATE_ID}" STREQUAL "xMSVC" AND
if("x${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ID}" STREQUAL "xClang")
set(_CMAKE_NM_NAMES "llvm-nm" "nm")
list(PREPEND _CMAKE_AR_NAMES "llvm-lib")
- list(PREPEND _CMAKE_MT_NAMES "llvm-mt")
+ # llvm-mt does not support all flags we need in vs_link_exe
+ # list(PREPEND _CMAKE_MT_NAMES "llvm-mt")
list(PREPEND _CMAKE_LINKER_NAMES "lld-link")
list(APPEND _CMAKE_TOOL_VARS NM)
elseif("x${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ID}" STREQUAL "xIntel")
@@ -172,8 +173,13 @@ else()
else()
list(PREPEND _CMAKE_LINKER_NAMES "ld.lld")
endif()
- if(NOT APPLE)
+ if(APPLE)
# llvm-ar does not generate a symbol table that the Apple ld64 linker accepts.
+ # FIXME(#23333): We still need to consider 'llvm-ar' as a fallback because
+ # the 'APPLE' definition may be based on the host in this context, and a
+ # cross-compiling toolchain may not have 'ar'.
+ list(APPEND _CMAKE_AR_NAMES "llvm-ar")
+ else()
list(PREPEND _CMAKE_AR_NAMES "llvm-ar")
endif()
list(PREPEND _CMAKE_RANLIB_NAMES "llvm-ranlib")
diff --git a/Modules/Compiler/AppleClang-CXX.cmake b/Modules/Compiler/AppleClang-CXX.cmake
index 28be1dfd5..7c979697a 100644
--- a/Modules/Compiler/AppleClang-CXX.cmake
+++ b/Modules/Compiler/AppleClang-CXX.cmake
@@ -47,9 +47,17 @@ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0)
set(CMAKE_CXX11_STANDARD__HAS_FULL_SUPPORT ON)
endif()
-if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 10.0)
+if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13.0)
+ set(CMAKE_CXX20_STANDARD_COMPILE_OPTION "-std=c++20")
+ set(CMAKE_CXX20_EXTENSION_COMPILE_OPTION "-std=gnu++20")
+elseif (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 10.0)
set(CMAKE_CXX20_STANDARD_COMPILE_OPTION "-std=c++2a")
set(CMAKE_CXX20_EXTENSION_COMPILE_OPTION "-std=gnu++2a")
endif()
+if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13.0)
+ set(CMAKE_CXX23_STANDARD_COMPILE_OPTION "-std=c++2b")
+ set(CMAKE_CXX23_EXTENSION_COMPILE_OPTION "-std=gnu++2b")
+endif()
+
__compiler_check_default_language_standard(CXX 4.0 98)
diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake
index f0e991b33..3c7efbc95 100644
--- a/Modules/FindMatlab.cmake
+++ b/Modules/FindMatlab.cmake
@@ -1573,6 +1573,7 @@ if(_numbers_of_matlab_roots GREATER 0)
list(GET _matlab_possible_roots ${_list_index} Matlab_VERSION_STRING)
list(GET _matlab_possible_roots ${_matlab_root_dir_index} Matlab_ROOT_DIR)
elseif(DEFINED Matlab_FIND_VERSION)
+ set(_list_index -1)
foreach(_matlab_root_index RANGE 1 ${_numbers_of_matlab_roots} 3)
list(GET _matlab_possible_roots ${_matlab_root_index} _matlab_root_version)
if(_matlab_root_version VERSION_GREATER_EQUAL Matlab_FIND_VERSION)
diff --git a/Modules/FindPython/Support.cmake b/Modules/FindPython/Support.cmake
index b7a0ef6bd..afe97434e 100644
--- a/Modules/FindPython/Support.cmake
+++ b/Modules/FindPython/Support.cmake
@@ -280,26 +280,26 @@ function (_PYTHON_GET_PATH_SUFFIXES _PYTHON_PGPS_PATH_SUFFIXES)
if (CMAKE_LIBRARY_ARCHITECTURE)
set (suffixes "${abi}")
if (suffixes)
- list (TRANSFORM suffixes PREPEND "lib/python${_PGPS_VERSION}/config-${_PGPS_VERSION}")
+ list (TRANSFORM suffixes PREPEND "lib/python${version}/config-${version}")
list (TRANSFORM suffixes APPEND "-${CMAKE_LIBRARY_ARCHITECTURE}")
else()
- set (suffixes "lib/python${_PGPS_VERSION}/config-${_PGPS_VERSION}-${CMAKE_LIBRARY_ARCHITECTURE}")
+ set (suffixes "lib/python${version}/config-${version}-${CMAKE_LIBRARY_ARCHITECTURE}")
endif()
list (APPEND path_suffixes ${suffixes})
endif()
set (suffixes "${abi}")
if (suffixes)
- list (TRANSFORM suffixes PREPEND "lib/python${_PGPS_VERSION}/config-${_PGPS_VERSION}")
+ list (TRANSFORM suffixes PREPEND "lib/python${version}/config-${version}")
else()
- set (suffixes "lib/python${_PGPS_VERSION}/config-${_PGPS_VERSION}")
+ set (suffixes "lib/python${version}/config-${version}")
endif()
list (APPEND path_suffixes ${suffixes})
elseif (_PGPS_INCLUDE)
set (suffixes "${abi}")
if (suffixes)
- list (TRANSFORM suffixes PREPEND "include/python${_PGPS_VERSION}")
+ list (TRANSFORM suffixes PREPEND "include/python${version}")
else()
- set (suffixes "include/python${_PGPS_VERSION}")
+ set (suffixes "include/python${version}")
endif()
list (APPEND path_suffixes ${suffixes} include)
endif()
@@ -318,6 +318,9 @@ function (_PYTHON_GET_PATH_SUFFIXES _PYTHON_PGPS_PATH_SUFFIXES)
elseif (_PGPS_LIBRARY)
list (APPEND path_suffixes ${_${_PYTHON_PREFIX}_PYPY_LIBRARY_PATH_SUFFIXES})
elseif (_PGPS_INCLUDE)
+ foreach (version IN LISTS _PGPS_VERSION)
+ list (APPEND path_suffixes lib/pypy${version}/include pypy${version}/include)
+ endforeach()
list (APPEND path_suffixes ${_${_PYTHON_PREFIX}_PYPY_INCLUDE_PATH_SUFFIXES})
endif()
endif()
@@ -587,7 +590,13 @@ function (_PYTHON_GET_VERSION)
set (${_PGV_PREFIX}ABI "${CMAKE_MATCH_3}" PARENT_SCOPE)
elseif (library_name MATCHES "pypy(3)?-c")
set (version "${CMAKE_MATCH_1}")
- if (version EQUAL "3")
+ # try to pick-up a more precise version from the path
+ get_filename_component (library_dir "${_${_PYTHON_PREFIX}_LIBRARY_RELEASE}" DIRECTORY)
+ if (library_dir MATCHES "/pypy([23])\\.([0-9]+)/")
+ set (${_PGV_PREFIX}VERSION_MAJOR "${CMAKE_MATCH_1}" PARENT_SCOPE)
+ set (${_PGV_PREFIX}VERSION_MINOR "${CMAKE_MATCH_2}" PARENT_SCOPE)
+ set (${_PGV_PREFIX}VERSION "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}" PARENT_SCOPE)
+ elseif (version EQUAL "3")
set (${_PGV_PREFIX}VERSION_MAJOR "3" PARENT_SCOPE)
set (${_PGV_PREFIX}VERSION "3" PARENT_SCOPE)
else()
@@ -1265,7 +1274,7 @@ if (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL "3")
# special name for runtime part
list (APPEND _${_PYTHON_PREFIX}_PYPY_LIB_NAMES libpypy3-c)
endif()
- set (_${_PYTHON_PREFIX}_PYPY_INCLUDE_PATH_SUFFIXES lib/pypy3)
+ set (_${_PYTHON_PREFIX}_PYPY_INCLUDE_PATH_SUFFIXES lib/pypy3/include pypy3/include)
else()
set (_${_PYTHON_PREFIX}_PYPY_NAMES pypy)
set (_${_PYTHON_PREFIX}_PYPY_LIB_NAMES pypy-c)
@@ -1273,8 +1282,9 @@ else()
# special name for runtime part
list (APPEND _${_PYTHON_PREFIX}_PYPY_LIB_NAMES libpypy-c)
endif()
- set (_${_PYTHON_PREFIX}_PYPY_INCLUDE_PATH_SUFFIXES lib/pypy)
+ set (_${_PYTHON_PREFIX}_PYPY_INCLUDE_PATH_SUFFIXES lib/pypy/include pypy/include)
endif()
+list (APPEND _${_PYTHON_PREFIX}_PYPY_INCLUDE_PATH_SUFFIXES libexec/include)
set (_${_PYTHON_PREFIX}_PYPY_EXECUTABLE_PATH_SUFFIXES bin)
set (_${_PYTHON_PREFIX}_PYPY_LIBRARY_PATH_SUFFIXES lib libs bin)
list (APPEND _${_PYTHON_PREFIX}_PYPY_INCLUDE_PATH_SUFFIXES include)
@@ -1303,7 +1313,7 @@ foreach (_${_PYTHON_PREFIX}_IMPLEMENTATION IN LISTS _${_PYTHON_PREFIX}_FIND_IMPL
if (_${_PYTHON_PREFIX}_IMPLEMENTATION STREQUAL "CPython")
list (APPEND _${_PYTHON_PREFIX}_INCLUDE_NAMES "Python.h")
elseif (_${_PYTHON_PREFIX}_IMPLEMENTATION STREQUAL "PyPy")
- list (APPEND _${_PYTHON_PREFIX}_INCLUDE_NAMES "PyPy.h")
+ list (APPEND _${_PYTHON_PREFIX}_INCLUDE_NAMES "PyPy.h" "pypy_decl.h")
endif()
endforeach()
@@ -2921,6 +2931,11 @@ if (("Development.Module" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS
# update versioning
set (_${_PYTHON_PREFIX}_VERSION ${_${_PYTHON_PREFIX}_INC_VERSION})
set (_${_PYTHON_PREFIX}_VERSION_PATCH ${_${_PYTHON_PREFIX}_INC_VERSION_PATCH})
+ elseif (_${_PYTHON_PREFIX}_VERSION VERSION_EQUAL _${_PYTHON_PREFIX}_INC_VERSION_MAJOR)
+ # library specify only major version, use include file for full version information
+ set (_${_PYTHON_PREFIX}_VERSION ${_${_PYTHON_PREFIX}_INC_VERSION})
+ set (_${_PYTHON_PREFIX}_VERSION_MINOR ${_${_PYTHON_PREFIX}_INC_VERSION_MINOR})
+ set (_${_PYTHON_PREFIX}_VERSION_PATCH ${_${_PYTHON_PREFIX}_INC_VERSION_PATCH})
endif()
else()
set (_${_PYTHON_PREFIX}_VERSION ${_${_PYTHON_PREFIX}_INC_VERSION})
diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake
index 689cab591..d5e5fd218 100644
--- a/Modules/InstallRequiredSystemLibraries.cmake
+++ b/Modules/InstallRequiredSystemLibraries.cmake
@@ -96,6 +96,7 @@ foreach(LANG IN ITEMS C CXX Fortran)
else()
set(_Intel_possible_redistdirs
"${_Intel_basedir}/../lib/${_Intel_archdir}"
+ "${_Intel_basedir}/../compiler/lib/${_Intel_archdir}_lin"
"${_Intel_basedir}/../../compiler/lib/${_Intel_archdir}_lin"
)
endif()
diff --git a/Modules/Internal/CPack/NSIS.template.in b/Modules/Internal/CPack/NSIS.template.in
index 8a0c9726c..f16eaf659 100644
--- a/Modules/Internal/CPack/NSIS.template.in
+++ b/Modules/Internal/CPack/NSIS.template.in
@@ -932,9 +932,11 @@ Function .onInit
;Run the uninstaller
uninst:
ClearErrors
- StrLen $2 "\@CPACK_NSIS_UNINSTALL_NAME@.exe"
- StrCpy $3 $0 -$2 # remove "\@CPACK_NSIS_UNINSTALL_NAME@.exe" from UninstallString to get path
- ExecWait '"$0" /S _?=$3' ;Do not copy the uninstaller to a temp file
+ StrCpy $2 $0 1
+ StrCmp '"' $2 0 +3 ; checks if string is quoted (CPack before v3.20.6 did not quote it)
+ ExecWait '$0 /S'
+ Goto +2
+ ExecWait '"$0" /S'
IfErrors uninst_failed inst
uninst_failed:
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 405c8f48e..d4aa27ed1 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,7 +1,7 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 22)
-set(CMake_VERSION_PATCH 3)
+set(CMake_VERSION_PATCH 4)
#set(CMake_VERSION_RC 0)
set(CMake_VERSION_IS_DIRTY 0)
@@ -21,7 +21,7 @@ endif()
if(NOT CMake_VERSION_NO_GIT)
# If this source was exported by 'git archive', use its commit info.
- set(git_info [==[6e9eaf209d CMake 3.22.3]==])
+ set(git_info [==[07d351b535 CMake 3.22.4]==])
# Otherwise, try to identify the current development source version.
if(NOT git_info MATCHES "^([0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]?[0-9a-f]?)[0-9a-f]* "
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index fc5e6e5f1..feea49f40 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2510,12 +2510,12 @@ void cmLocalGenerator::AddPchDependencies(cmGeneratorTarget* target)
static const std::array<std::string, 4> langs = { { "C", "CXX", "OBJC",
"OBJCXX" } };
- bool haveAnyPch = false;
+ std::set<std::string> pchLangSet;
if (this->GetGlobalGenerator()->IsXcode()) {
for (const std::string& lang : langs) {
const std::string pchHeader = target->GetPchHeader(config, lang, "");
if (!pchHeader.empty()) {
- haveAnyPch = true;
+ pchLangSet.emplace(lang);
}
}
}
@@ -2560,9 +2560,11 @@ void cmLocalGenerator::AddPchDependencies(cmGeneratorTarget* target)
const std::string pchHeader = target->GetPchHeader(config, lang, arch);
if (pchSource.empty() || pchHeader.empty()) {
- if (this->GetGlobalGenerator()->IsXcode() && haveAnyPch) {
+ if (this->GetGlobalGenerator()->IsXcode() && !pchLangSet.empty()) {
for (auto* sf : sources) {
- sf->SetProperty("SKIP_PRECOMPILE_HEADERS", "ON");
+ if (pchLangSet.find(sf->GetLanguage()) == pchLangSet.end()) {
+ sf->SetProperty("SKIP_PRECOMPILE_HEADERS", "ON");
+ }
}
}
continue;
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx
index 575fb0569..b4f0df026 100644
--- a/Source/cmMakefileExecutableTargetGenerator.cxx
+++ b/Source/cmMakefileExecutableTargetGenerator.cxx
@@ -195,8 +195,6 @@ void cmMakefileExecutableTargetGenerator::WriteNvidiaDeviceExecutableRule(
this->CreateObjectLists(useLinkScript, false, useResponseFileForObjects,
buildObjs, depends, useWatcomQuote);
- std::string const& aixExports = this->GetAIXExports(this->GetConfigName());
-
cmRulePlaceholderExpander::RuleVariables vars;
std::string objectDir = this->GeneratorTarget->GetSupportDirectory();
@@ -217,7 +215,6 @@ void cmMakefileExecutableTargetGenerator::WriteNvidiaDeviceExecutableRule(
cmOutputConverter::SHELL);
vars.Language = linkLanguage.c_str();
- vars.AIXExports = aixExports.c_str();
vars.Objects = buildObjs.c_str();
vars.ObjectDir = objectDir.c_str();
vars.Target = target.c_str();
@@ -527,11 +524,14 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
std::string manifests = this->GetManifests(this->GetConfigName());
+ std::string const& aixExports = this->GetAIXExports(this->GetConfigName());
+
cmRulePlaceholderExpander::RuleVariables vars;
vars.CMTargetName = this->GeneratorTarget->GetName().c_str();
vars.CMTargetType =
cmState::GetTargetTypeName(this->GeneratorTarget->GetType()).c_str();
vars.Language = linkLanguage.c_str();
+ vars.AIXExports = aixExports.c_str();
vars.Objects = buildObjs.c_str();
std::string objectDir = this->GeneratorTarget->GetSupportDirectory();
diff --git a/Tests/RunCMake/PrecompileHeaders/PchIncludedOneLanguage.cmake b/Tests/RunCMake/PrecompileHeaders/PchIncludedOneLanguage.cmake
new file mode 100644
index 000000000..dd582aca8
--- /dev/null
+++ b/Tests/RunCMake/PrecompileHeaders/PchIncludedOneLanguage.cmake
@@ -0,0 +1,17 @@
+cmake_minimum_required(VERSION 3.16)
+project(PchIncludedAllLanguages C CXX)
+
+if(CMAKE_CXX_COMPILE_OPTIONS_USE_PCH)
+ add_definitions(-DHAVE_PCH_SUPPORT)
+endif()
+
+add_executable(main
+ main.cpp
+ empty.c
+ pch-included.cpp
+)
+
+target_precompile_headers(main PRIVATE $<$<COMPILE_LANGUAGE:CXX>:${CMAKE_CURRENT_SOURCE_DIR}/pch.h>)
+
+enable_testing()
+add_test(NAME main COMMAND main)
diff --git a/Tests/RunCMake/PrecompileHeaders/RunCMakeTest.cmake b/Tests/RunCMake/PrecompileHeaders/RunCMakeTest.cmake
index ca5b52e87..29611aee9 100644
--- a/Tests/RunCMake/PrecompileHeaders/RunCMakeTest.cmake
+++ b/Tests/RunCMake/PrecompileHeaders/RunCMakeTest.cmake
@@ -29,4 +29,5 @@ if(RunCMake_GENERATOR MATCHES "Make|Ninja")
endif()
run_test(PchReuseFromObjLib)
run_test(PchIncludedAllLanguages)
+run_test(PchIncludedOneLanguage)
run_test(PchLibObjLibExe)
diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake
index 3363a579e..5e66a521e 100644
--- a/Tests/RunCMake/RunCMake.cmake
+++ b/Tests/RunCMake/RunCMake.cmake
@@ -157,7 +157,7 @@ function(run_cmake test)
"|[^\n]*install_name_tool: warning: changes being made to the file will invalidate the code signature in:"
"|[^\n]*xcodebuild[^\n]*DVTPlugInManager"
"|[^\n]*xcodebuild[^\n]*warning: file type[^\n]*is based on missing file type"
- "|[^\n]*objc[^\n]*: Class AMSupportURL[^\n]* One of the two will be used. Which one is undefined."
+ "|[^\n]*objc[^\n]*: Class [^\n]* One of the two will be used. Which one is undefined."
"|[^\n]*is a member of multiple groups"
"|[^\n]*offset in archive not a multiple of 8"
"|[^\n]*from Time Machine by path"
diff --git a/Utilities/Release/linux/aarch64/cache.txt b/Utilities/Release/linux/aarch64/cache.txt
index 0c2d9954f..ebfed73dd 100644
--- a/Utilities/Release/linux/aarch64/cache.txt
+++ b/Utilities/Release/linux/aarch64/cache.txt
@@ -32,7 +32,7 @@ SPHINX_EXECUTABLE:FILEPATH=/usr/local/bin/sphinx-build
SPHINX_HTML:BOOL=ON
SPHINX_MAN:BOOL=ON
SPHINX_QTHELP:BOOL=ON
-QCOLLECTIONGENERATOR_EXECUTABLE:PATH=/opt/qt/bin/qhelpgenerator
+QHELPGENERATOR_EXECUTABLE:PATH=/opt/qt/bin/qhelpgenerator
# We bootstrap as part of the build so skip its test.
CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE
diff --git a/Utilities/Release/linux/x86_64/cache.txt b/Utilities/Release/linux/x86_64/cache.txt
index e1f9fe337..a422af3d2 100644
--- a/Utilities/Release/linux/x86_64/cache.txt
+++ b/Utilities/Release/linux/x86_64/cache.txt
@@ -32,7 +32,7 @@ SPHINX_EXECUTABLE:FILEPATH=/opt/rh/rh-python36/root/usr/bin/sphinx-build
SPHINX_HTML:BOOL=ON
SPHINX_MAN:BOOL=ON
SPHINX_QTHELP:BOOL=ON
-QCOLLECTIONGENERATOR_EXECUTABLE:PATH=/opt/qt/bin/qhelpgenerator
+QHELPGENERATOR_EXECUTABLE:PATH=/opt/qt/bin/qhelpgenerator
# We bootstrap as part of the build so skip its test.
CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE
diff --git a/Utilities/Release/win/x86/Dockerfile b/Utilities/Release/win/x86/Dockerfile
index a4f744578..d5a036a79 100644
--- a/Utilities/Release/win/x86/Dockerfile
+++ b/Utilities/Release/win/x86/Dockerfile
@@ -11,8 +11,10 @@ ARG FROM_IMAGE_NAME=kitware/cmake:build-win-x86-deps-2020-04-27
ARG FROM_IMAGE_DIGEST=@sha256:04e229c0c0ba2247855d0e8c0fb87c1686f983adbafa4ce413e61b3905edb76b
ARG FROM_IMAGE=$FROM_IMAGE_NAME$FROM_IMAGE_DIGEST
-FROM $FROM_IMAGE as build
+FROM $FROM_IMAGE as source
COPY . C:\cmake\src\cmake
+
+FROM source as build
ARG ARCH="x86_64"
ARG TEST="true"
RUN \cmake\src\cmake\Utilities\Release\win\x86\build.bat %ARCH% %TEST%
diff --git a/Utilities/Release/win/x86/cache-i386.txt b/Utilities/Release/win/x86/cache-i386.txt
index 54a45d8fc..1c5c7f98d 100644
--- a/Utilities/Release/win/x86/cache-i386.txt
+++ b/Utilities/Release/win/x86/cache-i386.txt
@@ -24,7 +24,7 @@ SPHINX_EXECUTABLE:FILEPATH=C:/python3/Scripts/sphinx-build.exe
SPHINX_HTML:BOOL=ON
SPHINX_MAN:BOOL=ON
SPHINX_QTHELP:BOOL=ON
-QCOLLECTIONGENERATOR_EXECUTABLE:PATH=C:/qt-i386/bin/qhelpgenerator.exe
+QHELPGENERATOR_EXECUTABLE:PATH=C:/qt-i386/bin/qhelpgenerator.exe
# No bootstrap with MSVC tools.
CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE
diff --git a/Utilities/Release/win/x86/cache-x86_64.txt b/Utilities/Release/win/x86/cache-x86_64.txt
index 0b78c72b9..1c9b14c3b 100644
--- a/Utilities/Release/win/x86/cache-x86_64.txt
+++ b/Utilities/Release/win/x86/cache-x86_64.txt
@@ -24,7 +24,7 @@ SPHINX_EXECUTABLE:FILEPATH=C:/python3/Scripts/sphinx-build.exe
SPHINX_HTML:BOOL=ON
SPHINX_MAN:BOOL=ON
SPHINX_QTHELP:BOOL=ON
-QCOLLECTIONGENERATOR_EXECUTABLE:PATH=C:/qt-x86_64/bin/qhelpgenerator.exe
+QHELPGENERATOR_EXECUTABLE:PATH=C:/qt-x86_64/bin/qhelpgenerator.exe
# No bootstrap with MSVC tools.
CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE
diff --git a/Utilities/Sphinx/CMakeLists.txt b/Utilities/Sphinx/CMakeLists.txt
index c8a970dca..981e554a7 100644
--- a/Utilities/Sphinx/CMakeLists.txt
+++ b/Utilities/Sphinx/CMakeLists.txt
@@ -49,6 +49,12 @@ else()
set(conf_copyright "Kitware, Inc.")
endif()
+if(CMake_SPHINX_CMAKE_ORG)
+ set(conf_baseurl "https://cmake.org/cmake/help/latest")
+else()
+ set(conf_baseurl "")
+endif()
+
set(conf_docs "${CMake_SOURCE_DIR}/Help")
set(conf_path "${CMAKE_CURRENT_SOURCE_DIR}")
set(conf_version "${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CMake_VERSION_PATCH}")
@@ -96,12 +102,12 @@ endif()
if(SPHINX_QTHELP)
find_package(PythonInterp REQUIRED)
- find_program(QCOLLECTIONGENERATOR_EXECUTABLE
- NAMES qcollectiongenerator-qt5 qcollectiongenerator
- DOC "qcollectiongenerator tool"
+ find_program(QHELPGENERATOR_EXECUTABLE
+ NAMES qhelpgenerator-qt5 qhelpgenerator
+ DOC "qhelpgenerator tool"
)
- if (NOT QCOLLECTIONGENERATOR_EXECUTABLE)
- message(FATAL_ERROR "QCOLLECTIONGENERATOR_EXECUTABLE (qcollectiongenerator) not found!")
+ if(NOT QHELPGENERATOR_EXECUTABLE)
+ message(FATAL_ERROR "QHELPGENERATOR_EXECUTABLE (qhelpgenerator) not found!")
endif()
list(APPEND doc_formats qthelp)
@@ -121,7 +127,7 @@ if(SPHINX_QTHELP)
"${CMAKE_CURRENT_SOURCE_DIR}/create_identifiers.py"
"${CMAKE_CURRENT_BINARY_DIR}/qthelp/"
- COMMAND ${QCOLLECTIONGENERATOR_EXECUTABLE}
+ COMMAND ${QHELPGENERATOR_EXECUTABLE}
${CMAKE_CURRENT_BINARY_DIR}/qthelp/CMake.qhcp
)
endif()
@@ -129,11 +135,35 @@ if(SPHINX_LATEXPDF)
list(APPEND doc_formats latexpdf)
endif()
+set(doc_html_opts "")
+if(CMake_SPHINX_CMAKE_ORG)
+ list(APPEND doc_html_opts
+ -A googleanalytics=1
+ -A opensearch=1
+ -A versionswitch=1
+ )
+
+ if(CMake_SPHINX_CMAKE_ORG_OUTDATED)
+ list(APPEND doc_html_opts -A outdated=1)
+ endif()
+
+ list(APPEND qthelp_extra_commands
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_BINARY_DIR}/qthelp/CMake.qch"
+ "${CMAKE_CURRENT_BINARY_DIR}/html/CMake.qch"
+ )
+endif()
+
set(doc_format_outputs "")
set(doc_format_last "")
foreach(format ${doc_formats})
set(doc_format_output "doc_format_${format}")
set(doc_format_log "build-${format}.log")
+ if(CMake_SPHINX_CMAKE_ORG)
+ set(doctrees "doctrees/${format}")
+ else()
+ set(doctrees "doctrees")
+ endif()
if(format STREQUAL "latexpdf")
# This format does not use builder (-b) but make_mode (-M) which expects
# arguments in peculiar order
@@ -144,8 +174,9 @@ foreach(format ${doc_formats})
${CMake_SOURCE_DIR}/Help
${CMAKE_CURRENT_BINARY_DIR}/${format}
-c ${CMAKE_CURRENT_BINARY_DIR}
- -d ${CMAKE_CURRENT_BINARY_DIR}/doctrees
+ -d ${CMAKE_CURRENT_BINARY_DIR}/${doctrees}
${sphinx_flags}
+ ${doc_${format}_opts}
> ${doc_format_log} # log stdout, pass stderr
${${format}_extra_commands}
DEPENDS ${doc_format_last}
@@ -158,9 +189,10 @@ foreach(format ${doc_formats})
OUTPUT ${doc_format_output}
COMMAND ${SPHINX_EXECUTABLE}
-c ${CMAKE_CURRENT_BINARY_DIR}
- -d ${CMAKE_CURRENT_BINARY_DIR}/doctrees
+ -d ${CMAKE_CURRENT_BINARY_DIR}/${doctrees}
-b ${format}
${sphinx_flags}
+ ${doc_${format}_opts}
${CMake_SOURCE_DIR}/Help
${CMAKE_CURRENT_BINARY_DIR}/${format}
> ${doc_format_log} # log stdout, pass stderr
@@ -172,7 +204,9 @@ foreach(format ${doc_formats})
endif()
set_property(SOURCE ${doc_format_output} PROPERTY SYMBOLIC 1)
list(APPEND doc_format_outputs ${doc_format_output})
- set(doc_format_last ${doc_format_output})
+ if(NOT CMake_SPHINX_CMAKE_ORG)
+ set(doc_format_last ${doc_format_output})
+ endif()
endforeach()
add_custom_target(documentation ALL DEPENDS ${doc_format_outputs})
@@ -192,6 +226,10 @@ if(CMake_SPHINX_DEPEND_ON_EXECUTABLES)
endforeach()
endif()
+if(CMake_SPHINX_CMAKE_ORG)
+ return()
+endif()
+
if(SPHINX_INFO)
CMake_OPTIONAL_COMPONENT(sphinx-info)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/texinfo/cmake.info
diff --git a/Utilities/Sphinx/conf.py.in b/Utilities/Sphinx/conf.py.in
index c383828bd..2b3083b04 100644
--- a/Utilities/Sphinx/conf.py.in
+++ b/Utilities/Sphinx/conf.py.in
@@ -55,6 +55,7 @@ for fpath in cmake_manuals:
man_show_urls = False
man_make_section_directory = False
+html_baseurl = '@conf_baseurl@'
html_show_sourcelink = True
html_static_path = ['@conf_path@/static']
html_style = 'cmake.css'
diff --git a/Utilities/Sphinx/static/cmake.css b/Utilities/Sphinx/static/cmake.css
index 029eb1b2f..4539cf96f 100644
--- a/Utilities/Sphinx/static/cmake.css
+++ b/Utilities/Sphinx/static/cmake.css
@@ -22,3 +22,15 @@ div.sphinxsidebarwrapper {
dd > :first-child > p {
margin-top: 0px;
}
+
+div.outdated {
+ background-color: #f0f0c0;
+ color: black;
+ font-size: 90%;
+ padding-bottom: 5px;
+ padding-left: 2px;
+ padding-right: 2px;
+ padding-top: 5px;
+ text-align: center;
+ width: 100%;
+}
diff --git a/Utilities/Sphinx/templates/layout.html b/Utilities/Sphinx/templates/layout.html
index be2660caa..8fb7c4273 100644
--- a/Utilities/Sphinx/templates/layout.html
+++ b/Utilities/Sphinx/templates/layout.html
@@ -17,10 +17,28 @@
</li>
{% endblock %}
+{%- block relbar1 %}
+{{ super() }}
+{%- if outdated is defined %}
+ <div class="outdated">
+ This documents an old version of CMake.
+ <a href="https://cmake.org/cmake/help/latest/{{ pagename }}.html">
+ Click here to see the latest release.
+ </a>
+ <span class="version_switch_note"></span>
+ </div>
+{%- endif %}
+{%- endblock %}
+
{% block extrahead %}
- {% if versionswitch is defined %}
- <script type="text/javascript" src="{{ pathto('../version_switch.js', 1) }}"></script>
- {% endif %}
+ {%- if opensearch is defined %}
+ <link rel="search" type="application/opensearchdescription+xml"
+ title="Search within CMake Documentation of Latest Version"
+ href="{{ pathto('../latest-opensearch.xml', 1) }}"/>
+ {%- endif %}
+ {%- if versionswitch is defined %}
+ <script type="text/javascript" src="{{ pathto('../version_switch.js', 1) }}"></script>
+ {%- endif %}
{{ super() }}
{% endblock %}
@@ -29,3 +47,19 @@
{% block htmltitle %}
<title>{{ title|striptags|e }} {{ "&mdash;"|safe }} {{ docstitle|e }}</title>
{% endblock %}
+
+{%- block footer %}
+{{ super() }}
+{%- if googleanalytics is defined %}
+<script type="text/javascript">
+var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+</script>
+<script type="text/javascript">
+try {
+var pageTracker = _gat._getTracker("UA-6042509-4");
+pageTracker._trackPageview();
+} catch(err) {}
+</script>
+{%- endif %}
+{%- endblock %}