summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2021-10-08 09:20:31 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2021-10-08 09:20:31 +0900
commit7433c268f8cc770bf1cc0593fd15f26763033f81 (patch)
tree14f92d53a3cb823841e34dd18988db13f3ae242e
parente2f5ee91b89a80c7801baf3870845d7fe54b3dd7 (diff)
downloadcmake-7433c268f8cc770bf1cc0593fd15f26763033f81.tar.gz
cmake-7433c268f8cc770bf1cc0593fd15f26763033f81.tar.bz2
cmake-7433c268f8cc770bf1cc0593fd15f26763033f81.zip
Imported Upstream version 3.19.3upstream/3.19.3
-rw-r--r--Help/prop_tgt/XCODE_LINK_BUILD_PHASE_MODE.rst1
-rw-r--r--Help/release/3.19.rst15
-rw-r--r--Modules/FetchContent.cmake9
-rw-r--r--Modules/FindHDF5.cmake2
-rw-r--r--Modules/FindMPI.cmake1
-rw-r--r--Source/CMakeVersion.cmake4
-rw-r--r--Source/QtDialog/CMakeLists.txt8
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx57
-rw-r--r--Source/cmGlobalXCodeGenerator.h9
-rw-r--r--Source/cmMakefile.cxx2
-rw-r--r--Source/cmSystemTools.cxx3
-rw-r--r--Source/cmXCode21Object.cxx5
-rw-r--r--Source/cmXCode21Object.h2
-rw-r--r--Source/cmXCodeObject.cxx24
-rw-r--r--Source/cmXCodeObject.h2
-rw-r--r--Tests/ConfigSources/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/BuildDepends/RepeatCMake-Custom-Script.cmake4
-rw-r--r--Tests/RunCMake/BuildDepends/RepeatCMake-Custom.cmake5
-rw-r--r--Tests/RunCMake/BuildDepends/RunCMakeTest.cmake17
-rw-r--r--Tests/RunCMake/CommandLine/trace-expand.cmake1
-rw-r--r--Tests/RunCMake/FetchContent/ManualSourceDirectoryRelative-stderr.txt3
-rw-r--r--Tests/RunCMake/FetchContent/ManualSourceDirectoryRelative.cmake1
-rw-r--r--Tests/RunCMake/FetchContent/RunCMakeTest.cmake5
-rw-r--r--Utilities/Release/linux/aarch64/Dockerfile35
-rw-r--r--Utilities/Release/linux/aarch64/base/Dockerfile31
-rw-r--r--Utilities/Release/linux/aarch64/cache.txt44
-rw-r--r--Utilities/Release/linux/aarch64/deps/Dockerfile141
-rw-r--r--Utilities/Release/linux/aarch64/deps/openssl-source.patch12
-rw-r--r--Utilities/Release/linux/aarch64/deps/qt-install.patch24
-rw-r--r--Utilities/Release/linux/aarch64/test/Dockerfile26
-rw-r--r--Utilities/Release/linux/aarch64/test/test-make.bash17
-rw-r--r--Utilities/Release/linux/aarch64/test/test-ninja.bash17
-rwxr-xr-xUtilities/Release/macos/qt-5.15.2-macosx10.13-x86_64-arm64.bash125
-rwxr-xr-xUtilities/Release/macos/qt-5.9.9-macosx10.10-x86_64-arm64.bash2
34 files changed, 606 insertions, 50 deletions
diff --git a/Help/prop_tgt/XCODE_LINK_BUILD_PHASE_MODE.rst b/Help/prop_tgt/XCODE_LINK_BUILD_PHASE_MODE.rst
index 2a79bcae5..836cc6b88 100644
--- a/Help/prop_tgt/XCODE_LINK_BUILD_PHASE_MODE.rst
+++ b/Help/prop_tgt/XCODE_LINK_BUILD_PHASE_MODE.rst
@@ -31,6 +31,7 @@ Possible values are:
* ``KNOWN_LOCATION``
The "Link Binary With Libraries" build phase will be used to link to another
target under the same conditions as with ``BUILT_ONLY`` and also:
+
- Imported library targets except those of type ``UNKNOWN``.
- Any non-target library specified directly with a path.
diff --git a/Help/release/3.19.rst b/Help/release/3.19.rst
index 60a8eccdf..7ad27c89f 100644
--- a/Help/release/3.19.rst
+++ b/Help/release/3.19.rst
@@ -385,3 +385,18 @@ Changes made since CMake 3.19.0 include the following.
* The :variable:`CMAKE_ISPC_HEADER_SUFFIX` variable and corresponding
:prop_tgt:`ISPC_HEADER_SUFFIX` target property were added to control
the header suffix used by ``ISPC`` compiler generated headers.
+
+3.19.3
+------
+
+* A precompiled Linux ``aarch64`` binary is now provided on ``cmake.org``.
+
+* Two precompiled macOS binaries are now provided on ``cmake.org``:
+
+ * The naming pattern ``cmake-$ver-macos-universal`` is a universal
+ binary with ``x86_64`` and ``arm64`` architectures. It requires
+ macOS 10.13 or newer.
+
+ * The naming pattern ``cmake-$ver-macos10.10-universal`` is a universal
+ binary with ``x86_64`` and ``arm64`` architectures. It requires
+ macOS 10.10 or newer.
diff --git a/Modules/FetchContent.cmake b/Modules/FetchContent.cmake
index 40cc36214..c81b3711a 100644
--- a/Modules/FetchContent.cmake
+++ b/Modules/FetchContent.cmake
@@ -1053,7 +1053,14 @@ function(FetchContent_Populate contentName)
# so no population is required. The build directory may still be specified
# by the declared details though.
- if(NOT EXISTS "${FETCHCONTENT_SOURCE_DIR_${contentNameUpper}}")
+ if(NOT IS_ABSOLUTE "${FETCHCONTENT_SOURCE_DIR_${contentNameUpper}}")
+ # Don't check this directory because we don't know what location it is
+ # expected to be relative to. We can't make this a hard error for backward
+ # compatibility reasons.
+ message(WARNING "Relative source directory specified. This is not safe, "
+ "as it depends on the calling directory scope.\n"
+ " FETCHCONTENT_SOURCE_DIR_${contentNameUpper} --> ${FETCHCONTENT_SOURCE_DIR_${contentNameUpper}}")
+ elseif(NOT EXISTS "${FETCHCONTENT_SOURCE_DIR_${contentNameUpper}}")
message(FATAL_ERROR "Manually specified source directory is missing:\n"
" FETCHCONTENT_SOURCE_DIR_${contentNameUpper} --> ${FETCHCONTENT_SOURCE_DIR_${contentNameUpper}}")
endif()
diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index 0c1e93b09..25f5a1f0a 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -991,10 +991,10 @@ if (HDF5_FOUND)
add_library(HDF5::HDF5 INTERFACE IMPORTED)
string(REPLACE "-D" "" _hdf5_definitions "${HDF5_DEFINITIONS}")
set_target_properties(HDF5::HDF5 PROPERTIES
- INTERFACE_LINK_LIBRARIES "${HDF5_LIBRARIES}"
INTERFACE_INCLUDE_DIRECTORIES "${HDF5_INCLUDE_DIRS}"
INTERFACE_COMPILE_DEFINITIONS "${_hdf5_definitions}")
unset(_hdf5_definitions)
+ target_link_libraries(HDF5::HDF5 INTERFACE ${HDF5_LIBRARIES})
endif ()
foreach (hdf5_lang IN LISTS HDF5_LANGUAGE_BINDINGS)
diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake
index b531e4740..789a72eb3 100644
--- a/Modules/FindMPI.cmake
+++ b/Modules/FindMPI.cmake
@@ -646,6 +646,7 @@ function (_MPI_interrogate_compiler LANG)
foreach(_MPI_INCLUDE_PATH IN LISTS MPI_ALL_INCLUDE_PATHS)
string(REGEX REPLACE "^ ?${_MPI_PREPROCESSOR_FLAG_REGEX}${CMAKE_INCLUDE_FLAG_${LANG}} *" "" _MPI_INCLUDE_PATH "${_MPI_INCLUDE_PATH}")
string(REPLACE "\"" "" _MPI_INCLUDE_PATH "${_MPI_INCLUDE_PATH}")
+ string(REPLACE "'" "" _MPI_INCLUDE_PATH "${_MPI_INCLUDE_PATH}")
get_filename_component(_MPI_INCLUDE_PATH "${_MPI_INCLUDE_PATH}" REALPATH)
list(APPEND MPI_INCLUDE_DIRS_WORK "${_MPI_INCLUDE_PATH}")
endforeach()
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 4549df1ee..efdc0bfbd 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 19)
-set(CMake_VERSION_PATCH 2)
+set(CMake_VERSION_PATCH 3)
#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 [==[0932b1c2b2 CMake 3.19.2]==])
+ set(git_info [==[19ff734e76 CMake 3.19.3]==])
# 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/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt
index 452a303a3..0f0c39a1f 100644
--- a/Source/QtDialog/CMakeLists.txt
+++ b/Source/QtDialog/CMakeLists.txt
@@ -57,6 +57,9 @@ if(CMake_INSTALL_DEPENDENCIES AND (APPLE OR WIN32))
endmacro()
if(APPLE)
install_qt5_plugin("Qt5::QCocoaIntegrationPlugin" QT_PLUGINS)
+ if(TARGET Qt5::QMacStylePlugin)
+ install_qt5_plugin("Qt5::QMacStylePlugin" QT_PLUGINS)
+ endif()
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/qt.conf"
"[Paths]\nPlugins = ${_qt_plugin_dir}\n")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/qt.conf"
@@ -129,6 +132,7 @@ qt5_wrap_cpp(MOC_SRCS
WarningMessagesDialog.h
)
qt5_add_resources(RC_SRCS CMakeSetup.qrc)
+add_library(CMakeGUIQRCLib OBJECT ${RC_SRCS})
if (FALSE) # CMake's bootstrap binary does not support automoc
set(CMAKE_AUTOMOC 1)
@@ -137,8 +141,7 @@ if (FALSE) # CMake's bootstrap binary does not support automoc
else ()
list(APPEND SRCS
${UI_SRCS}
- ${MOC_SRCS}
- ${RC_SRCS})
+ ${MOC_SRCS})
endif ()
if(USE_LGPL)
@@ -161,6 +164,7 @@ target_link_libraries(CMakeGUIMainLib PUBLIC CMakeGUILib)
add_executable(cmake-gui WIN32 MACOSX_BUNDLE CMakeGUIExec.cxx ${MANIFEST_FILE})
target_link_libraries(cmake-gui CMakeGUIMainLib Qt5::Core)
+target_sources(CMakeGUIMainLib INTERFACE $<TARGET_OBJECTS:CMakeGUIQRCLib>)
if(WIN32)
target_sources(CMakeGUIMainLib INTERFACE $<TARGET_OBJECTS:CMakeVersion> CMakeSetup.rc)
endif()
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 7ee94b294..df45b3523 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -18,6 +18,7 @@
#include "cmsys/RegularExpression.hxx"
#include "cmComputeLinkInformation.h"
+#include "cmCryptoHash.h"
#include "cmCustomCommand.h"
#include "cmCustomCommandGenerator.h"
#include "cmCustomCommandLines.h"
@@ -797,9 +798,10 @@ void cmGlobalXCodeGenerator::addObject(std::unique_ptr<cmXCodeObject> obj)
}
cmXCodeObject* cmGlobalXCodeGenerator::CreateObject(
- cmXCodeObject::PBXType ptype)
+ cmXCodeObject::PBXType ptype, cm::string_view key)
{
- auto obj = cm::make_unique<cmXCode21Object>(ptype, cmXCodeObject::OBJECT);
+ auto obj = cm::make_unique<cmXCode21Object>(ptype, cmXCodeObject::OBJECT,
+ this->GetObjectId(ptype, key));
auto ptr = obj.get();
this->addObject(std::move(obj));
return ptr;
@@ -807,7 +809,9 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateObject(
cmXCodeObject* cmGlobalXCodeGenerator::CreateObject(cmXCodeObject::Type type)
{
- auto obj = cm::make_unique<cmXCodeObject>(cmXCodeObject::None, type);
+ auto obj = cm::make_unique<cmXCodeObject>(
+ cmXCodeObject::None, type,
+ "Temporary cmake object, should not be referred to in Xcode file");
auto ptr = obj.get();
this->addObject(std::move(obj));
return ptr;
@@ -1725,13 +1729,13 @@ void cmGlobalXCodeGenerator::CreateCustomCommands(
if (this->XcodeBuildSystem >= BuildSystem::Twelve) {
// create prebuild phase
preBuildPhase =
- this->CreateRunScriptBuildPhase("CMake PreBuild Rules", prebuild);
+ this->CreateRunScriptBuildPhase("CMake PreBuild Rules", gtgt, prebuild);
// create prelink phase
preLinkPhase =
- this->CreateRunScriptBuildPhase("CMake PreLink Rules", prelink);
+ this->CreateRunScriptBuildPhase("CMake PreLink Rules", gtgt, prelink);
// create postbuild phase
- postBuildPhase =
- this->CreateRunScriptBuildPhase("CMake PostBuild Rules", postbuild);
+ postBuildPhase = this->CreateRunScriptBuildPhase("CMake PostBuild Rules",
+ gtgt, postbuild);
} else {
std::vector<cmSourceFile*> classes;
if (!gtgt->GetConfigCommonSourceFiles(classes)) {
@@ -1859,7 +1863,8 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateRunScriptBuildPhase(
}
cmXCodeObject* buildPhase =
- this->CreateObject(cmXCodeObject::PBXShellScriptBuildPhase);
+ this->CreateObject(cmXCodeObject::PBXShellScriptBuildPhase,
+ cmStrCat(gt->GetName(), ':', sf->GetFullPath()));
buildPhase->AddAttribute("buildActionMask",
this->CreateString("2147483647"));
cmXCodeObject* buildFiles = this->CreateObject(cmXCodeObject::OBJECT_LIST);
@@ -1918,7 +1923,8 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateRunScriptBuildPhase(
}
cmXCodeObject* cmGlobalXCodeGenerator::CreateRunScriptBuildPhase(
- std::string const& name, std::vector<cmCustomCommand> const& commands)
+ std::string const& name, cmGeneratorTarget const* gt,
+ std::vector<cmCustomCommand> const& commands)
{
if (commands.empty()) {
return nullptr;
@@ -1941,7 +1947,8 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateRunScriptBuildPhase(
}
cmXCodeObject* buildPhase =
- this->CreateObject(cmXCodeObject::PBXShellScriptBuildPhase);
+ this->CreateObject(cmXCodeObject::PBXShellScriptBuildPhase,
+ cmStrCat(gt->GetName(), ':', name));
buildPhase->AddAttribute("buildActionMask",
this->CreateString("2147483647"));
cmXCodeObject* buildFiles = this->CreateObject(cmXCodeObject::OBJECT_LIST);
@@ -2909,8 +2916,8 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt,
cmXCodeObject* cmGlobalXCodeGenerator::CreateUtilityTarget(
cmGeneratorTarget* gtgt)
{
- cmXCodeObject* shellBuildPhase =
- this->CreateObject(cmXCodeObject::PBXShellScriptBuildPhase);
+ cmXCodeObject* shellBuildPhase = this->CreateObject(
+ cmXCodeObject::PBXShellScriptBuildPhase, gtgt->GetName());
shellBuildPhase->AddAttribute("buildActionMask",
this->CreateString("2147483647"));
cmXCodeObject* buildFiles = this->CreateObject(cmXCodeObject::OBJECT_LIST);
@@ -3138,6 +3145,32 @@ cmXCodeObject* cmGlobalXCodeGenerator::FindXCodeTarget(
return i->second;
}
+std::string cmGlobalXCodeGenerator::GetObjectId(cmXCodeObject::PBXType ptype,
+ cm::string_view key)
+{
+ std::string objectId;
+ if (!key.empty()) {
+ cmCryptoHash hash(cmCryptoHash::AlgoSHA256);
+ hash.Initialize();
+ hash.Append(&ptype, sizeof(ptype));
+ hash.Append(key);
+ objectId = cmSystemTools::UpperCase(hash.FinalizeHex().substr(0, 24));
+ } else {
+ char cUuid[40] = { 0 };
+ CFUUIDRef uuid = CFUUIDCreate(kCFAllocatorDefault);
+ CFStringRef s = CFUUIDCreateString(kCFAllocatorDefault, uuid);
+ CFStringGetCString(s, cUuid, sizeof(cUuid), kCFStringEncodingUTF8);
+ objectId = cUuid;
+ CFRelease(s);
+ CFRelease(uuid);
+ cmSystemTools::ReplaceString(objectId, "-", "");
+ if (objectId.size() > 24) {
+ objectId = objectId.substr(0, 24);
+ }
+ }
+ return objectId;
+}
+
std::string cmGlobalXCodeGenerator::GetOrCreateId(const std::string& name,
const std::string& id)
{
diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h
index ab5eeb2dd..8ff6846e9 100644
--- a/Source/cmGlobalXCodeGenerator.h
+++ b/Source/cmGlobalXCodeGenerator.h
@@ -11,6 +11,8 @@
#include <string>
#include <vector>
+#include <cm/string_view>
+
#include "cmGlobalGenerator.h"
#include "cmXCodeObject.h"
@@ -162,11 +164,13 @@ private:
const std::string& configName);
cmXCodeObject* FindXCodeTarget(const cmGeneratorTarget*);
+ std::string GetObjectId(cmXCodeObject::PBXType ptype, cm::string_view key);
std::string GetOrCreateId(const std::string& name, const std::string& id);
// create cmXCodeObject from these functions so that memory can be managed
// correctly. All objects created are stored in this->XCodeObjects.
- cmXCodeObject* CreateObject(cmXCodeObject::PBXType ptype);
+ cmXCodeObject* CreateObject(cmXCodeObject::PBXType ptype,
+ cm::string_view key = {});
cmXCodeObject* CreateObject(cmXCodeObject::Type type);
cmXCodeObject* CreateString(const std::string& s);
cmXCodeObject* CreateObjectReference(cmXCodeObject*);
@@ -250,7 +254,8 @@ private:
cmGeneratorTarget const* gt,
cmCustomCommand const& cc);
cmXCodeObject* CreateRunScriptBuildPhase(
- std::string const& name, std::vector<cmCustomCommand> const& commands);
+ std::string const& name, cmGeneratorTarget const* gt,
+ std::vector<cmCustomCommand> const& commands);
std::string ConstructScript(cmCustomCommandGenerator const& ccg);
void CreateReRunCMakeFile(cmLocalGenerator* root,
std::vector<cmLocalGenerator*> const& gens);
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 0e4f888f0..39468417e 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -308,7 +308,7 @@ void cmMakefile::PrintCommandTrace(
args.reserve(lff.Arguments().size());
for (cmListFileArgument const& arg : lff.Arguments()) {
- if (expand) {
+ if (expand && arg.Delim != cmListFileArgument::Bracket) {
temp = arg.Value;
this->ExpandVariablesInString(temp);
args.push_back(temp);
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 97440d21a..6a705f480 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -952,9 +952,8 @@ bool cmMoveFile(std::wstring const& oldname, std::wstring const& newname)
SetLastError(0);
// Use MOVEFILE_REPLACE_EXISTING to replace an existing destination file.
- // Use MOVEFILE_WRITE_THROUGH to flush the change to disk before returning.
return MoveFileExW(oldname.c_str(), newname.c_str(),
- MOVEFILE_REPLACE_EXISTING | MOVEFILE_WRITE_THROUGH);
+ MOVEFILE_REPLACE_EXISTING);
}
}
#endif
diff --git a/Source/cmXCode21Object.cxx b/Source/cmXCode21Object.cxx
index 1cf9a9513..9b0dc58b2 100644
--- a/Source/cmXCode21Object.cxx
+++ b/Source/cmXCode21Object.cxx
@@ -4,11 +4,12 @@
#include <ostream>
#include <string>
+#include <utility>
#include "cmSystemTools.h"
-cmXCode21Object::cmXCode21Object(PBXType ptype, Type type)
- : cmXCodeObject(ptype, type)
+cmXCode21Object::cmXCode21Object(PBXType ptype, Type type, std::string id)
+ : cmXCodeObject(ptype, type, std::move(id))
{
this->Version = 21;
}
diff --git a/Source/cmXCode21Object.h b/Source/cmXCode21Object.h
index eb017447b..f3fc43898 100644
--- a/Source/cmXCode21Object.h
+++ b/Source/cmXCode21Object.h
@@ -13,7 +13,7 @@
class cmXCode21Object : public cmXCodeObject
{
public:
- cmXCode21Object(PBXType ptype, Type type);
+ cmXCode21Object(PBXType ptype, Type type, std::string id);
void PrintComment(std::ostream&) override;
static void PrintList(std::vector<std::unique_ptr<cmXCodeObject>> const&,
std::ostream& out, PBXType t);
diff --git a/Source/cmXCodeObject.cxx b/Source/cmXCodeObject.cxx
index b301ab121..d5c52756b 100644
--- a/Source/cmXCodeObject.cxx
+++ b/Source/cmXCodeObject.cxx
@@ -40,7 +40,7 @@ cmXCodeObject::~cmXCodeObject()
this->Version = 15;
}
-cmXCodeObject::cmXCodeObject(PBXType ptype, Type type)
+cmXCodeObject::cmXCodeObject(PBXType ptype, Type type, std::string id)
{
this->Version = 15;
this->Target = nullptr;
@@ -48,27 +48,7 @@ cmXCodeObject::cmXCodeObject(PBXType ptype, Type type)
this->IsA = ptype;
- if (type == OBJECT) {
- // Set the Id of an Xcode object to a unique string for each instance.
- // However the Xcode user file references certain Ids: for those cases,
- // override the generated Id using SetId().
- //
- char cUuid[40] = { 0 };
- CFUUIDRef uuid = CFUUIDCreate(kCFAllocatorDefault);
- CFStringRef s = CFUUIDCreateString(kCFAllocatorDefault, uuid);
- CFStringGetCString(s, cUuid, sizeof(cUuid), kCFStringEncodingUTF8);
- this->Id = cUuid;
- CFRelease(s);
- CFRelease(uuid);
- } else {
- this->Id =
- "Temporary cmake object, should not be referred to in Xcode file";
- }
-
- cmSystemTools::ReplaceString(this->Id, "-", "");
- if (this->Id.size() > 24) {
- this->Id = this->Id.substr(0, 24);
- }
+ this->Id = std::move(id);
this->TypeValue = type;
if (this->TypeValue == OBJECT) {
diff --git a/Source/cmXCodeObject.h b/Source/cmXCodeObject.h
index 78d4727f6..ac5be3f9e 100644
--- a/Source/cmXCodeObject.h
+++ b/Source/cmXCodeObject.h
@@ -57,7 +57,7 @@ public:
};
static const char* PBXTypeNames[];
virtual ~cmXCodeObject();
- cmXCodeObject(PBXType ptype, Type type);
+ cmXCodeObject(PBXType ptype, Type type, std::string id);
Type GetType() const { return this->TypeValue; }
PBXType GetIsA() const { return this->IsA; }
diff --git a/Tests/ConfigSources/CMakeLists.txt b/Tests/ConfigSources/CMakeLists.txt
index 1db00cc8a..9eed1c09b 100644
--- a/Tests/ConfigSources/CMakeLists.txt
+++ b/Tests/ConfigSources/CMakeLists.txt
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.0)
get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(NOT _isMultiConfig AND NOT CMAKE_BUILD_TYPE)
- set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build")
+ set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build" FORCE)
endif()
project(ConfigSources CXX)
diff --git a/Tests/RunCMake/BuildDepends/RepeatCMake-Custom-Script.cmake b/Tests/RunCMake/BuildDepends/RepeatCMake-Custom-Script.cmake
new file mode 100644
index 000000000..3e953b349
--- /dev/null
+++ b/Tests/RunCMake/BuildDepends/RepeatCMake-Custom-Script.cmake
@@ -0,0 +1,4 @@
+if(EXISTS "${CMAKE_CURRENT_BINARY_DIR}/exists-for-build2")
+ message(FATAL_ERROR "Custom command incorrectly re-ran after CMake re-ran!")
+endif()
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/out.txt")
diff --git a/Tests/RunCMake/BuildDepends/RepeatCMake-Custom.cmake b/Tests/RunCMake/BuildDepends/RepeatCMake-Custom.cmake
new file mode 100644
index 000000000..697e48546
--- /dev/null
+++ b/Tests/RunCMake/BuildDepends/RepeatCMake-Custom.cmake
@@ -0,0 +1,5 @@
+add_custom_command(OUTPUT out.txt
+ COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_LIST_DIR}/RepeatCMake-Custom-Script.cmake
+ DEPENDS ${CMAKE_CURRENT_LIST_DIR}/RepeatCMake-Custom-Script.cmake
+ )
+add_custom_target(drive ALL DEPENDS out.txt)
diff --git a/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake b/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake
index 7a68c4bd8..6c6d548d7 100644
--- a/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake
+++ b/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake
@@ -70,6 +70,23 @@ if(RunCMake_GENERATOR MATCHES "Make")
endif()
endif()
+function(run_RepeatCMake CASE)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${CASE}-build)
+ if(RunCMake_GENERATOR_IS_MULTI_CONFIG)
+ set(RunCMake_TEST_OPTIONS -DCMAKE_CONFIGURATION_TYPES=Debug)
+ else()
+ set(RunCMake_TEST_OPTIONS -DCMAKE_BUILD_TYPE=Debug)
+ endif()
+ run_cmake(${CASE})
+ set(RunCMake_TEST_NO_CLEAN 1)
+ run_cmake_command(${CASE}-build1 ${CMAKE_COMMAND} --build . --config Debug)
+ run_cmake_command(${CASE}-rerun1 ${CMAKE_COMMAND} .)
+ file(WRITE ${RunCMake_TEST_BINARY_DIR}/exists-for-build2 "")
+ run_cmake_command(${CASE}-build2 ${CMAKE_COMMAND} --build . --config Debug)
+endfunction()
+
+run_RepeatCMake(RepeatCMake-Custom)
+
function(run_ReGeneration)
# test re-generation of project even if CMakeLists.txt files disappeared
diff --git a/Tests/RunCMake/CommandLine/trace-expand.cmake b/Tests/RunCMake/CommandLine/trace-expand.cmake
index e69de29bb..24da02a67 100644
--- a/Tests/RunCMake/CommandLine/trace-expand.cmake
+++ b/Tests/RunCMake/CommandLine/trace-expand.cmake
@@ -0,0 +1 @@
+set(a [[\B]])
diff --git a/Tests/RunCMake/FetchContent/ManualSourceDirectoryRelative-stderr.txt b/Tests/RunCMake/FetchContent/ManualSourceDirectoryRelative-stderr.txt
new file mode 100644
index 000000000..3defcb402
--- /dev/null
+++ b/Tests/RunCMake/FetchContent/ManualSourceDirectoryRelative-stderr.txt
@@ -0,0 +1,3 @@
+ *Relative source directory specified. This is not safe, as it depends on
+ *the calling directory scope.
++ *FETCHCONTENT_SOURCE_DIR_WITHPROJECT --> WithProject
diff --git a/Tests/RunCMake/FetchContent/ManualSourceDirectoryRelative.cmake b/Tests/RunCMake/FetchContent/ManualSourceDirectoryRelative.cmake
new file mode 100644
index 000000000..d8b42ba95
--- /dev/null
+++ b/Tests/RunCMake/FetchContent/ManualSourceDirectoryRelative.cmake
@@ -0,0 +1 @@
+include(ManualSourceDirectory.cmake)
diff --git a/Tests/RunCMake/FetchContent/RunCMakeTest.cmake b/Tests/RunCMake/FetchContent/RunCMakeTest.cmake
index 3eb331f6b..9baeab75e 100644
--- a/Tests/RunCMake/FetchContent/RunCMakeTest.cmake
+++ b/Tests/RunCMake/FetchContent/RunCMakeTest.cmake
@@ -21,6 +21,11 @@ run_cmake_with_options(ManualSourceDirectory
run_cmake_with_options(ManualSourceDirectoryMissing
-D "FETCHCONTENT_SOURCE_DIR_WITHPROJECT=${CMAKE_CURRENT_LIST_DIR}/ADirThatDoesNotExist"
)
+# Need to use :STRING to prevent CMake from automatically converting it to an
+# absolute path
+run_cmake_with_options(ManualSourceDirectoryRelative
+ -D "FETCHCONTENT_SOURCE_DIR_WITHPROJECT:STRING=WithProject"
+)
function(run_FetchContent_DirOverrides)
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/DirOverrides-build)
diff --git a/Utilities/Release/linux/aarch64/Dockerfile b/Utilities/Release/linux/aarch64/Dockerfile
new file mode 100644
index 000000000..4077b79de
--- /dev/null
+++ b/Utilities/Release/linux/aarch64/Dockerfile
@@ -0,0 +1,35 @@
+# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
+
+# Produce an image containing a portable CMake binary package for Linux/aarch64.
+# Build using the CMake source directory as the build context.
+# The resulting image will have an '/out' directory containing the package.
+
+# Keep this in sync with the `.gitlab-ci.yml` `release_linux` image.
+ARG FROM_IMAGE_NAME=kitware/cmake:build-linux-aarch64-deps-2020-12-21
+ARG FROM_IMAGE_DIGEST=@sha256:0bd7dfe4e45593b04e39cd21e44011034610cfd376900558c5ef959bb1af15af
+ARG FROM_IMAGE=$FROM_IMAGE_NAME$FROM_IMAGE_DIGEST
+FROM $FROM_IMAGE
+
+COPY . /opt/cmake/src/cmake
+
+ARG TEST=true
+
+RUN : \
+ && mkdir -p /opt/cmake/src/cmake-build \
+ && cd /opt/cmake/src/cmake-build \
+ && cp ../cmake/Utilities/Release/linux/aarch64/cache.txt CMakeCache.txt \
+ && source /opt/rh/devtoolset-7/enable \
+ && set -x \
+ && ../cmake/bootstrap --parallel=$(nproc) --docdir=doc/cmake \
+ && nice make -j $(nproc) \
+ && if $TEST; then \
+ # Run tests that require the full build tree.
+ bin/ctest --output-on-failure -j 8 -R '^(CMake\.|CMakeLib\.|CMakeServerLib\.|RunCMake\.ctest_memcheck)'; \
+ fi \
+ && bin/cpack -G TGZ \
+ && bin/cpack -G STGZ \
+ && set +x \
+ && mkdir /out \
+ && mv cmake-*-Linux-aarch64.* /out \
+ && :
diff --git a/Utilities/Release/linux/aarch64/base/Dockerfile b/Utilities/Release/linux/aarch64/base/Dockerfile
new file mode 100644
index 000000000..b9c683e9e
--- /dev/null
+++ b/Utilities/Release/linux/aarch64/base/Dockerfile
@@ -0,0 +1,31 @@
+# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
+
+# Produce a base image with a build environment for portable CMake binaries.
+# Build using the directory containing this file as its own build context.
+
+ARG FROM_IMAGE_NAME=centos:7
+ARG FROM_IMAGE_DIGEST=@sha256:43964203bf5d7fe38c6fca6166ac89e4c095e2b0c0a28f6c7c678a1348ddc7fa
+ARG FROM_IMAGE=$FROM_IMAGE_NAME$FROM_IMAGE_DIGEST
+FROM $FROM_IMAGE
+
+RUN : \
+ && yum install -y centos-release-scl \
+ && yum install -y \
+ ca-certificates \
+ curl \
+ devtoolset-7-gcc \
+ devtoolset-7-gcc-c++ \
+ fontconfig-devel \
+ freetype-devel \
+ git \
+ libX11-devel \
+ libxcb-devel \
+ make \
+ patch \
+ perl \
+ python3-pip \
+ xz \
+ which \
+ && yum clean all \
+ && :
diff --git a/Utilities/Release/linux/aarch64/cache.txt b/Utilities/Release/linux/aarch64/cache.txt
new file mode 100644
index 000000000..89050d1f1
--- /dev/null
+++ b/Utilities/Release/linux/aarch64/cache.txt
@@ -0,0 +1,44 @@
+CMAKE_BUILD_TYPE:STRING=Release
+
+CMAKE_C_STANDARD:STRING=11
+CMAKE_CXX_STANDARD:STRING=14
+
+# Require only older APIs where possible.
+CMAKE_C_FLAGS:STRING=-D_POSIX_C_SOURCE=199506L -D_POSIX_SOURCE=1 -D_SVID_SOURCE=1 -D_BSD_SOURCE=1
+
+# Link C++ library statically.
+CMAKE_EXE_LINKER_FLAGS:STRING=-static-libstdc++ -static-libgcc
+
+# Enable ssl support in curl
+CMAKE_USE_OPENSSL:BOOL=ON
+OPENSSL_CRYPTO_LIBRARY:STRING=/opt/openssl/lib/libcrypto.a;-pthread
+OPENSSL_INCLUDE_DIR:PATH=/opt/openssl/include
+OPENSSL_SSL_LIBRARY:FILEPATH=/opt/openssl/lib/libssl.a
+
+# Enable ccmake
+BUILD_CursesDialog:BOOL=ON
+CURSES_FORM_LIBRARY:FILEPATH=/opt/ncurses/lib/libform.a
+CURSES_INCLUDE_PATH:PATH=/opt/ncurses/include
+CURSES_NCURSES_LIBRARY:FILEPATH=/opt/ncurses/lib/libncurses.a
+
+# Enable cmake-gui with static qt plugins
+BUILD_QtDialog:BOOL=TRUE
+CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL:STRING=3
+CMAKE_PREFIX_PATH:STRING=/opt/qt
+CMake_QT_STATIC_QXcbIntegrationPlugin_LIBRARIES:STRING=/opt/qt/plugins/platforms/libqxcb.a;/opt/qt/lib/libQt5XcbQpa.a;/opt/qt/lib/libQt5ServiceSupport.a;/opt/qt/lib/libQt5EdidSupport.a;/opt/qt/lib/libQt5EventDispatcherSupport.a;/opt/qt/lib/libQt5FontDatabaseSupport.a;/opt/qt/lib/libQt5ThemeSupport.a;/opt/qt/lib/libxcb-static.a;-lxcb;-lfontconfig;-lfreetype
+
+# Build documentation.
+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
+
+# We bootstrap as part of the build so skip its test.
+CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE
+
+# Skip Qt5 tests because our Qt is static.
+CMake_TEST_Qt5:BOOL=FALSE
+
+# CPack package file name component for this platform.
+CPACK_SYSTEM_NAME:STRING=Linux-aarch64
diff --git a/Utilities/Release/linux/aarch64/deps/Dockerfile b/Utilities/Release/linux/aarch64/deps/Dockerfile
new file mode 100644
index 000000000..8d0f6fdbe
--- /dev/null
+++ b/Utilities/Release/linux/aarch64/deps/Dockerfile
@@ -0,0 +1,141 @@
+# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
+
+# Produce an image with custom-built dependencies for portable CMake binaries.
+# Build using the directory containing this file as its own build context.
+
+ARG FROM_IMAGE_NAME=kitware/cmake:build-linux-aarch64-base-2020-12-21
+ARG FROM_IMAGE_DIGEST=@sha256:c8d9fa279ef09c26e74ff28770ae0db1f4cb75ef53b782ace604daba71a41f65
+ARG FROM_IMAGE=$FROM_IMAGE_NAME$FROM_IMAGE_DIGEST
+FROM $FROM_IMAGE
+
+# Sphinx
+RUN : \
+ && pip3 install sphinx==2.1.2 \
+ && :
+
+# Qt
+# Version 5.12.0 was the last to bundle xkbcommon.
+COPY qt-install.patch /opt/qt/src/
+RUN : \
+ && mkdir -p /opt/qt/src/qt-build \
+ && cd /opt/qt/src \
+ && curl -OL https://download.qt.io/archive/qt/5.12/5.12.0/single/qt-everywhere-src-5.12.0.tar.xz \
+ && sha512sum qt-everywhere-src-5.12.0.tar.xz | grep -q 0dd03d2645fb6dac5b58c8caf92b4a0a6900131f1ccfb02443a0df4702b5da0458f4c45e758d1b929ec709b0f4b36900df2fd60a058af9cc8c1a0748b6d57aae \
+ && tar xJf qt-everywhere-src-5.12.0.tar.xz \
+ && cd qt-build \
+ && source /opt/rh/devtoolset-7/enable \
+ && ../qt-everywhere-src-5.12.0/configure \
+ -prefix /opt/qt \
+ -static \
+ -release \
+ -c++std c++11 \
+ -opensource -confirm-license \
+ -gui \
+ -widgets \
+ -xcb \
+ -fontconfig \
+ -sql-sqlite \
+ -qt-doubleconversion \
+ -qt-libjpeg \
+ -qt-libpng \
+ -qt-pcre \
+ -qt-sqlite \
+ -qt-xcb \
+ -qt-xkbcommon \
+ -qt-zlib \
+ -system-freetype \
+ -no-accessibility \
+ -no-compile-examples \
+ -no-cups \
+ -no-dbus \
+ -no-directfb \
+ -no-egl \
+ -no-eglfs \
+ -no-evdev \
+ -no-gbm \
+ -no-gif \
+ -no-glib \
+ -no-gtk \
+ -no-harfbuzz \
+ -no-iconv \
+ -no-icu \
+ -no-journald \
+ -no-kms \
+ -no-libinput \
+ -no-libproxy \
+ -no-linuxfb \
+ -no-ltcg \
+ -no-mirclient \
+ -no-mtdev \
+ -no-opengl \
+ -no-openssl \
+ -no-pch \
+ -no-sql-mysql \
+ -no-sql-psql \
+ -no-sql-sqlite2 \
+ -no-syslog \
+ -no-system-proxies \
+ -no-tslib \
+ -no-use-gold-linker \
+ -skip declarative \
+ -skip multimedia \
+ -skip qtcanvas3d \
+ -skip qtconnectivity \
+ -skip qtdeclarative \
+ -skip qtlocation \
+ -skip qtmultimedia \
+ -skip qtsensors \
+ -skip qtserialport \
+ -skip qtsvg \
+ -skip qtwayland \
+ -skip qtwebchannel \
+ -skip qtwebengine \
+ -skip qtwebsockets \
+ -skip qtwinextras \
+ -skip qtxmlpatterns \
+ -nomake examples \
+ -nomake tests \
+ && make install -j $(nproc) \
+ && cd /opt/qt \
+ && patch -p1 -i src/qt-install.patch \
+ && cd /opt \
+ && rm -rf /opt/qt/src \
+ && :
+
+# Curses
+RUN : \
+ && mkdir -p /opt/ncurses/src/ncurses-build \
+ && cd /opt/ncurses/src \
+ && curl -O https://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.1.tar.gz \
+ && sha512sum ncurses-6.1.tar.gz | grep -q e308af43f8b7e01e98a55f4f6c4ee4d1c39ce09d95399fa555b3f0cdf5fd0db0f4c4d820b4af78a63f6cf6d8627587114a40af48cfc066134b600520808a77ee \
+ && tar xzf ncurses-6.1.tar.gz \
+ && cd ncurses-build \
+ && source /opt/rh/devtoolset-7/enable \
+ && ../ncurses-6.1/configure \
+ --prefix=/opt/ncurses \
+ --with-terminfo-dirs=/etc/terminfo:/lib/terminfo:/usr/share/terminfo \
+ --with-default-terminfo-dir=/usr/share/terminfo \
+ --without-shared \
+ && make -j $(nproc) \
+ && make install.libs install.includes \
+ && cd /opt \
+ && rm -rf /opt/ncurses/src \
+ && :
+
+# OpenSSL
+COPY openssl-source.patch /opt/openssl/src/
+RUN : \
+ && mkdir -p /opt/openssl/src \
+ && cd /opt/openssl/src \
+ && curl -O https://www.openssl.org/source/openssl-1.1.1f.tar.gz \
+ && sha512sum openssl-1.1.1f.tar.gz | grep -q b00bd9b5ad5298fbceeec6bb19c1ab0c106ca5cfb31178497c58bf7e0e0cf30fcc19c20f84e23af31cc126bf2447d3e4f8461db97bafa7bd78f69561932f000c \
+ && tar xzf openssl-1.1.1f.tar.gz \
+ && cd openssl-1.1.1f \
+ && patch -p1 -i ../openssl-source.patch \
+ && source /opt/rh/devtoolset-7/enable \
+ && ./Configure --prefix=/opt/openssl linux-elf no-asm no-shared -D_POSIX_C_SOURCE=199506L -D_POSIX_SOURCE=1 -D_SVID_SOURCE=1 -D_BSD_SOURCE=1 \
+ && make install_dev -j $(nproc) \
+ && cd /opt \
+ && rm -rf /opt/openssl/src \
+ && :
diff --git a/Utilities/Release/linux/aarch64/deps/openssl-source.patch b/Utilities/Release/linux/aarch64/deps/openssl-source.patch
new file mode 100644
index 000000000..c81fe2f88
--- /dev/null
+++ b/Utilities/Release/linux/aarch64/deps/openssl-source.patch
@@ -0,0 +1,12 @@
+# enable pthread APIs disabled by our _POSIX_SOURCE definitions
+--- openssl-source/crypto/threads_pthread.c.orig
++++ openssl-source/crypto/threads_pthread.c
+@@ -6,6 +6,8 @@
+ * in the file LICENSE in the source distribution or at
+ * https://www.openssl.org/source/license.html
+ */
++#undef _POSIX_C_SOURCE
++#undef _POSIX_SOURCE
+
+ #include <openssl/crypto.h>
+ #include "internal/cryptlib.h"
diff --git a/Utilities/Release/linux/aarch64/deps/qt-install.patch b/Utilities/Release/linux/aarch64/deps/qt-install.patch
new file mode 100644
index 000000000..792aefd39
--- /dev/null
+++ b/Utilities/Release/linux/aarch64/deps/qt-install.patch
@@ -0,0 +1,24 @@
+# Add Qt Core dependencies missing from static Qt build.
+--- qt-install/lib/cmake/Qt5Core/Qt5CoreConfig.cmake.orig
++++ qt-install/lib/cmake/Qt5Core/Qt5CoreConfig.cmake
+@@ -111,7 +111,7 @@
+ list(REMOVE_DUPLICATES Qt5Core_COMPILE_DEFINITIONS)
+ list(REMOVE_DUPLICATES Qt5Core_EXECUTABLE_COMPILE_FLAGS)
+
+- set(_Qt5Core_LIB_DEPENDENCIES "")
++ set(_Qt5Core_LIB_DEPENDENCIES "${_qt5Core_install_prefix}/lib/libqtpcre2.a")
+
+
+ add_library(Qt5::Core STATIC IMPORTED)
+# Add Qt Gui dependencies missing from static Qt build.
+--- qt-install/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake.orig
++++ qt-install/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake
+@@ -111,7 +111,7 @@
+ list(REMOVE_DUPLICATES Qt5Gui_COMPILE_DEFINITIONS)
+ list(REMOVE_DUPLICATES Qt5Gui_EXECUTABLE_COMPILE_FLAGS)
+
+- set(_Qt5Gui_LIB_DEPENDENCIES "Qt5::Core")
++ set(_Qt5Gui_LIB_DEPENDENCIES "Qt5::Core;${_qt5Gui_install_prefix}/lib/libqtlibpng.a")
+
+
+ add_library(Qt5::Gui STATIC IMPORTED)
diff --git a/Utilities/Release/linux/aarch64/test/Dockerfile b/Utilities/Release/linux/aarch64/test/Dockerfile
new file mode 100644
index 000000000..03674fbbc
--- /dev/null
+++ b/Utilities/Release/linux/aarch64/test/Dockerfile
@@ -0,0 +1,26 @@
+# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
+
+# Produce a base image with a test environment for packaged CMake binaries.
+# Build using the directory containing this file as its own build context.
+
+ARG FROM_IMAGE_NAME=debian:10
+ARG FROM_IMAGE_DIGEST=@sha256:ab0ba5b78bfe01d61ac4f9919cd0e7bef8beefa0a77d3d710bfc8630d96804b8
+ARG FROM_IMAGE=$FROM_IMAGE_NAME$FROM_IMAGE_DIGEST
+FROM $FROM_IMAGE
+
+RUN : \
+ && apt-get update \
+ && apt-get install -y \
+ dpkg \
+ file \
+ gcc \
+ g++ \
+ gfortran \
+ qt5-default \
+ make \
+ ninja-build \
+ && apt-get clean \
+ && :
+
+COPY test-make.bash test-ninja.bash /
diff --git a/Utilities/Release/linux/aarch64/test/test-make.bash b/Utilities/Release/linux/aarch64/test/test-make.bash
new file mode 100644
index 000000000..10d30c38a
--- /dev/null
+++ b/Utilities/Release/linux/aarch64/test/test-make.bash
@@ -0,0 +1,17 @@
+# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
+
+set -e
+set -x
+mkdir -p /opt/cmake/src/cmake-make
+cd /opt/cmake/src/cmake-make
+echo >CMakeCache.txt '
+CMake_TEST_IPO_WORKS_C:BOOL=ON
+CMake_TEST_IPO_WORKS_CXX:BOOL=ON
+CMake_TEST_IPO_WORKS_Fortran:BOOL=ON
+CMake_TEST_NO_NETWORK:BOOL=ON
+CMake_TEST_Qt5:BOOL=ON
+'
+cmake ../cmake -DCMake_TEST_HOST_CMAKE=1 -G "Unix Makefiles"
+make -j $(nproc)
+ctest --output-on-failure -j $(nproc)
diff --git a/Utilities/Release/linux/aarch64/test/test-ninja.bash b/Utilities/Release/linux/aarch64/test/test-ninja.bash
new file mode 100644
index 000000000..fe39e2e63
--- /dev/null
+++ b/Utilities/Release/linux/aarch64/test/test-ninja.bash
@@ -0,0 +1,17 @@
+# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
+
+set -e
+set -x
+mkdir -p /opt/cmake/src/cmake-ninja
+cd /opt/cmake/src/cmake-ninja
+echo >CMakeCache.txt '
+CMAKE_Fortran_COMPILER:STRING=
+CMake_TEST_IPO_WORKS_C:BOOL=ON
+CMake_TEST_IPO_WORKS_CXX:BOOL=ON
+CMake_TEST_NO_NETWORK:BOOL=ON
+CMake_TEST_Qt5:BOOL=ON
+'
+cmake ../cmake -DCMake_TEST_HOST_CMAKE=1 -G "Ninja"
+ninja
+ctest --output-on-failure -j $(nproc)
diff --git a/Utilities/Release/macos/qt-5.15.2-macosx10.13-x86_64-arm64.bash b/Utilities/Release/macos/qt-5.15.2-macosx10.13-x86_64-arm64.bash
new file mode 100755
index 000000000..bf92e627c
--- /dev/null
+++ b/Utilities/Release/macos/qt-5.15.2-macosx10.13-x86_64-arm64.bash
@@ -0,0 +1,125 @@
+#!/usr/bin/env bash
+
+# Run this script on a macOS x86_64 host to generate Qt universal binaries.
+#
+# This script requires the 'makeuniversal' tool from:
+#
+# https://github.com/fizzyade/makeuniversal
+#
+# Build it with an existing local Qt installation first.
+#
+# Set the PATH environment variable to contain the location of 'makeuniversal'.
+
+set -e
+set -x
+
+umask 022
+
+# Verify that 'makeuniversal' is available in the PATH.
+type -p makeuniversal >/dev/null
+
+# Download, verify, and extract sources.
+curl -OL https://download.qt.io/archive/qt/5.15/5.15.2/single/qt-everywhere-src-5.15.2.tar.xz
+shasum -a 256 qt-everywhere-src-5.15.2.tar.xz | grep -q 3a530d1b243b5dec00bc54937455471aaa3e56849d2593edb8ded07228202240
+tar xjf qt-everywhere-src-5.15.2.tar.xz
+
+# Build the x86_64 variant.
+mkdir qt-5.15.2-x86_64
+cd qt-5.15.2-x86_64
+../qt-everywhere-src-5.15.2/configure \
+ --prefix=/ \
+ -platform macx-clang \
+ -device-option QMAKE_APPLE_DEVICE_ARCHS=x86_64 \
+ -device-option QMAKE_MACOSX_DEPLOYMENT_TARGET=10.13 \
+ -release \
+ -opensource -confirm-license \
+ -gui \
+ -widgets \
+ -no-gif \
+ -no-icu \
+ -no-pch \
+ -no-angle \
+ -no-opengl \
+ -no-dbus \
+ -no-harfbuzz \
+ -skip declarative \
+ -skip multimedia \
+ -skip qtcanvas3d \
+ -skip qtcharts \
+ -skip qtconnectivity \
+ -skip qtdeclarative \
+ -skip qtgamepad \
+ -skip qtlocation \
+ -skip qtmultimedia \
+ -skip qtnetworkauth \
+ -skip qtpurchasing \
+ -skip qtremoteobjects \
+ -skip qtscript \
+ -skip qtsensors \
+ -skip qtserialbus \
+ -skip qtserialport \
+ -skip qtsvg \
+ -skip qtwebchannel \
+ -skip qtwebengine \
+ -skip qtwebsockets \
+ -skip qtxmlpatterns \
+ -nomake examples \
+ -nomake tests \
+ -nomake tools
+make -j 8
+cd ..
+
+# Build the arm64 variant.
+mkdir qt-5.15.2-arm64
+cd qt-5.15.2-arm64
+../qt-everywhere-src-5.15.2/configure \
+ --prefix=/ \
+ -platform macx-clang \
+ -device-option QMAKE_APPLE_DEVICE_ARCHS=arm64 \
+ -device-option QMAKE_MACOSX_DEPLOYMENT_TARGET=10.13 \
+ -release \
+ -opensource -confirm-license \
+ -gui \
+ -widgets \
+ -no-gif \
+ -no-icu \
+ -no-pch \
+ -no-angle \
+ -no-opengl \
+ -no-dbus \
+ -no-harfbuzz \
+ -skip declarative \
+ -skip multimedia \
+ -skip qtcanvas3d \
+ -skip qtcharts \
+ -skip qtconnectivity \
+ -skip qtdeclarative \
+ -skip qtgamepad \
+ -skip qtlocation \
+ -skip qtmultimedia \
+ -skip qtnetworkauth \
+ -skip qtpurchasing \
+ -skip qtremoteobjects \
+ -skip qtscript \
+ -skip qtsensors \
+ -skip qtserialbus \
+ -skip qtserialport \
+ -skip qtsvg \
+ -skip qtwebchannel \
+ -skip qtwebengine \
+ -skip qtwebsockets \
+ -skip qtxmlpatterns \
+ -nomake examples \
+ -nomake tests \
+ -nomake tools
+make -j 8 -k
+cd ..
+
+# Combine the two builds into universal binaries.
+makeuniversal qt-5.15.2-univ qt-5.15.2-x86_64 qt-5.15.2-arm64
+cd qt-5.15.2-univ
+make install -j 8 INSTALL_ROOT=/tmp/qt-5.15.2-macosx10.13-x86_64-arm64
+cd ..
+
+# Create the final tarball containing universal binaries.
+tar cjf qt-5.15.2-macosx10.13-x86_64-arm64.tar.xz -C /tmp qt-5.15.2-macosx10.13-x86_64-arm64
diff --git a/Utilities/Release/macos/qt-5.9.9-macosx10.10-x86_64-arm64.bash b/Utilities/Release/macos/qt-5.9.9-macosx10.10-x86_64-arm64.bash
index a61e114c2..79931ecc2 100755
--- a/Utilities/Release/macos/qt-5.9.9-macosx10.10-x86_64-arm64.bash
+++ b/Utilities/Release/macos/qt-5.9.9-macosx10.10-x86_64-arm64.bash
@@ -13,6 +13,8 @@
set -e
set -x
+umask 022
+
# Verify that 'makeuniversal' is available in the PATH.
type -p makeuniversal >/dev/null