summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitlab/ci/configure_debian10_aarch64_ninja.cmake1
-rw-r--r--.gitlab/ci/configure_debian10_ninja.cmake1
-rw-r--r--.gitlab/ci/configure_fedora33_common.cmake1
-rwxr-xr-x.gitlab/ci/docker/debian10-aarch64/install_deps.sh5
-rwxr-xr-x.gitlab/ci/docker/debian10/install_deps.sh5
-rwxr-xr-x.gitlab/ci/docker/fedora33/install_deps.sh2
-rw-r--r--.gitlab/os-linux.yml6
-rw-r--r--Help/variable/CMAKE_AUTOMOC_MACRO_NAMES.rst2
-rw-r--r--Modules/CMakeDetermineCompilerABI.cmake6
-rw-r--r--Modules/CMakeParseImplicitLinkInfo.cmake49
-rw-r--r--Modules/CMakeParseLibraryArchitecture.cmake14
-rw-r--r--Modules/FindHDF5.cmake2
-rw-r--r--Modules/Platform/Linux.cmake1
-rw-r--r--Modules/UseSWIG.cmake25
-rw-r--r--Tests/RunCMake/CMakeLists.txt1
-rw-r--r--Tests/RunCMake/CMakeRelease/FileTable-stdout.txt44
-rw-r--r--Tests/RunCMake/CMakeRelease/FileTable.cmake21
-rw-r--r--Tests/RunCMake/CMakeRelease/RunCMakeTest.cmake10
-rw-r--r--Tests/RunCMake/ParseImplicitData/linux-C-NVHPC-21.1.0.input42
-rw-r--r--Tests/RunCMake/ParseImplicitData/linux-CXX-NVHPC-21.1.0.input42
-rw-r--r--Tests/RunCMake/ParseImplicitIncludeInfo/ParseImplicitIncludeInfo.cmake1
-rw-r--r--Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-C-NVHPC-21.1.0-empty.output0
-rw-r--r--Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-CXX-NVHPC-21.1.0-empty.output0
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake11
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-Intel-18.0.0.20170811.output2
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-NVHPC-21.1.0.output3
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-XL-12.1.0.output2
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-XL-16.1.0.0.output2
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CUDA-NVIDIA-10.1.168-XLClang-v.output2
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-Intel-18.0.0.20170811.output2
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-NVHPC-21.1.0.output3
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-XL-12.1.0.output2
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-XL-16.1.0.0.output2
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/linux-Fortran-XL-14.1.0.output2
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-C-PGI-18.10.1.output2
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-C-XL-12.1.0.output2
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-CXX-PGI-18.10.1.output2
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-CXX-XL-12.1.0.output2
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-Fortran-PGI-18.10.1.output2
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc_i-C-XL-12.1.0.output2
-rw-r--r--Tests/RunCMake/ParseImplicitLinkInfo/results/linux_pgf77-Fortran-PGI-18.10.1.output2
-rw-r--r--Tests/RunCMake/RunCMake.cmake5
-rw-r--r--Utilities/Release/README.rst11
-rwxr-xr-xUtilities/Release/files-sign.bash5
-rw-r--r--Utilities/Release/files-v1.json.in106
-rw-r--r--Utilities/Release/files-v1.rst186
-rwxr-xr-xUtilities/Release/files.bash84
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_random.c8
48 files changed, 671 insertions, 62 deletions
diff --git a/.gitlab/ci/configure_debian10_aarch64_ninja.cmake b/.gitlab/ci/configure_debian10_aarch64_ninja.cmake
index 12d0e02..023cc9e 100644
--- a/.gitlab/ci/configure_debian10_aarch64_ninja.cmake
+++ b/.gitlab/ci/configure_debian10_aarch64_ninja.cmake
@@ -59,6 +59,7 @@ set(CMake_TEST_Fortran_SUBMODULES "ON" CACHE BOOL "")
set(CMake_TEST_IPO_WORKS_C "ON" CACHE BOOL "")
set(CMake_TEST_IPO_WORKS_CXX "ON" CACHE BOOL "")
set(CMake_TEST_IPO_WORKS_Fortran "ON" CACHE BOOL "")
+set(CMake_TEST_JQ "/usr/bin/jq" CACHE PATH "")
set(CMake_TEST_Qt5 "ON" CACHE BOOL "")
set(CMake_TEST_UseSWIG "ON" CACHE BOOL "")
diff --git a/.gitlab/ci/configure_debian10_ninja.cmake b/.gitlab/ci/configure_debian10_ninja.cmake
index 90556bf..74d9f12 100644
--- a/.gitlab/ci/configure_debian10_ninja.cmake
+++ b/.gitlab/ci/configure_debian10_ninja.cmake
@@ -61,6 +61,7 @@ set(CMake_TEST_Fortran_SUBMODULES "ON" CACHE BOOL "")
set(CMake_TEST_IPO_WORKS_C "ON" CACHE BOOL "")
set(CMake_TEST_IPO_WORKS_CXX "ON" CACHE BOOL "")
set(CMake_TEST_IPO_WORKS_Fortran "ON" CACHE BOOL "")
+set(CMake_TEST_JQ "/usr/bin/jq" CACHE PATH "")
set(CMake_TEST_Qt5 "ON" CACHE BOOL "")
set(CMake_TEST_UseSWIG "ON" CACHE BOOL "")
diff --git a/.gitlab/ci/configure_fedora33_common.cmake b/.gitlab/ci/configure_fedora33_common.cmake
index c343833..dee78ab 100644
--- a/.gitlab/ci/configure_fedora33_common.cmake
+++ b/.gitlab/ci/configure_fedora33_common.cmake
@@ -1,5 +1,6 @@
set(BUILD_CursesDialog ON CACHE BOOL "")
set(BUILD_QtDialog ON CACHE BOOL "")
+set(CMake_TEST_JQ "/usr/bin/jq" CACHE PATH "")
set(CMake_TEST_JSON_SCHEMA ON CACHE BOOL "")
include("${CMAKE_CURRENT_LIST_DIR}/configure_common.cmake")
diff --git a/.gitlab/ci/docker/debian10-aarch64/install_deps.sh b/.gitlab/ci/docker/debian10-aarch64/install_deps.sh
index 3fc67e8..d84b3c8 100755
--- a/.gitlab/ci/docker/debian10-aarch64/install_deps.sh
+++ b/.gitlab/ci/docker/debian10-aarch64/install_deps.sh
@@ -19,6 +19,10 @@ apt-get install -y \
clang-6.0 \
libncurses6
+# Tools needed for the test suite.
+apt-get install -y \
+ jq
+
# Packages needed to test find modules.
apt-get install -y \
alsa-utils \
@@ -34,6 +38,7 @@ apt-get install -y \
libbz2-dev \
libcups2-dev \
libcurl4-gnutls-dev \
+ libdevil-dev \
libfontconfig1-dev \
libfreetype6-dev \
libgdal-dev \
diff --git a/.gitlab/ci/docker/debian10/install_deps.sh b/.gitlab/ci/docker/debian10/install_deps.sh
index e885ae6..e6c9ba0 100755
--- a/.gitlab/ci/docker/debian10/install_deps.sh
+++ b/.gitlab/ci/docker/debian10/install_deps.sh
@@ -19,6 +19,10 @@ apt-get install -y \
clang-6.0 \
libncurses6
+# Tools needed for the test suite.
+apt-get install -y \
+ jq
+
# Packages needed to test find modules.
apt-get install -y \
alsa-utils \
@@ -34,6 +38,7 @@ apt-get install -y \
libbz2-dev \
libcups2-dev \
libcurl4-gnutls-dev \
+ libdevil-dev \
libfontconfig1-dev \
libfreetype6-dev \
libgdal-dev \
diff --git a/.gitlab/ci/docker/fedora33/install_deps.sh b/.gitlab/ci/docker/fedora33/install_deps.sh
index c1391e3..cdfe35e 100755
--- a/.gitlab/ci/docker/fedora33/install_deps.sh
+++ b/.gitlab/ci/docker/fedora33/install_deps.sh
@@ -25,6 +25,7 @@ dnf install --setopt=install_weak_deps=False -y \
dnf install --setopt=install_weak_deps=False -y \
findutils \
file \
+ jq \
which
# Packages needed to test find modules.
@@ -34,6 +35,7 @@ dnf install --setopt=install_weak_deps=False -y \
boost-devel boost-python3-devel \
bzip2-devel \
cups-devel \
+ DevIL-devel \
doxygen \
expat-devel \
fontconfig-devel \
diff --git a/.gitlab/os-linux.yml b/.gitlab/os-linux.yml
index e40760e..2670ba5 100644
--- a/.gitlab/os-linux.yml
+++ b/.gitlab/os-linux.yml
@@ -33,7 +33,7 @@
### Debian
.debian10:
- image: "kitware/cmake:ci-debian10-x86_64-2020-10-03"
+ image: "kitware/cmake:ci-debian10-x86_64-2021-04-06"
variables:
GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci"
@@ -48,7 +48,7 @@
CMake_SKIP_INSTALL: 1
.debian10_aarch64:
- image: "kitware/cmake:ci-debian10-aarch64-2021-01-26"
+ image: "kitware/cmake:ci-debian10-aarch64-2021-04-06"
variables:
GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci"
@@ -57,7 +57,7 @@
### Fedora
.fedora33:
- image: "kitware/cmake:ci-fedora33-x86_64-2020-11-13"
+ image: "kitware/cmake:ci-fedora33-x86_64-2021-04-06"
variables:
GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci/long file name for testing purposes"
diff --git a/Help/variable/CMAKE_AUTOMOC_MACRO_NAMES.rst b/Help/variable/CMAKE_AUTOMOC_MACRO_NAMES.rst
index 8e34df2..1153cb2 100644
--- a/Help/variable/CMAKE_AUTOMOC_MACRO_NAMES.rst
+++ b/Help/variable/CMAKE_AUTOMOC_MACRO_NAMES.rst
@@ -11,7 +11,7 @@ This variable is used to initialize the :prop_tgt:`AUTOMOC_MACRO_NAMES`
property on all the targets. See that target property for additional
information.
-The default value is ``Q_OBJECT;Q_GADGET;Q_NAMESPACE``.
+The default value is ``Q_OBJECT;Q_GADGET;Q_NAMESPACE;Q_NAMESPACE_EXPORT``.
Example
^^^^^^^
diff --git a/Modules/CMakeDetermineCompilerABI.cmake b/Modules/CMakeDetermineCompilerABI.cmake
index cf028f1..8191d81 100644
--- a/Modules/CMakeDetermineCompilerABI.cmake
+++ b/Modules/CMakeDetermineCompilerABI.cmake
@@ -135,11 +135,13 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src)
# Parse implicit linker information for this language, if available.
set(implicit_dirs "")
+ set(implicit_objs "")
set(implicit_libs "")
set(implicit_fwks "")
if(CMAKE_${lang}_VERBOSE_FLAG)
CMAKE_PARSE_IMPLICIT_LINK_INFO("${OUTPUT}" implicit_libs implicit_dirs implicit_fwks log
- "${CMAKE_${lang}_IMPLICIT_OBJECT_REGEX}")
+ "${CMAKE_${lang}_IMPLICIT_OBJECT_REGEX}"
+ COMPUTE_IMPLICIT_OBJECTS implicit_objs)
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Parsed ${lang} implicit link information from above output:\n${log}\n\n")
endif()
@@ -176,7 +178,7 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src)
set(CMAKE_${lang}_IMPLICIT_LINK_DIRECTORIES "${implicit_dirs}" PARENT_SCOPE)
set(CMAKE_${lang}_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "${implicit_fwks}" PARENT_SCOPE)
- cmake_parse_library_architecture("${implicit_dirs}" architecture_flag)
+ cmake_parse_library_architecture(${lang} "${implicit_dirs}" "${implicit_objs}" architecture_flag)
if(architecture_flag)
set(CMAKE_${lang}_LIBRARY_ARCHITECTURE "${architecture_flag}" PARENT_SCOPE)
endif()
diff --git a/Modules/CMakeParseImplicitLinkInfo.cmake b/Modules/CMakeParseImplicitLinkInfo.cmake
index 0465515..e848b55 100644
--- a/Modules/CMakeParseImplicitLinkInfo.cmake
+++ b/Modules/CMakeParseImplicitLinkInfo.cmake
@@ -5,16 +5,27 @@ cmake_policy(PUSH)
cmake_policy(SET CMP0053 NEW)
cmake_policy(SET CMP0054 NEW)
-# Function parse implicit linker options.
+# Function to parse implicit linker options.
+#
# This is used internally by CMake and should not be included by user
# code.
-
+#
+# Note: this function is leaked/exposed by FindOpenMP and therefore needs
+# to have a stable API so projects that copied `FindOpenMP` for backwards
+# compatibility don't break.
+#
function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var fwk_var log_var obj_regex)
set(implicit_libs_tmp "")
+ set(implicit_objs_tmp "")
set(implicit_dirs_tmp)
set(implicit_fwks_tmp)
set(log "")
+ set(keywordArgs)
+ set(oneValueArgs COMPUTE_IMPLICIT_OBJECTS)
+ set(multiValueArgs )
+ cmake_parse_arguments(EXTRA_PARSE "${keywordArgs}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
+
# Parse implicit linker arguments.
set(linker "CMAKE_LINKER-NOTFOUND")
if(CMAKE_LINKER)
@@ -103,11 +114,15 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var fwk_var log_var obj
set(lib "${CMAKE_MATCH_2}")
list(APPEND implicit_libs_tmp ${lib})
string(APPEND log " arg [${arg}] ==> lib [${lib}]\n")
- elseif("${arg}" MATCHES "^(.:)?[/\\].*\\.o$"
- AND obj_regex AND "${arg}" MATCHES "${obj_regex}")
- # Object file full path.
- list(APPEND implicit_libs_tmp ${arg})
- string(APPEND log " arg [${arg}] ==> obj [${arg}]\n")
+ elseif("${arg}" MATCHES "^(.:)?[/\\].*\\.o$")
+ if(EXTRA_PARSE_COMPUTE_IMPLICIT_OBJECTS)
+ list(APPEND implicit_objs_tmp ${arg})
+ string(APPEND log " arg [${arg}] ==> obj [${arg}]\n")
+ endif()
+ if(obj_regex AND "${arg}" MATCHES "${obj_regex}")
+ # Object file full path.
+ list(APPEND implicit_libs_tmp ${arg})
+ endif()
elseif("${arg}" MATCHES "^-Y(P,)?[^0-9]")
# Sun search path ([^0-9] avoids conflict with Mac -Y<num>).
string(REGEX REPLACE "^-Y(P,)?" "" dirs "${arg}")
@@ -170,6 +185,21 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var fwk_var log_var obj
endif()
endforeach()
+ if(EXTRA_PARSE_COMPUTE_IMPLICIT_OBJECTS)
+ set(implicit_objs "")
+ foreach(obj IN LISTS implicit_objs_tmp)
+ if(IS_ABSOLUTE "${obj}")
+ get_filename_component(abs "${obj}" ABSOLUTE)
+ if(NOT "x${obj}" STREQUAL "x${abs}")
+ string(APPEND log " collapse obj [${obj}] ==> [${abs}]\n")
+ endif()
+ list(APPEND implicit_objs "${abs}")
+ else()
+ list(APPEND implicit_objs "${obj}")
+ endif()
+ endforeach()
+ endif()
+
# Cleanup list of library and framework directories.
set(desc_dirs "library")
set(desc_fwks "framework")
@@ -191,6 +221,7 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var fwk_var log_var obj
# Log results.
string(APPEND log " implicit libs: [${implicit_libs}]\n")
+ string(APPEND log " implicit objs: [${implicit_objs}]\n")
string(APPEND log " implicit dirs: [${implicit_dirs}]\n")
string(APPEND log " implicit fwks: [${implicit_fwks}]\n")
@@ -199,6 +230,10 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var fwk_var log_var obj
set(${dir_var} "${implicit_dirs}" PARENT_SCOPE)
set(${fwk_var} "${implicit_fwks}" PARENT_SCOPE)
set(${log_var} "${log}" PARENT_SCOPE)
+
+ if(EXTRA_PARSE_COMPUTE_IMPLICIT_OBJECTS)
+ set(${EXTRA_PARSE_COMPUTE_IMPLICIT_OBJECTS} "${implicit_objs}" PARENT_SCOPE)
+ endif()
endfunction()
cmake_policy(POP)
diff --git a/Modules/CMakeParseLibraryArchitecture.cmake b/Modules/CMakeParseLibraryArchitecture.cmake
index aa6fd74..6fb9c6b 100644
--- a/Modules/CMakeParseLibraryArchitecture.cmake
+++ b/Modules/CMakeParseLibraryArchitecture.cmake
@@ -9,24 +9,22 @@ cmake_policy(SET CMP0054 NEW)
# This is used internally by CMake and should not be included by user
# code.
-function(cmake_parse_library_architecture implicit_dirs output_var)
+function(cmake_parse_library_architecture lang implicit_dirs implicit_objs output_var)
unset(library_arch)
# Detect library architecture directory name.
if(CMAKE_LIBRARY_ARCHITECTURE_REGEX)
- foreach(dir ${implicit_dirs})
+ foreach(dir IN LISTS implicit_dirs)
if("${dir}" MATCHES "/lib/${CMAKE_LIBRARY_ARCHITECTURE_REGEX}$")
get_filename_component(arch "${dir}" NAME)
set(library_arch "${arch}")
break()
endif()
endforeach()
- endif()
- if(CMAKE_LIBRARY_ARCHITECTURE_REGEX_VERSIONED AND NOT library_arch)
- foreach(dir ${implicit_dirs})
- if("${dir}" MATCHES "/${CMAKE_LIBRARY_ARCHITECTURE_REGEX_VERSIONED}$")
- get_filename_component(arch "${dir}" DIRECTORY)
- get_filename_component(arch "${arch}" NAME)
+ foreach(obj IN LISTS implicit_objs)
+ get_filename_component(dir "${obj}" DIRECTORY)
+ if("${dir}" MATCHES "(/usr)+/lib/${CMAKE_LIBRARY_ARCHITECTURE_REGEX}$")
+ get_filename_component(arch "${dir}" NAME)
set(library_arch "${arch}")
break()
endif()
diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index 16bf279..ec5ebdd 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -797,7 +797,7 @@ if( NOT HDF5_FOUND )
set(HDF5_CXX_HL_LIBRARY_NAMES hdf5_hl_cpp ${HDF5_C_HL_LIBRARY_NAMES} ${HDF5_CXX_LIBRARY_NAMES})
set(HDF5_Fortran_LIBRARY_NAMES hdf5_fortran ${HDF5_C_LIBRARY_NAMES})
- set(HDF5_Fortran_HL_LIBRARY_NAMES hdf5hl_fortran ${HDF5_C_HL_LIBRARY_NAMES} ${HDF5_Fortran_LIBRARY_NAMES})
+ set(HDF5_Fortran_HL_LIBRARY_NAMES hdf5_hl_fortran hdf5hl_fortran ${HDF5_C_HL_LIBRARY_NAMES} ${HDF5_Fortran_LIBRARY_NAMES})
# suffixes as seen on Linux, MSYS2, ...
set(_lib_suffixes hdf5)
diff --git a/Modules/Platform/Linux.cmake b/Modules/Platform/Linux.cmake
index 23b48bd..b5d5464 100644
--- a/Modules/Platform/Linux.cmake
+++ b/Modules/Platform/Linux.cmake
@@ -48,7 +48,6 @@ endif()
# Match multiarch library directory names.
set(CMAKE_LIBRARY_ARCHITECTURE_REGEX "[a-z0-9_]+(-[a-z0-9_]+)?-linux-gnu[a-z0-9_]*")
-set(CMAKE_LIBRARY_ARCHITECTURE_REGEX_VERSIONED "gcc/[a-z0-9_]+(-[a-z0-9_]+)?-linux(-gnu)?/[0-9]+(\\.[0-9]+\\.[0-9]+)*")
include(Platform/UnixPaths)
diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake
index 7d7f737..6073125 100644
--- a/Modules/UseSWIG.cmake
+++ b/Modules/UseSWIG.cmake
@@ -338,20 +338,13 @@ as well as ``SWIG``:
initialized with the value of this variable.
#]=======================================================================]
-cmake_policy(GET CMP0078 target_name_policy)
-cmake_policy(GET CMP0086 module_name_policy)
-
-cmake_policy (VERSION 3.12)
-if (target_name_policy)
- # respect user choice regarding CMP0078 policy
- cmake_policy(SET CMP0078 ${target_name_policy})
-endif()
-if (module_name_policy)
- # respect user choice regarding CMP0086 policy
- cmake_policy(SET CMP0086 ${module_name_policy})
-endif()
-unset(target_name_policy)
-unset(module_name_policy)
+cmake_policy(PUSH)
+# numbers and boolean constants
+cmake_policy (SET CMP0012 NEW)
+# IN_LIST operator
+cmake_policy (SET CMP0057 NEW)
+# Ninja generator normalizes custom command depfile paths
+cmake_policy (SET CMP0116 NEW)
set(SWIG_CXX_EXTENSION "cxx")
set(SWIG_EXTRA_LIBRARIES "")
@@ -911,7 +904,7 @@ function(SWIG_ADD_LIBRARY name)
if (APPLE)
set_target_properties (${target_name} PROPERTIES SUFFIX ".jnilib")
endif()
- if ((WIN32 AND MINGW) OR CYGWIN OR CMAKE_SYSTEM_NAME STREQUAL MSYS)
+ if ((WIN32 AND MINGW) OR CYGWIN OR CMAKE_SYSTEM_NAME STREQUAL "MSYS")
set_target_properties(${target_name} PROPERTIES PREFIX "")
endif()
elseif (swig_lowercase_language STREQUAL "lua")
@@ -1007,3 +1000,5 @@ function(SWIG_LINK_LIBRARIES name)
endif()
endif()
endfunction()
+
+cmake_policy(POP)
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 5ee0612..f33e4af 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -224,6 +224,7 @@ if(UNIX AND "${CMAKE_GENERATOR}" MATCHES "Unix Makefiles|Ninja")
add_RunCMake_test(Byproducts)
endif()
add_RunCMake_test(CMakeRoleGlobalProperty)
+add_RunCMake_test(CMakeRelease -DCMake_TEST_JQ=${CMake_TEST_JQ})
if(UNIX AND "${CMAKE_GENERATOR}" MATCHES "Unix Makefiles|Ninja")
add_RunCMake_test(CompilerChange)
endif()
diff --git a/Tests/RunCMake/CMakeRelease/FileTable-stdout.txt b/Tests/RunCMake/CMakeRelease/FileTable-stdout.txt
new file mode 100644
index 0000000..37eb91e
--- /dev/null
+++ b/Tests/RunCMake/CMakeRelease/FileTable-stdout.txt
@@ -0,0 +1,44 @@
+^-- query: \.version \| \.major , \.minor , \.patch , \.suffix, \.string
+1
+2
+3
+"rc4"
+"@version@"
+-- query: \.files\[\]\.name
+"cmake-@version@-linux-aarch64\.sh"
+"cmake-@version@-linux-aarch64\.tar\.gz"
+"cmake-@version@-linux-x86_64\.sh"
+"cmake-@version@-linux-x86_64\.tar\.gz"
+"cmake-@version@-macos-universal\.dmg"
+"cmake-@version@-macos-universal\.tar\.gz"
+"cmake-@version@-macos10\.10-universal\.dmg"
+"cmake-@version@-macos10\.10-universal\.tar\.gz"
+"cmake-@version@-windows-i386\.msi"
+"cmake-@version@-windows-i386\.zip"
+"cmake-@version@-windows-x86_64\.msi"
+"cmake-@version@-windows-x86_64\.zip"
+"cmake-@version@\.tar\.gz"
+"cmake-@version@\.zip"
+-- query: \.files\[\] \| select\(\.os\[\] \| \. == "source"\) \| \.name
+"cmake-@version@\.tar\.gz"
+"cmake-@version@\.zip"
+-- query: \.files\[\] \| select\(\(\.os\[\] \| \. == "macOS"\) and \(\.class == "volume"\)\) \| \.name
+"cmake-@version@-macos-universal\.dmg"
+-- query: \.files\[\] \| select\(\(\.os\[\] \| \. == "macos10\.10"\) and \(\.class == "archive"\)\) \| \.name
+"cmake-@version@-macos10\.10-universal\.tar\.gz"
+-- query: \.files\[\] \| select\(\(\.os\[\] \| \. == "windows"\) and \(\.architecture\[\] \| \. == "i386"\) and \(\.class == "installer"\)\) \| \.name
+"cmake-@version@-windows-i386\.msi"
+-- query: \.files\[\] \| select\(\.architecture\[\] \| \. == "x86_64"\) \| \.name
+"cmake-@version@-linux-x86_64\.sh"
+"cmake-@version@-linux-x86_64\.tar\.gz"
+"cmake-@version@-macos-universal\.dmg"
+"cmake-@version@-macos-universal\.tar\.gz"
+"cmake-@version@-macos10\.10-universal\.dmg"
+"cmake-@version@-macos10\.10-universal\.tar\.gz"
+"cmake-@version@-windows-x86_64\.msi"
+"cmake-@version@-windows-x86_64\.zip"
+-- query: \.files\[\] \| select\(\[\.macOSmin\] \| inside\(\["10\.10", "10\.11", "10\.12"\]\)\) \| \.name
+"cmake-@version@-macos10\.10-universal\.dmg"
+"cmake-@version@-macos10\.10-universal\.tar\.gz"
+-- query: \.hashFiles\[\] \| select\(\.algorithm\[\] \| \. == "SHA-256"\) \| \.name
+"cmake-@version@-SHA-256\.txt"$
diff --git a/Tests/RunCMake/CMakeRelease/FileTable.cmake b/Tests/RunCMake/CMakeRelease/FileTable.cmake
new file mode 100644
index 0000000..f46535c
--- /dev/null
+++ b/Tests/RunCMake/CMakeRelease/FileTable.cmake
@@ -0,0 +1,21 @@
+set(version "@version@")
+set(version_major "1")
+set(version_minor "2")
+set(version_patch "3")
+set(maybe_version_suffix "\"suffix\": \"rc4\",")
+configure_file("${CMAKE_CURRENT_LIST_DIR}/../../../Utilities/Release/files-v1.json.in" "files-v1.json" @ONLY)
+
+foreach(query
+ ".version | .major , .minor , .patch , .suffix, .string"
+ ".files[].name"
+ ".files[] | select(.os[] | . == \"source\") | .name"
+ ".files[] | select((.os[] | . == \"macOS\") and (.class == \"volume\")) | .name"
+ ".files[] | select((.os[] | . == \"macos10.10\") and (.class == \"archive\")) | .name"
+ ".files[] | select((.os[] | . == \"windows\") and (.architecture[] | . == \"i386\") and (.class == \"installer\")) | .name"
+ ".files[] | select(.architecture[] | . == \"x86_64\") | .name"
+ ".files[] | select([.macOSmin] | inside([\"10.10\", \"10.11\", \"10.12\"])) | .name"
+ ".hashFiles[] | select(.algorithm[] | . == \"SHA-256\") | .name"
+ )
+ message(STATUS "query: ${query}")
+ execute_process(COMMAND ${JQ} "${query}" files-v1.json)
+endforeach()
diff --git a/Tests/RunCMake/CMakeRelease/RunCMakeTest.cmake b/Tests/RunCMake/CMakeRelease/RunCMakeTest.cmake
new file mode 100644
index 0000000..9a08ff3
--- /dev/null
+++ b/Tests/RunCMake/CMakeRelease/RunCMakeTest.cmake
@@ -0,0 +1,10 @@
+include(RunCMake)
+
+if(CMake_TEST_JQ)
+ set(JQ "${CMake_TEST_JQ}")
+else()
+ find_program(JQ NAMES jq)
+endif()
+if(JQ)
+ run_cmake_script(FileTable -DJQ=${JQ})
+endif()
diff --git a/Tests/RunCMake/ParseImplicitData/linux-C-NVHPC-21.1.0.input b/Tests/RunCMake/ParseImplicitData/linux-C-NVHPC-21.1.0.input
new file mode 100644
index 0000000..93e36ca
--- /dev/null
+++ b/Tests/RunCMake/ParseImplicitData/linux-C-NVHPC-21.1.0.input
@@ -0,0 +1,42 @@
+CMAKE_LANG=C
+CMAKE_LINKER=/usr/bin/ld
+CMAKE_C_COMPILER_ABI=
+CMAKE_C_COMPILER_AR=
+CMAKE_C_COMPILER_ARCHITECTURE_ID=
+CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN=
+CMAKE_C_COMPILER_ID=NVHPC
+CMAKE_C_COMPILER_LAUNCHER=
+CMAKE_C_COMPILER_LOADED=1
+CMAKE_C_COMPILER_RANLIB=
+CMAKE_C_COMPILER_TARGET=
+CMAKE_C_COMPILER_VERSION=21.1.0
+CMAKE_C_COMPILER_VERSION_INTERAL=
+Change Dir: /root/parse_implicit_data/CMakeFiles/CMakeTmp
+
+Run Build Command(s):/usr/bin/make -f Makefile cmTC_b8daa/fast && /usr/bin/make -f CMakeFiles/cmTC_b8daa.dir/build.make CMakeFiles/cmTC_b8daa.dir/build
+make[1]: Entering directory '/root/parse_implicit_data/CMakeFiles/CMakeTmp'
+Building C object CMakeFiles/cmTC_b8daa.dir/CMakeCCompilerABI.c.o
+/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/bin/nvc -v -o CMakeFiles/cmTC_b8daa.dir/CMakeCCompilerABI.c.o -c /host_pwd/Work/cmake/src/Modules/CMakeCCompilerABI.c
+Export PGI_CURR_CUDA_HOME=/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/cuda/
+Export NVCOMPILER=/opt/nvidia/hpc_sdk/Linux_x86_64/21.1
+Export PGI=/opt/nvidia/hpc_sdk
+
+/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/bin/tools/cpp1 --llalign -Dunix -D__unix -D__unix__ -Dlinux -D__linux -D__linux__ -D__NO_MATH_INLINES -D__LP64__ -D__x86_64 -D__x86_64__ -D__LONG_MAX__=9223372036854775807L '-D__SIZE_TYPE__=unsigned long int' '-D__PTRDIFF_TYPE__=long int' -D__amd64 -D__amd64__ -D__k8 -D__k8__ -D__MMX__ -D__SSE__ -D__SSE2__ -D__SSE3__ -D__SSSE3__ -D__SSE4_1__ -D__SSE4_2__ -D__AVX__ -D__AVX2__ -D__AVX512F__ -D__AVX512VL__ -D__FMA__ -D__XSAVE__ -D__POPCNT__ -D__FXSR__ -D__PGI -D__NVCOMPILER -D_PGCG_SOURCE --c -I- -I/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/include-gcc70 -I/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/include -I/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/include-gcc70 -I/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/include -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include -D__PGLLVM__ -D__NVCOMPILER_LLVM__ -D__extension__= --preinclude _cplus_preinclude.h --preinclude_macros _cplus_macros.h --gnu_version=90300 -D__pgnu_vsn=90300 -q -o /tmp/nvcjpcFBbmqiQuf.il /host_pwd/Work/cmake/src/Modules/CMakeCCompilerABI.c
+
+/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/bin/tools/cpp2 /host_pwd/Work/cmake/src/Modules/CMakeCCompilerABI.c -opt 1 -x 119 0xa10000 -x 122 0x40 -x 123 0x1000 -x 127 4 -x 127 17 -x 19 0x400000 -x 28 0x40000 -x 120 0x10000000 -x 70 0x8000 -x 122 1 -x 125 0x20000 -quad -x 59 4 -tp skylake -x 120 0x1000 -astype 0 -fn /host_pwd/Work/cmake/src/Modules/CMakeCCompilerABI.c -il /tmp/nvcjpcFBbmqiQuf.il -x 123 0x80000000 -x 123 4 -x 2 0x400 -x 119 0x20 -def __pgnu_vsn=90300 -x 70 0x40000000 -x 183 4 -x 121 0x800 -x 6 0x20000 -x 122 0x400000 -y 125 0x100000 -x 249 100 -x 120 0x200000 -x 70 0x40000000 -x 8 0x40000000 -x 164 0x800000 -x 85 0x2000 -x 85 0x4000 -x 68 0x1 -x 39 4 -x 56 0x10 -x 26 0x10 -x 26 1 -x 56 0x4000 -y 163 0xc0000000 -x 189 0x10 -y 189 0x4000000 -gnuvsn 90300 -x 69 0x200 -x 123 0x400 -cmdline '+nvc /tmp/nvcjpcFBbmqiQuf.il -v -o CMakeFiles/cmTC_b8daa.dir/CMakeCCompilerABI.c.o -c' -asm /tmp/nvczpcFlZn4rWzz.ll
+NVC++/x86-64 Linux 21.1-0: compilation successful
+
+/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/share/llvm/bin/llc /tmp/nvczpcFlZn4rWzz.ll -march=x86-64 -mcpu=native -O1 -fast-isel=0 -non-global-value-max-name-size=4294967295 -x86-cmov-converter=0 -filetype=obj -o CMakeFiles/cmTC_b8daa.dir/CMakeCCompilerABI.c.o
+Unlinking /tmp/nvcjpcFBbmqiQuf.il
+Unlinking /tmp/nvcrpcFZmmAHpuz.s
+Unlinking /tmp/nvczpcFlZn4rWzz.ll
+Unlinking /tmp/nvcHpcFJmCQUbek.llvm
+Linking C executable cmTC_b8daa
+/host_pwd/Work/cmake/nvhpc_build/bin/cmake -E cmake_link_script CMakeFiles/cmTC_b8daa.dir/link.txt --verbose=1
+/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/bin/nvc -v CMakeFiles/cmTC_b8daa.dir/CMakeCCompilerABI.c.o -o cmTC_b8daa
+Export PGI_CURR_CUDA_HOME=/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/cuda/
+Export NVCOMPILER=/opt/nvidia/hpc_sdk/Linux_x86_64/21.1
+Export PGI=/opt/nvidia/hpc_sdk
+
+/usr/bin/ld /usr/lib/x86_64-linux-gnu/crt1.o /usr/lib/x86_64-linux-gnu/crti.o /opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/lib/trace_init.o /usr/lib/gcc/x86_64-linux-gnu/9/crtbegin.o --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 /opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/lib/nvhpc.ld -L/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/lib -L/usr/lib64 -L/usr/lib/gcc/x86_64-linux-gnu/9 CMakeFiles/cmTC_b8daa.dir/CMakeCCompilerABI.c.o -rpath /opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/lib -rpath /usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib64 -o cmTC_b8daa -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib64 -lnvomp -ldl --as-needed -lnvhpcatm -latomic --no-as-needed -lpthread --start-group -lnvcpumath -lnsnvc -lnvc --end-group -lm -lgcc -lc -lgcc -lgcc_s /usr/lib/gcc/x86_64-linux-gnu/9/crtend.o /usr/lib/x86_64-linux-gnu/crtn.o
+make[1]: Leaving directory '/root/parse_implicit_data/CMakeFiles/CMakeTmp'
diff --git a/Tests/RunCMake/ParseImplicitData/linux-CXX-NVHPC-21.1.0.input b/Tests/RunCMake/ParseImplicitData/linux-CXX-NVHPC-21.1.0.input
new file mode 100644
index 0000000..64781b9
--- /dev/null
+++ b/Tests/RunCMake/ParseImplicitData/linux-CXX-NVHPC-21.1.0.input
@@ -0,0 +1,42 @@
+CMAKE_LANG=CXX
+CMAKE_LINKER=/usr/bin/ld
+CMAKE_CXX_COMPILER_ABI=
+CMAKE_CXX_COMPILER_AR=
+CMAKE_CXX_COMPILER_ARCHITECTURE_ID=
+CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN=
+CMAKE_CXX_COMPILER_ID=NVHPC
+CMAKE_CXX_COMPILER_LAUNCHER=
+CMAKE_CXX_COMPILER_LOADED=1
+CMAKE_CXX_COMPILER_RANLIB=
+CMAKE_CXX_COMPILER_TARGET=
+CMAKE_CXX_COMPILER_VERSION=21.1.0
+CMAKE_CXX_COMPILER_VERSION_INTERAL=
+Change Dir: /root/parse_implicit_data/CMakeFiles/CMakeTmp
+
+Run Build Command(s):/usr/bin/make -f Makefile cmTC_79118/fast && /usr/bin/make -f CMakeFiles/cmTC_79118.dir/build.make CMakeFiles/cmTC_79118.dir/build
+make[1]: Entering directory '/root/parse_implicit_data/CMakeFiles/CMakeTmp'
+Building CXX object CMakeFiles/cmTC_79118.dir/CMakeCXXCompilerABI.cpp.o
+/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/bin/nvc++ -v -o CMakeFiles/cmTC_79118.dir/CMakeCXXCompilerABI.cpp.o -c /host_pwd/Work/cmake/src/Modules/CMakeCXXCompilerABI.cpp
+Export PGI_CURR_CUDA_HOME=/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/cuda/
+Export NVCOMPILER=/opt/nvidia/hpc_sdk/Linux_x86_64/21.1
+Export PGI=/opt/nvidia/hpc_sdk
+
+/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/bin/tools/cpp1 --llalign -Dunix -D__unix -D__unix__ -Dlinux -D__linux -D__linux__ -D__NO_MATH_INLINES -D__LP64__ -D__x86_64 -D__x86_64__ -D__LONG_MAX__=9223372036854775807L '-D__SIZE_TYPE__=unsigned long int' '-D__PTRDIFF_TYPE__=long int' -D__amd64 -D__amd64__ -D__k8 -D__k8__ -D__MMX__ -D__SSE__ -D__SSE2__ -D__SSE3__ -D__SSSE3__ -D__SSE4_1__ -D__SSE4_2__ -D__AVX__ -D__AVX2__ -D__AVX512F__ -D__AVX512VL__ -D__FMA__ -D__XSAVE__ -D__POPCNT__ -D__FXSR__ -D__PGI -D__NVCOMPILER -D_GNU_SOURCE -D_PGCG_SOURCE -I- -I/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/include-gcc70 -I/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/include -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include -I/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/include-gcc70 -I/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/include -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include -D__PGLLVM__ -D__NVCOMPILER_LLVM__ -D__extension__= --preinclude _cplus_preinclude.h --preinclude_macros _cplus_macros.h --gnu_version=90300 -D__pgnu_vsn=90300 -q -o /tmp/nvc++WCcFq4IEc6_D.il /host_pwd/Work/cmake/src/Modules/CMakeCXXCompilerABI.cpp
+
+/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/bin/tools/cpp2 /host_pwd/Work/cmake/src/Modules/CMakeCXXCompilerABI.cpp -opt 1 -x 119 0xa10000 -x 122 0x40 -x 123 0x1000 -x 127 4 -x 127 17 -x 19 0x400000 -x 28 0x40000 -x 120 0x10000000 -x 70 0x8000 -x 122 1 -x 125 0x20000 -quad -x 59 4 -tp skylake -x 120 0x1000 -astype 0 -fn /host_pwd/Work/cmake/src/Modules/CMakeCXXCompilerABI.cpp -il /tmp/nvc++WCcFq4IEc6_D.il -x 117 0x200 -x 123 0x80000000 -x 123 4 -x 119 0x20 -def __pgnu_vsn=90300 -x 70 0x40000000 -x 183 4 -x 121 0x800 -x 6 0x20000 -x 249 100 -x 120 0x200000 -x 70 0x40000000 -x 8 0x40000000 -x 164 0x800000 -x 85 0x2000 -x 85 0x4000 -x 68 0x1 -x 39 4 -x 56 0x10 -x 26 0x10 -x 26 1 -x 56 0x4000 -y 163 0xc0000000 -x 189 0x10 -y 189 0x4000000 -gnuvsn 90300 -x 69 0x200 -x 123 0x400 -cmdline '+nvc++ /tmp/nvc++WCcFq4IEc6_D.il -v -o CMakeFiles/cmTC_79118.dir/CMakeCXXCompilerABI.cpp.o -c' -asm /tmp/nvc++WCcFqmjAQUnq.ll
+NVC++/x86-64 Linux 21.1-0: compilation successful
+
+/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/share/llvm/bin/llc /tmp/nvc++WCcFqmjAQUnq.ll -march=x86-64 -mcpu=native -O1 -fast-isel=0 -non-global-value-max-name-size=4294967295 -x86-cmov-converter=0 -filetype=obj -o CMakeFiles/cmTC_79118.dir/CMakeCXXCompilerABI.cpp.o
+Unlinking /tmp/nvc++WCcFq4IEc6_D.il
+Unlinking /tmp/nvc++WCcFq65QYK7M.s
+Unlinking /tmp/nvc++WCcFqmjAQUnq.ll
+Unlinking /tmp/nvc++WCcFqUsdHmUV.llvm
+Linking CXX executable cmTC_79118
+/host_pwd/Work/cmake/nvhpc_build/bin/cmake -E cmake_link_script CMakeFiles/cmTC_79118.dir/link.txt --verbose=1
+/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/bin/nvc++ -v CMakeFiles/cmTC_79118.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_79118
+Export PGI_CURR_CUDA_HOME=/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/cuda/
+Export NVCOMPILER=/opt/nvidia/hpc_sdk/Linux_x86_64/21.1
+Export PGI=/opt/nvidia/hpc_sdk
+
+/usr/bin/ld /usr/lib/x86_64-linux-gnu/crt1.o /usr/lib/x86_64-linux-gnu/crti.o /opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/lib/trace_init.o /usr/lib/gcc/x86_64-linux-gnu/9/crtbegin.o --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 /opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/lib/nvhpc.ld -L/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/lib -L/usr/lib64 -L/usr/lib/gcc/x86_64-linux-gnu/9 CMakeFiles/cmTC_79118.dir/CMakeCXXCompilerABI.cpp.o -rpath /opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/lib -rpath /usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib64 -o cmTC_79118 -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib64 -latomic -lnvhpcatm -lstdc++ -lnvomp -ldl --as-needed -lnvhpcatm -latomic --no-as-needed -lpthread --start-group -lnvcpumath -lnsnvc -lnvc --end-group -lm -lgcc -lc -lgcc -lgcc_s /usr/lib/gcc/x86_64-linux-gnu/9/crtend.o /usr/lib/x86_64-linux-gnu/crtn.o
+make[1]: Leaving directory '/root/parse_implicit_data/CMakeFiles/CMakeTmp'
diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/ParseImplicitIncludeInfo.cmake b/Tests/RunCMake/ParseImplicitIncludeInfo/ParseImplicitIncludeInfo.cmake
index abd0eaa..2d3abcc 100644
--- a/Tests/RunCMake/ParseImplicitIncludeInfo/ParseImplicitIncludeInfo.cmake
+++ b/Tests/RunCMake/ParseImplicitIncludeInfo/ParseImplicitIncludeInfo.cmake
@@ -28,6 +28,7 @@ set(targets
linux-Fortran-PGI-18.10.1 linux_pgf77-Fortran-PGI-18.10.1
linux_nostdinc-C-PGI-18.10.1 linux_nostdinc-CXX-PGI-18.10.1
linux_nostdinc-Fortran-PGI-18.10.1
+ linux-C-NVHPC-21.1.0-empty linux-CXX-NVHPC-21.1.0-empty
linux-C-XL-12.1.0 linux-CXX-XL-12.1.0 linux-Fortran-XL-14.1.0
linux_nostdinc-C-XL-12.1.0 linux_nostdinc-CXX-XL-12.1.0
linux_nostdinc_i-C-XL-12.1.0 linux_nostdinc-CXX-XL-12.1.0
diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-C-NVHPC-21.1.0-empty.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-C-NVHPC-21.1.0-empty.output
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-C-NVHPC-21.1.0-empty.output
diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-CXX-NVHPC-21.1.0-empty.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-CXX-NVHPC-21.1.0-empty.output
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-CXX-NVHPC-21.1.0-empty.output
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake b/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake
index c46d044..1f3468b 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake
@@ -28,6 +28,7 @@ set(targets
linux-Fortran-PGI-18.10.1 linux_pgf77-Fortran-PGI-18.10.1
linux_nostdinc-C-PGI-18.10.1 linux_nostdinc-CXX-PGI-18.10.1
linux_nostdinc-Fortran-PGI-18.10.1
+ linux-C-NVHPC-21.1.0 linux-CXX-NVHPC-21.1.0
linux-C-XL-12.1.0 linux-CXX-XL-12.1.0 linux-Fortran-XL-14.1.0
linux_nostdinc-C-XL-12.1.0 linux_nostdinc-CXX-XL-12.1.0
linux_nostdinc_i-C-XL-12.1.0 linux_nostdinc-CXX-XL-12.1.0
@@ -104,10 +105,8 @@ endfunction()
function(load_platform_info target)
if(target MATCHES "linux-")
set(CMAKE_LIBRARY_ARCHITECTURE_REGEX "[a-z0-9_]+(-[a-z0-9_]+)?-linux-gnu[a-z0-9_]*" PARENT_SCOPE)
- set(CMAKE_LIBRARY_ARCHITECTURE_REGEX_VERSIONED "gcc/[a-z0-9_]+(-[a-z0-9_]+)?-linux(-gnu)?/[0-9]+(\\.[0-9]+\\.[0-9]+)*" PARENT_SCOPE)
else()
unset(CMAKE_LIBRARY_ARCHITECTURE_REGEX PARENT_SCOPE)
- unset(CMAKE_LIBRARY_ARCHITECTURE_REGEX_VERSIONED PARENT_SCOPE)
endif()
endfunction()
@@ -134,6 +133,7 @@ foreach(t ${targets})
# Need to handle files with empty entries for both libs or dirs
set(implicit_lib_output "")
set(idirs_output "")
+ set(implicit_objs "")
set(library_arch_output "")
file(STRINGS ${outfile} outputs)
foreach(line IN LISTS outputs)
@@ -149,10 +149,11 @@ foreach(t ${targets})
endforeach()
cmake_parse_implicit_link_info("${input}" implicit_libs idirs implicit_fwks log
- "${CMAKE_${lang}_IMPLICIT_OBJECT_REGEX}")
+ "${CMAKE_${lang}_IMPLICIT_OBJECT_REGEX}"
+ COMPUTE_IMPLICIT_OBJECTS implicit_objs)
set(library_arch)
- cmake_parse_library_architecture("${idirs}" library_arch)
+ cmake_parse_library_architecture(${lang} "${idirs}" "${implicit_objs}" library_arch)
# File format
# file(WRITE ${outfile} "libs=${implicit_libs}\ndirs=${idirs}\nlibrary_arch=${library_arch}")
@@ -165,7 +166,7 @@ foreach(t ${targets})
message("${t} parse failed: state=${state}, '${idirs}' does not match '${idirs_output}'")
elseif(NOT "${implicit_libs}" STREQUAL "${implicit_lib_output}")
message("${t} parse failed: state=${state}, '${implicit_libs}' does not match '${implicit_lib_output}'")
- elseif(library_arch AND NOT "${library_arch}" STREQUAL "${library_arch_output}")
+ elseif((library_arch OR library_arch_output) AND NOT "${library_arch}" STREQUAL "${library_arch_output}")
message("${t} parse failed: state=${state}, '${library_arch}' does not match '${library_arch_output}'")
endif()
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-Intel-18.0.0.20170811.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-Intel-18.0.0.20170811.output
index 55852c0..e613290 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-Intel-18.0.0.20170811.output
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-Intel-18.0.0.20170811.output
@@ -1,3 +1,3 @@
libs=imf;svml;irng;m;ipgo;decimal;cilkrts;stdc++;gcc;gcc_s;irc;svml;c;gcc;gcc_s;irc_s;dl;c
dirs=/opt/intel/compilers_and_libraries_2018.0.128/linux/ipp/lib/intel64;/opt/intel/compilers_and_libraries_2018.0.128/linux/compiler/lib/intel64_lin;/opt/intel/compilers_and_libraries_2018.0.128/linux/mkl/lib/intel64_lin;/opt/intel/compilers_and_libraries_2018.0.128/linux/tbb/lib/intel64/gcc4.7;/usr/lib/gcc/x86_64-redhat-linux/4.8.5;/usr/lib64;/lib64;/usr/lib;/lib
-library_arch=x86_64-redhat-linux
+library_arch=
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-NVHPC-21.1.0.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-NVHPC-21.1.0.output
new file mode 100644
index 0000000..e932be9
--- /dev/null
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-NVHPC-21.1.0.output
@@ -0,0 +1,3 @@
+libs=nvomp;dl;nvhpcatm;atomic;pthread;nvcpumath;nsnvc;nvc;m;gcc;c;gcc;gcc_s
+dirs=/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/lib;/usr/lib64;/usr/lib/gcc/x86_64-linux-gnu/9
+library_arch=x86_64-linux-gnu
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-XL-12.1.0.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-XL-12.1.0.output
index de8c8eb..81ac0ba 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-XL-12.1.0.output
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-XL-12.1.0.output
@@ -1,3 +1,3 @@
libs=xlopt;xl;dl;gcc_s;gcc;m;c;gcc_s;gcc
dirs=/soft/compilers/ibmcmp-oct2017/xlsmp/bg/3.1/lib64;/soft/compilers/ibmcmp-oct2017/xlmass/bg/7.3/lib64;/soft/compilers/ibmcmp-oct2017/vac/bg/12.1/lib64;/soft/compilers/ibmcmp-oct2017/vacpp/bg/12.1/lib64;/usr/lib/gcc/ppc64-redhat-linux/4.4.7;/usr/lib64;/lib64;/usr/lib
-library_arch=ppc64-redhat-linux
+library_arch=
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-XL-16.1.0.0.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-XL-16.1.0.0.output
index cd672d5..b88a48d 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-XL-16.1.0.0.output
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-XL-16.1.0.0.output
@@ -1,3 +1,3 @@
libs=xlopt;xl;dl;gcc_s;pthread;gcc;m;c;gcc_s;gcc
dirs=/opt/ibm/xlsmp/5.1.0/lib;/opt/ibm/xlmass/9.1.0/lib;/opt/ibm/xlC/16.1.0/lib;/usr/lib/gcc/ppc64le-redhat-linux/4.8.5;/usr/lib64;/lib64;/usr/lib
-library_arch=ppc64le-redhat-linux
+library_arch=
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CUDA-NVIDIA-10.1.168-XLClang-v.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CUDA-NVIDIA-10.1.168-XLClang-v.output
index 8824772..261785c 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CUDA-NVIDIA-10.1.168-XLClang-v.output
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CUDA-NVIDIA-10.1.168-XLClang-v.output
@@ -1,3 +1,3 @@
libs=cudadevrt;cudart_static;rt;pthread;dl;xlopt;xl;ibmc++;stdc++;m;dl;gcc_s;gcc;pthread;m;c;gcc_s;gcc
dirs=/sw/summit/cuda/10.1.168/targets/ppc64le-linux/lib/stubs;/sw/summit/cuda/10.1.168/targets/ppc64le-linux/lib;/autofs/nccs-svm1_sw/summit/.swci/1-compute/opt/spack/20180914/linux-rhel7-ppc64le/xl-16.1.1-3/spectrum-mpi-10.3.0.1-20190611-aqjt3jo53mogrrhcrd2iufr435azcaha/lib;/autofs/nccs-svm1_sw/summit/.swci/1-compute/opt/spack/20180914/linux-rhel7-ppc64le/gcc-4.8.5/darshan-runtime-3.1.7-csygoqyym3m3ysoaperhxlhoiluvpa2u/lib;/autofs/nccs-svm1_sw/summit/xl/16.1.1-3/xlsmp/5.1.1/lib;/autofs/nccs-svm1_sw/summit/xl/16.1.1-3/xlmass/9.1.1/lib;/autofs/nccs-svm1_sw/summit/xl/16.1.1-3/xlC/16.1.1/lib;/usr/lib/gcc/ppc64le-redhat-linux/4.8.5;/usr/lib64;/lib64;/autofs/nccs-svm1_sw/peak/.swci/1-compute/opt/spack/20180914/linux-rhel7-ppc64le/gcc-4.8.5/darshan-runtime-3.1.7-ytwv7xbkub6mqnpvygdthwqa7mhjqbc5/lib;/usr/lib
-library_arch=ppc64le-redhat-linux
+library_arch=
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-Intel-18.0.0.20170811.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-Intel-18.0.0.20170811.output
index 6a2a105..678a196 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-Intel-18.0.0.20170811.output
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-Intel-18.0.0.20170811.output
@@ -1,3 +1,3 @@
libs=imf;svml;irng;stdc++;m;ipgo;decimal;cilkrts;stdc++;gcc;gcc_s;irc;svml;c;gcc;gcc_s;irc_s;dl;c
dirs=/opt/intel/compilers_and_libraries_2018.0.128/linux/ipp/lib/intel64;/opt/intel/compilers_and_libraries_2018.0.128/linux/compiler/lib/intel64_lin;/opt/intel/compilers_and_libraries_2018.0.128/linux/mkl/lib/intel64_lin;/opt/intel/compilers_and_libraries_2018.0.128/linux/tbb/lib/intel64/gcc4.7;/usr/lib/gcc/x86_64-redhat-linux/4.8.5;/usr/lib64;/lib64;/usr/lib;/lib
-library_arch=x86_64-redhat-linux
+library_arch=
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-NVHPC-21.1.0.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-NVHPC-21.1.0.output
new file mode 100644
index 0000000..e7f7d05
--- /dev/null
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-NVHPC-21.1.0.output
@@ -0,0 +1,3 @@
+libs=atomic;nvhpcatm;stdc++;nvomp;dl;nvhpcatm;atomic;pthread;nvcpumath;nsnvc;nvc;m;gcc;c;gcc;gcc_s
+dirs=/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/lib;/usr/lib64;/usr/lib/gcc/x86_64-linux-gnu/9
+library_arch=x86_64-linux-gnu
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-XL-12.1.0.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-XL-12.1.0.output
index 9fbc844..45c5565 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-XL-12.1.0.output
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-XL-12.1.0.output
@@ -1,3 +1,3 @@
libs=xlopt;xl;ibmc++;xlopt;xl;stdc++;m;dl;gcc_s;gcc;m;c;gcc_s;gcc;dl;gcc_s;gcc;m;c;gcc_s;gcc
dirs=/soft/compilers/ibmcmp-oct2017/xlsmp/bg/3.1/lib64;/soft/compilers/ibmcmp-oct2017/xlmass/bg/7.3/lib64;/soft/compilers/ibmcmp-oct2017/vac/bg/12.1/lib64;/soft/compilers/ibmcmp-oct2017/vacpp/bg/12.1/lib64;/usr/lib/gcc/ppc64-redhat-linux/4.4.7;/usr/lib64;/lib64;/usr/lib
-library_arch=ppc64-redhat-linux
+library_arch=
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-XL-16.1.0.0.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-XL-16.1.0.0.output
index 4e9ab0a..9d649ec 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-XL-16.1.0.0.output
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-XL-16.1.0.0.output
@@ -1,3 +1,3 @@
libs=xlopt;xl;ibmc++;stdc++;m;dl;gcc_s;gcc;pthread;m;c;gcc_s;gcc
dirs=/opt/ibm/xlsmp/5.1.0/lib;/opt/ibm/xlmass/9.1.0/lib;/opt/ibm/xlC/16.1.0/lib;/usr/lib/gcc/ppc64le-redhat-linux/4.8.5;/usr/lib64;/lib64;/usr/lib
-library_arch=ppc64le-redhat-linux
+library_arch=
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-Fortran-XL-14.1.0.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-Fortran-XL-14.1.0.output
index 68be4c5..3c07cf8 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-Fortran-XL-14.1.0.output
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-Fortran-XL-14.1.0.output
@@ -1,3 +1,3 @@
libs=xlf90;xlopt;xlomp_ser;xl;xlfmath;gcc_s;dl;rt;pthread;gcc;m;c;gcc_s;gcc
dirs=/soft/compilers/ibmcmp-oct2017/xlsmp/bg/3.1/lib64;/soft/compilers/ibmcmp-oct2017/xlmass/bg/7.3/lib64;/soft/compilers/ibmcmp-oct2017/xlf/bg/14.1/lib64;/usr/lib/gcc/ppc64-redhat-linux/4.4.7;/usr/lib64;/lib64;/usr/lib
-library_arch=ppc64-redhat-linux
+library_arch=
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-C-PGI-18.10.1.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-C-PGI-18.10.1.output
index e44c84d..dc17ce7 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-C-PGI-18.10.1.output
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-C-PGI-18.10.1.output
@@ -1,3 +1,3 @@
libs=pgmp;numa;pthread;pgmath;nspgc;pgc;m;gcc;c;gcc;gcc_s
dirs=/mnt/pgi/linux86-64/18.10/lib;/usr/lib64;/usr/lib/gcc/x86_64-linux-gnu/7
-library_arch=x86_64-linux-gnu2
+library_arch=
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-C-XL-12.1.0.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-C-XL-12.1.0.output
index de8c8eb..81ac0ba 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-C-XL-12.1.0.output
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-C-XL-12.1.0.output
@@ -1,3 +1,3 @@
libs=xlopt;xl;dl;gcc_s;gcc;m;c;gcc_s;gcc
dirs=/soft/compilers/ibmcmp-oct2017/xlsmp/bg/3.1/lib64;/soft/compilers/ibmcmp-oct2017/xlmass/bg/7.3/lib64;/soft/compilers/ibmcmp-oct2017/vac/bg/12.1/lib64;/soft/compilers/ibmcmp-oct2017/vacpp/bg/12.1/lib64;/usr/lib/gcc/ppc64-redhat-linux/4.4.7;/usr/lib64;/lib64;/usr/lib
-library_arch=ppc64-redhat-linux
+library_arch=
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-CXX-PGI-18.10.1.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-CXX-PGI-18.10.1.output
index cd15054..a7c14d2 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-CXX-PGI-18.10.1.output
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-CXX-PGI-18.10.1.output
@@ -1,3 +1,3 @@
libs=atomic;pgatm;stdc++;pgmp;numa;pthread;pgmath;nspgc;pgc;m;gcc;c;gcc;gcc_s
dirs=/mnt/pgi/linux86-64/18.10/lib;/usr/lib64;/usr/lib/gcc/x86_64-linux-gnu/7
-library_arch=x86_64-linux-gnu
+library_arch=
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-CXX-XL-12.1.0.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-CXX-XL-12.1.0.output
index 9fbc844..45c5565 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-CXX-XL-12.1.0.output
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-CXX-XL-12.1.0.output
@@ -1,3 +1,3 @@
libs=xlopt;xl;ibmc++;xlopt;xl;stdc++;m;dl;gcc_s;gcc;m;c;gcc_s;gcc;dl;gcc_s;gcc;m;c;gcc_s;gcc
dirs=/soft/compilers/ibmcmp-oct2017/xlsmp/bg/3.1/lib64;/soft/compilers/ibmcmp-oct2017/xlmass/bg/7.3/lib64;/soft/compilers/ibmcmp-oct2017/vac/bg/12.1/lib64;/soft/compilers/ibmcmp-oct2017/vacpp/bg/12.1/lib64;/usr/lib/gcc/ppc64-redhat-linux/4.4.7;/usr/lib64;/lib64;/usr/lib
-library_arch=ppc64-redhat-linux
+library_arch=
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-Fortran-PGI-18.10.1.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-Fortran-PGI-18.10.1.output
index f3cc551..955d540 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-Fortran-PGI-18.10.1.output
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-Fortran-PGI-18.10.1.output
@@ -1,3 +1,3 @@
libs=pgf90rtl;pgf90;pgf90_rpm1;pgf902;pgf90rtl;pgftnrtl;pgmp;numa;pthread;pgmath;nspgc;pgc;rt;pthread;m;gcc;c;gcc;gcc_s
dirs=/mnt/pgi/linux86-64/18.10/lib;/usr/lib64;/usr/lib/gcc/x86_64-linux-gnu/7
-library_arch=x86_64-linux-gnu
+library_arch=
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc_i-C-XL-12.1.0.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc_i-C-XL-12.1.0.output
index de8c8eb..81ac0ba 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc_i-C-XL-12.1.0.output
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc_i-C-XL-12.1.0.output
@@ -1,3 +1,3 @@
libs=xlopt;xl;dl;gcc_s;gcc;m;c;gcc_s;gcc
dirs=/soft/compilers/ibmcmp-oct2017/xlsmp/bg/3.1/lib64;/soft/compilers/ibmcmp-oct2017/xlmass/bg/7.3/lib64;/soft/compilers/ibmcmp-oct2017/vac/bg/12.1/lib64;/soft/compilers/ibmcmp-oct2017/vacpp/bg/12.1/lib64;/usr/lib/gcc/ppc64-redhat-linux/4.4.7;/usr/lib64;/lib64;/usr/lib
-library_arch=ppc64-redhat-linux
+library_arch=
diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_pgf77-Fortran-PGI-18.10.1.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_pgf77-Fortran-PGI-18.10.1.output
index 8f68358..30b86e6 100644
--- a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_pgf77-Fortran-PGI-18.10.1.output
+++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_pgf77-Fortran-PGI-18.10.1.output
@@ -1,3 +1,3 @@
libs=pgftnrtl;pgmp;numa;pthread;pgmath;nspgc;pgc;rt;pthread;m;gcc;c;gcc;gcc_s
dirs=/mnt/pgi/linux86-64/18.10/lib;/usr/lib64;/usr/lib/gcc/x86_64-linux-gnu/7
-library_arch=x86_64-linux-gnu
+library_arch=
diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake
index 494f87f..ea94a5b 100644
--- a/Tests/RunCMake/RunCMake.cmake
+++ b/Tests/RunCMake/RunCMake.cmake
@@ -215,6 +215,11 @@ function(run_cmake_command test)
run_cmake(${test})
endfunction()
+function(run_cmake_script test)
+ set(RunCMake_TEST_COMMAND ${CMAKE_COMMAND} ${ARGN} -P ${RunCMake_SOURCE_DIR}/${test}.cmake)
+ run_cmake(${test})
+endfunction()
+
function(run_cmake_with_options test)
set(RunCMake_TEST_OPTIONS "${ARGN}")
run_cmake(${test})
diff --git a/Utilities/Release/README.rst b/Utilities/Release/README.rst
index 5d8e318..dfaf831 100644
--- a/Utilities/Release/README.rst
+++ b/Utilities/Release/README.rst
@@ -6,6 +6,17 @@ on ``cmake.org``. See also the `CMake Source Code Guide`_.
.. _`CMake Source Code Guide`: ../../Help/dev/source.rst
+File Table
+----------
+
+The set of package files distributed on ``cmake.org`` varies by CMake version.
+Clients providing automatic download functionality may query the set of
+package files available using a special file that lists them:
+
+* `File Table v1`_ Documentation
+
+.. _`File Table v1`: files-v1.rst
+
Docker
------
diff --git a/Utilities/Release/files-sign.bash b/Utilities/Release/files-sign.bash
new file mode 100755
index 0000000..414859d
--- /dev/null
+++ b/Utilities/Release/files-sign.bash
@@ -0,0 +1,5 @@
+#!/usr/bin/env bash
+
+set -e
+
+gpg --armor --detach-sign cmake-*-SHA-256.txt
diff --git a/Utilities/Release/files-v1.json.in b/Utilities/Release/files-v1.json.in
new file mode 100644
index 0000000..aa6b15d
--- /dev/null
+++ b/Utilities/Release/files-v1.json.in
@@ -0,0 +1,106 @@
+{
+ "version": {
+ "major": @version_major@,
+ "minor": @version_minor@,
+ "patch": @version_patch@,
+ @maybe_version_suffix@
+ "string": "@version@"
+ },
+ "files": [
+ {
+ "os": ["linux", "Linux"],
+ "architecture": ["aarch64"],
+ "class": "installer",
+ "name": "cmake-@version@-linux-aarch64.sh"
+ },
+ {
+ "os": ["linux", "Linux"],
+ "architecture": ["aarch64"],
+ "class": "archive",
+ "name": "cmake-@version@-linux-aarch64.tar.gz"
+ },
+ {
+ "os": ["linux", "Linux"],
+ "architecture": ["x86_64"],
+ "class": "installer",
+ "name": "cmake-@version@-linux-x86_64.sh"
+ },
+ {
+ "os": ["linux", "Linux"],
+ "architecture": ["x86_64"],
+ "class": "archive",
+ "name": "cmake-@version@-linux-x86_64.tar.gz"
+ },
+ {
+ "os": ["macos", "macOS"],
+ "architecture": ["arm64", "x86_64"],
+ "class": "volume",
+ "name": "cmake-@version@-macos-universal.dmg",
+ "macOSmin": "10.13"
+ },
+ {
+ "os": ["macos", "macOS"],
+ "architecture": ["arm64", "x86_64"],
+ "class": "archive",
+ "name": "cmake-@version@-macos-universal.tar.gz",
+ "macOSmin": "10.13"
+ },
+ {
+ "os": ["macos10.10", "macOS10.10"],
+ "architecture": ["arm64", "x86_64"],
+ "class": "volume",
+ "name": "cmake-@version@-macos10.10-universal.dmg",
+ "macOSmin": "10.10"
+ },
+ {
+ "os": ["macos10.10", "macOS10.10"],
+ "architecture": ["arm64", "x86_64"],
+ "class": "archive",
+ "name": "cmake-@version@-macos10.10-universal.tar.gz",
+ "macOSmin": "10.10"
+ },
+ {
+ "os": ["windows", "Windows"],
+ "architecture": ["i386"],
+ "class": "installer",
+ "name": "cmake-@version@-windows-i386.msi"
+ },
+ {
+ "os": ["windows", "Windows"],
+ "architecture": ["i386"],
+ "class": "archive",
+ "name": "cmake-@version@-windows-i386.zip"
+ },
+ {
+ "os": ["windows", "Windows"],
+ "architecture": ["x86_64"],
+ "class": "installer",
+ "name": "cmake-@version@-windows-x86_64.msi"
+ },
+ {
+ "os": ["windows", "Windows"],
+ "architecture": ["x86_64"],
+ "class": "archive",
+ "name": "cmake-@version@-windows-x86_64.zip"
+ },
+ {
+ "os": ["source"],
+ "architecture": [],
+ "class": "archive",
+ "name": "cmake-@version@.tar.gz"
+ },
+ {
+ "os": ["source"],
+ "architecture": [],
+ "class": "archive",
+ "name": "cmake-@version@.zip"
+ }
+ ],
+ "hashFiles": [
+ {
+ "algorithm": ["sha256", "SHA-256"],
+ "name": "cmake-@version@-SHA-256.txt",
+ "signature": ["cmake-@version@-SHA-256.txt.asc"]
+ }
+ ]
+}
diff --git a/Utilities/Release/files-v1.rst b/Utilities/Release/files-v1.rst
new file mode 100644
index 0000000..ceebecc
--- /dev/null
+++ b/Utilities/Release/files-v1.rst
@@ -0,0 +1,186 @@
+File Table v1
+*************
+
+The set of package files distributed on ``cmake.org`` varies by CMake version.
+One file, named ``cmake-<ver>-files-v1.json``, contains a table of the package
+files available for a given version. Clients may use this to find other files.
+
+Format
+------
+
+The format is a JSON object:
+
+.. code-block:: json
+
+ {
+ "version": {
+ "major": 3, "minor": 20, "patch": 0,
+ "string": "3.20.0"
+ },
+ "files": [
+ {
+ "os": ["...", "..."],
+ "architecture": ["...", "..."],
+ "class": "...",
+ "name": "..."
+ }
+ ],
+ "hashFiles": [
+ {
+ "algorithm": ["...", "..."],
+ "name": "cmake-<version>-<algo>.txt",
+ "signature": ["cmake-<version>-<algo>.txt.asc"]
+ }
+ ]
+ }
+
+The members are:
+
+``version``
+ A JSON object specifying the version of CMake with members:
+
+ ``major``, ``minor``, ``patch``
+ Integer values specifying the major, minor, and patch version components.
+
+ ``suffix``
+ A string specifying the version suffix, if any, e.g. ``rc1``.
+
+ ``string``
+ A string specifying the full version in the format
+ ``<major>.<minor>.<patch>[-<suffix>]``.
+
+``files``
+ A JSON array of entries corresponding to available package files.
+ Each entry is a JSON object containing members:
+
+ ``os``
+ A JSON array of strings naming the operating system for which the
+ package file is built, possibly using multiple alternative spellings.
+ Possible names include:
+
+ ``source``
+ Source packages.
+
+ ``Linux``, ``linux``
+ Linux packages.
+
+ ``macOS``, ``macos``
+ macOS packages.
+
+ ``Windows``, ``windows``
+ Windows packages.
+
+ ``architecture``
+ A JSON array of strings naming the architecture(s) for which the
+ package file is built, possibly using multiple alternative spellings.
+ Source packages have an empty list of architectures (``[]``).
+ Binary packages have a non-empty list of architectures, with at least
+ one name matching the output of ``uname -m`` on corresponding hosts.
+ On Windows, architecture names include ``x86_64`` and ``i386``.
+ On macOS, universal binary packages list all architectures,
+ e.g. ``["arm64","x86_64"]``.
+
+ ``class``
+ A JSON string naming the class of package. The value is one of:
+
+ ``archive``
+ A tarball or zip archive.
+ The extension, such as ``.tar.gz`` or ``.zip``, indicates the format.
+ The rest of the file name matches the top-level directory in the archive.
+
+ ``installer``
+ An interactive installer.
+
+ ``volume``
+ A disk image (``.dmg`` on macOS).
+
+ ``name``
+ A JSON string specifying the name of the package file.
+
+ ``macOSmin``
+ Optional member that is present on package files for macOS.
+ The value is a JSON string specifying the minimum version of macOS
+ required to run the binary, e.g. ``"10.13"``.
+
+ ``deprecated``
+ Optional member that is present when the package file is deprecated
+ and may be removed from the set of package files in later versions.
+ The value is a string containing a deprecation message.
+ Clients should check this field to warn users when they are using
+ a deprecated package file.
+
+``hashFiles``
+ A JSON array of entries corresponding to files containing cryptographic
+ hashes of the package file contents. Each entry is a JSON object
+ containing members:
+
+ ``algorithm``
+ A JSON array of strings naming a cryptographic hash algorithm, possibly
+ using multiple alternative spellings, e.g. ``["sha256", "SHA-256"]``.
+
+ ``name``
+ A JSON string specifying the name of the file containing hashes,
+ e.g. ``"cmake-<version>-SHA-256.txt"``.
+
+ ``signature``
+ A JSON array of strings naming files containing a cryptographic
+ signature of the hash file specified by ``name``, e.g.
+ ``["cmake-<version>-SHA-256.txt.asc"]``.
+
+ ``deprecated``
+ Optional member that is present when the hash algorithm is deprecated
+ and may be removed from the set of hash files in later versions.
+ The value is a string containing a deprecation message.
+ Clients that rely on a specific hash algorithm should check this
+ field to determine whether an update is needed.
+
+``deprecated``
+ Optional member that is present when `File Table v1`_ has been
+ deprecated in favor of a newer alternative. The value is a string
+ containing a deprecation message. Clients should check this field
+ to determine whether they need an update to use a newer alternative.
+
+The table and hash files are generated by `files.bash`_ from
+the `files-v1.json.in`_ template and the package files themselves.
+
+.. _`files.bash`: files.bash
+.. _`files-v1.json.in`: files-v1.json.in
+
+Queries
+-------
+
+Clients may download the `File Table v1`_ file ``cmake-<ver>-files-v1.json``
+and query it to get the name(s) of specific package files adjacent to it.
+Make queries as specific as possible in order to account for additional
+alternative binaries in future CMake versions.
+
+For example, one may use ``jq`` queries:
+
+* To select a Windows binary archive supporting ``x86_64`` hosts::
+
+ .files[] | select((.os[] | . == "windows") and
+ (.architecture[] | . == "x86_64") and
+ (.class == "archive")) | .name
+
+* To select a Linux binary archive supporting ``aarch64`` hosts::
+
+ .files[] | select((.os[] | . == "linux") and
+ (.architecture[] | . == "aarch64") and
+ (.class == "archive")) | .name
+
+* To select a macOS binary archive supporting ``arm64`` hosts::
+
+ .files[] | select((.os[] | . == "macos") and
+ (.architecture[] | . == "arm64") and
+ (.class == "archive")) | .name
+
+* To select a macOS binary archive supporting macOS 10.12 on ``x86_64`` hosts::
+
+ .files[] | select((.os[] | contains("macOS")) and
+ (.architecture[] | . == "x86_64") and
+ ([.macOSmin] | inside(["10.10", "10.11", "10.12"]))
+ ) | .name
+
+* To select a SHA-256 hash file::
+
+ .hashFiles[] | select(.algorithm[] | . == "SHA-256") | .name
diff --git a/Utilities/Release/files.bash b/Utilities/Release/files.bash
new file mode 100755
index 0000000..28ca8f1
--- /dev/null
+++ b/Utilities/Release/files.bash
@@ -0,0 +1,84 @@
+#!/usr/bin/env bash
+
+set -e
+
+usage='usage: files.bash [<options>] [--]
+
+Options:
+
+ --version <ver> CMake <major>.<minor> version number to push.
+ Defaults to version of source tree.
+'
+
+die() {
+ echo "$@" 1>&2; exit 1
+}
+
+readonly cmake_source_dir="${BASH_SOURCE%/*}/../.."
+
+cmake_version_component()
+{
+ sed -n "
+/^set(CMake_VERSION_${1}/ {s/set(CMake_VERSION_${1} *\([0-9]*\))/\1/;p;}
+" "${cmake_source_dir}/Source/CMakeVersion.cmake"
+}
+
+
+version=''
+while test "$#" != 0; do
+ case "$1" in
+ --version) shift; version="$1" ;;
+ --) shift ; break ;;
+ -*) die "$usage" ;;
+ *) break ;;
+ esac
+ shift
+done
+test "$#" = 0 || die "$usage"
+
+if test -z "$version"; then
+ cmake_version_major="$(cmake_version_component MAJOR)"
+ cmake_version_minor="$(cmake_version_component MINOR)"
+ cmake_version_patch="$(cmake_version_component PATCH)"
+ cmake_version_rc="$(cmake_version_component RC)"
+ version="${cmake_version_major}.${cmake_version_minor}.${cmake_version_patch}"
+ if test -n "$cmake_version_rc"; then
+ version="$version-rc$cmake_version_rc"
+ fi
+fi
+readonly version
+
+IFS='.-' read version_major version_minor version_patch version_suffix <<< "$version"
+readonly version_major
+readonly version_minor
+readonly version_patch
+readonly version_suffix
+
+if test -n "$version_suffix"; then
+ maybe_version_suffix='"suffix": "'"$version_suffix"'",'
+else
+ maybe_version_suffix=''
+fi
+readonly maybe_version_suffix
+
+readonly files_v1_in="${BASH_SOURCE%/*}/files-v1.json.in"
+sed "
+ s/@version@/$version/g
+ s/@version_major@/$version_major/g
+ s/@version_minor@/$version_minor/g
+ s/@version_patch@/$version_patch/g
+ s/@maybe_version_suffix@/$maybe_version_suffix/g
+" "$files_v1_in" \
+ | jq . \
+ > "cmake-$version-files-v1.json"
+
+readonly algos='
+ 256
+'
+for algo in $algos; do
+ shasum -a $algo \
+ "cmake-$version-files-v1.json" \
+ $(jq -r '.files[].name' "cmake-$version-files-v1.json") \
+ | LC_ALL=C sort -k 2 \
+ > "cmake-$version-SHA-$algo.txt"
+done
diff --git a/Utilities/cmlibarchive/libarchive/archive_random.c b/Utilities/cmlibarchive/libarchive/archive_random.c
index 65ea691..9d1aa49 100644
--- a/Utilities/cmlibarchive/libarchive/archive_random.c
+++ b/Utilities/cmlibarchive/libarchive/archive_random.c
@@ -173,7 +173,7 @@ arc4_init(void)
}
static inline void
-arc4_addrandom(u_char *dat, int datlen)
+arc4_addrandom(uint8_t *dat, int datlen)
{
int n;
uint8_t si;
@@ -196,7 +196,7 @@ arc4_stir(void)
struct {
struct timeval tv;
pid_t pid;
- u_char rnd[KEYSIZE];
+ uint8_t rnd[KEYSIZE];
} rdat;
if (!rs_initialized) {
@@ -216,7 +216,7 @@ arc4_stir(void)
/* We'll just take whatever was on the stack too... */
}
- arc4_addrandom((u_char *)&rdat, KEYSIZE);
+ arc4_addrandom((uint8_t *)&rdat, KEYSIZE);
/*
* Discard early keystream, as per recommendations in:
@@ -258,7 +258,7 @@ arc4_getbyte(void)
static void
arc4random_buf(void *_buf, size_t n)
{
- u_char *buf = (u_char *)_buf;
+ uint8_t *buf = (uint8_t *)_buf;
_ARC4_LOCK();
arc4_stir_if_needed();
while (n--) {