summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Help/prop_sf/MACOSX_PACKAGE_LOCATION.rst7
-rw-r--r--Modules/CPackRPM.cmake12
-rw-r--r--Modules/InstallRequiredSystemLibraries.cmake178
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/CPack/WiX/cmWIXFilesSourceWriter.cxx4
-rw-r--r--Source/CPack/cmCPackCygwinSourceGenerator.cxx2
-rw-r--r--Source/CPack/cmCPackDebGenerator.cxx2
-rw-r--r--Source/CPack/cmCPackGenerator.h28
-rw-r--r--Source/CPack/cmCPackOSXX11Generator.cxx2
-rw-r--r--Source/CPack/cmCPackSTGZGenerator.cxx5
-rw-r--r--Source/CTest/cmCTestSubmitHandler.cxx2
-rw-r--r--Source/QtDialog/CMakeSetup.cxx2
-rw-r--r--Source/cmCTest.h32
-rw-r--r--Source/cmConfigure.cmake.h.in2
-rw-r--r--Source/cmDynamicLoader.cxx1
-rw-r--r--Source/cmDynamicLoader.h2
-rw-r--r--Source/cmFileCommand.cxx5
-rw-r--r--Source/cmFileTimeComparison.cxx2
-rw-r--r--Source/cmGeneratorExpressionEvaluationFile.h7
-rw-r--r--Source/cmGeneratorTarget.cxx12
-rw-r--r--Source/cmGeneratorTarget.h4
-rw-r--r--Source/cmGlobalGenerator.cxx5
-rw-r--r--Source/cmGlobalGenerator.h4
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx53
-rw-r--r--Source/cmGlobalXCodeGenerator.h2
-rw-r--r--Source/cmMakefile.cxx1
-rw-r--r--Source/cmQtAutoGeneratorCommon.cxx1
-rw-r--r--Source/cmQtAutoGeneratorCommon.h5
-rw-r--r--Source/cmQtAutoGeneratorInitializer.cxx8
-rw-r--r--Source/cmSystemTools.cxx3
-rw-r--r--Source/cmSystemTools.h8
-rw-r--r--Source/cmWriteFileCommand.cxx5
-rw-r--r--Source/cm_sys_stat.h14
-rw-r--r--Source/cmake.cxx5
-rw-r--r--Source/kwsys/.gitattributes19
-rw-r--r--Source/kwsys/ConsoleBuf.hxx.in3
-rw-r--r--Source/kwsys/Encoding.hxx.in2
-rw-r--r--Source/kwsys/FStream.hxx.in2
-rw-r--r--Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake8
-rw-r--r--Tests/Cuda/ObjectLibrary/CMakeLists.txt5
-rw-r--r--Tests/QtAutogen/CMakeLists.txt102
-rw-r--r--Tests/QtAutogen/mocRerun/CMakeLists.txt3
-rw-r--r--Tests/QtAutogen/rccDepends/CMakeLists.txt19
-rw-r--r--Tests/QtAutogen/rccDepends/res1a.qrc.in (renamed from Tests/QtAutogen/rccDepends/res1.qrc.in)2
-rw-r--r--Tests/QtAutogen/rccDepends/res1b.qrc.in6
-rw-r--r--Tests/QtAutogen/rccDepends/res2a.qrc.in (renamed from Tests/QtAutogen/rccDepends/res2.qrc.in)2
-rw-r--r--Tests/QtAutogen/rccDepends/res2b.qrc.in6
-rw-r--r--Tests/RunCMake/CPack/RPM/Helpers.cmake4
-rw-r--r--Tests/RunCMake/CPack/tests/SOURCE_PACKAGE/VerifyResult.cmake4
-rw-r--r--Tests/RunCMake/Framework/FrameworkLayout.cmake8
-rw-r--r--Tests/RunCMake/Framework/OSXFrameworkLayout-build-check.cmake15
-rw-r--r--Tests/RunCMake/Framework/deepresource.txt0
-rw-r--r--Tests/RunCMake/Framework/flatresource.txt0
-rw-r--r--Tests/RunCMake/Framework/iOSFrameworkLayout-build-check.cmake15
-rw-r--r--Tests/RunCMake/Framework/some.txt0
-rw-r--r--Tests/RunCMake/RunCMake.cmake2
-rw-r--r--Tests/SimpleInstall/CMakeLists.txt1
-rw-r--r--Utilities/Release/release_cmake.cmake3
-rwxr-xr-xUtilities/Scripts/update-kwsys.bash1
-rw-r--r--Utilities/Scripts/update-third-party.bash8
60 files changed, 433 insertions, 234 deletions
diff --git a/Help/prop_sf/MACOSX_PACKAGE_LOCATION.rst b/Help/prop_sf/MACOSX_PACKAGE_LOCATION.rst
index 69cdcb7..a064afa 100644
--- a/Help/prop_sf/MACOSX_PACKAGE_LOCATION.rst
+++ b/Help/prop_sf/MACOSX_PACKAGE_LOCATION.rst
@@ -21,3 +21,10 @@ extension is changed). See the :prop_tgt:`PUBLIC_HEADER`,
:prop_tgt:`PRIVATE_HEADER`, and :prop_tgt:`RESOURCE` target properties for
specifying files meant for ``Headers``, ``PrivateHeaders``, or
``Resources`` directories.
+
+If the specified location is equal to ``Resources``, the resulting location
+will be the same as if the :prop_tgt:`RESOURCE` property had been used. If
+the specified location is a sub-folder of ``Resources``, it will be placed
+into the respective sub-folder. Note: For iOS Apple uses a flat bundle layout
+where no ``Resources`` folder exist. Therefore CMake strips the ``Resources``
+folder name from the specified location.
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index 2137133..cc54032 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -721,14 +721,6 @@
# Debuginfo packages contain debug symbols and sources for debugging packaged
# binaries.
#
-# .. note::
-#
-# Currently multiple debuginfo packages are generated if component based
-# packaging is used - one debuginfo package per component. This duplicates
-# sources if multiple binaries are using them. This is a side effect of
-# how CPackRPM currently generates component packages and will be addressed
-# in later versions of the generator.
-#
# Debuginfo RPM packaging has it's own set of variables:
#
# .. variable:: CPACK_RPM_DEBUGINFO_PACKAGE
@@ -1506,8 +1498,8 @@ function(cpack_rpm_debugsymbol_check INSTALL_FILES WORKING_DIR)
string(LENGTH "${CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX}/src_${index_}" debuginfo_dir_len)
if(source_dir_len_ LESS debuginfo_dir_len)
message(FATAL_ERROR "CPackRPM: source dir path '${source_dir_}' is"
- " longer than debuginfo sources dir path '${CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX}/src_${index_}'!"
- " Source dir path must be shorter than debuginfo sources dir path."
+ " shorter than debuginfo sources dir path '${CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX}/src_${index_}'!"
+ " Source dir path must be longer than debuginfo sources dir path."
" Set CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX variable to a shorter value"
" or make source dir path longer."
" Required for debuginfo packaging. See documentation of"
diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake
index 67dfe8f..1061da0 100644
--- a/Modules/InstallRequiredSystemLibraries.cmake
+++ b/Modules/InstallRequiredSystemLibraries.cmake
@@ -166,49 +166,58 @@ if(MSVC)
endif()
endif()
- if(MSVC_VERSION EQUAL 1900 OR MSVC_VERSION EQUAL 1910)
- set(_MSVCRT_VERSION 14)
+ if(MSVC_VERSION EQUAL 1910)
+ set(_MSVCRT_DLL_VERSION 140)
+ set(_MSVCRT_IDE_VERSION 15)
+ elseif(MSVC_VERSION EQUAL 1900)
+ set(_MSVCRT_DLL_VERSION 140)
+ set(_MSVCRT_IDE_VERSION 14)
elseif(MSVC_VERSION EQUAL 1800)
- set(_MSVCRT_VERSION 12)
+ set(_MSVCRT_DLL_VERSION 120)
+ set(_MSVCRT_IDE_VERSION 12)
elseif(MSVC_VERSION EQUAL 1700)
- set(_MSVCRT_VERSION 11)
+ set(_MSVCRT_DLL_VERSION 110)
+ set(_MSVCRT_IDE_VERSION 11)
elseif(MSVC_VERSION EQUAL 1600)
- set(_MSVCRT_VERSION 10)
+ set(_MSVCRT_DLL_VERSION 100)
+ set(_MSVCRT_IDE_VERSION 10)
else()
- set(_MSVCRT_VERSION "")
+ set(_MSVCRT_DLL_VERSION "")
+ set(_MSVCRT_IDE_VERSION "")
endif()
- if(_MSVCRT_VERSION)
- set(v "${_MSVCRT_VERSION}")
+ if(_MSVCRT_DLL_VERSION)
+ set(v "${_MSVCRT_DLL_VERSION}")
+ set(vs "${_MSVCRT_IDE_VERSION}")
# Find the runtime library redistribution directory.
get_filename_component(msvc_install_dir
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\${v}.0;InstallDir]" ABSOLUTE)
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\${vs}.0;InstallDir]" ABSOLUTE)
set(programfilesx86 "ProgramFiles(x86)")
- if(DEFINED MSVC${v}_REDIST_DIR AND EXISTS "${MSVC${v}_REDIST_DIR}")
- set(MSVC_REDIST_DIR "${MSVC${v}_REDIST_DIR}") # use old cache entry
+ if(vs VERSION_LESS 15 AND DEFINED MSVC${vs}_REDIST_DIR AND EXISTS "${MSVC${vs}_REDIST_DIR}")
+ set(MSVC_REDIST_DIR "${MSVC${vs}_REDIST_DIR}") # use old cache entry
endif()
- find_path(MSVC_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.CRT
+ find_path(MSVC_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC${vs}0.CRT
PATHS
"${msvc_install_dir}/../../VC/redist"
"${base_dir}/VC/redist"
- "$ENV{ProgramFiles}/Microsoft Visual Studio ${v}.0/VC/redist"
- "$ENV{${programfilesx86}}/Microsoft Visual Studio ${v}.0/VC/redist"
+ "$ENV{ProgramFiles}/Microsoft Visual Studio ${vs}.0/VC/redist"
+ "$ENV{${programfilesx86}}/Microsoft Visual Studio ${vs}.0/VC/redist"
)
mark_as_advanced(MSVC_REDIST_DIR)
- set(MSVC_CRT_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.CRT")
+ set(MSVC_CRT_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC${vs}0.CRT")
if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
set(__install__libs
- "${MSVC_CRT_DIR}/msvcp${v}0.dll"
+ "${MSVC_CRT_DIR}/msvcp${v}.dll"
)
- if(NOT v VERSION_LESS 14)
+ if(NOT vs VERSION_LESS 14)
list(APPEND __install__libs
- "${MSVC_CRT_DIR}/vcruntime${v}0.dll"
- "${MSVC_CRT_DIR}/concrt${v}0.dll"
+ "${MSVC_CRT_DIR}/vcruntime${v}.dll"
+ "${MSVC_CRT_DIR}/concrt${v}.dll"
)
else()
- list(APPEND __install__libs "${MSVC_CRT_DIR}/msvcr${v}0.dll")
+ list(APPEND __install__libs "${MSVC_CRT_DIR}/msvcr${v}.dll")
endif()
else()
set(__install__libs)
@@ -216,21 +225,21 @@ if(MSVC)
if(CMAKE_INSTALL_DEBUG_LIBRARIES)
set(MSVC_CRT_DIR
- "${MSVC_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.DebugCRT")
+ "${MSVC_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC${vs}0.DebugCRT")
set(__install__libs ${__install__libs}
- "${MSVC_CRT_DIR}/msvcp${v}0d.dll"
+ "${MSVC_CRT_DIR}/msvcp${v}d.dll"
)
- if(NOT v VERSION_LESS 14)
+ if(NOT vs VERSION_LESS 14)
list(APPEND __install__libs
- "${MSVC_CRT_DIR}/vcruntime${v}0d.dll"
- "${MSVC_CRT_DIR}/concrt${v}0d.dll"
+ "${MSVC_CRT_DIR}/vcruntime${v}d.dll"
+ "${MSVC_CRT_DIR}/concrt${v}d.dll"
)
else()
- list(APPEND __install__libs "${MSVC_CRT_DIR}/msvcr${v}0d.dll")
+ list(APPEND __install__libs "${MSVC_CRT_DIR}/msvcr${v}d.dll")
endif()
endif()
- if(CMAKE_INSTALL_UCRT_LIBRARIES AND NOT v VERSION_LESS 14)
+ if(CMAKE_INSTALL_UCRT_LIBRARIES AND NOT vs VERSION_LESS 14)
# Find the Windows Kits directory.
get_filename_component(windows_kits_dir
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots;KitsRoot10]" ABSOLUTE)
@@ -356,20 +365,40 @@ if(MSVC)
)
endif()
- if(MSVC_VERSION EQUAL 1900 OR MSVC_VERSION EQUAL 1910)
- set(_MFC_VERSION 14)
+ if(MSVC_VERSION EQUAL 1910)
+ set(_MFC_DLL_VERSION 140)
+ set(_MFC_IDE_VERSION 15)
+ elseif(MSVC_VERSION EQUAL 1900)
+ set(_MFC_DLL_VERSION 140)
+ set(_MFC_IDE_VERSION 14)
elseif(MSVC_VERSION EQUAL 1800)
- set(_MFC_VERSION 12)
+ set(_MFC_DLL_VERSION 120)
+ set(_MFC_IDE_VERSION 12)
elseif(MSVC_VERSION EQUAL 1700)
- set(_MFC_VERSION 11)
+ set(_MFC_DLL_VERSION 110)
+ set(_MFC_IDE_VERSION 11)
elseif(MSVC_VERSION EQUAL 1600)
- set(_MFC_VERSION 10)
+ set(_MFC_DLL_VERSION 100)
+ set(_MFC_IDE_VERSION 10)
else()
- set(_MFC_VERSION "")
+ set(_MFC_DLL_VERSION "")
+ set(_MFC_IDE_VERSION "")
endif()
- if(_MFC_VERSION)
- set(v "${_MFC_VERSION}")
+ if(_MFC_DLL_VERSION)
+ set(v "${_MFC_DLL_VERSION}")
+ set(vs "${_MFC_IDE_VERSION}")
+
+ # Starting with VS 15 the MFC DLLs may be in a different directory.
+ if (NOT vs VERSION_LESS 15)
+ file(GLOB _MSVC_REDIST_DIRS "${MSVC_REDIST_DIR}/../*")
+ find_path(MSVC_REDIST_MFC_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC${vs}0.MFC
+ PATHS ${_MSVC_REDIST_DIRS} NO_DEFAULT_PATH)
+ mark_as_advanced(MSVC_REDIST_MFC_DIR)
+ unset(_MSVC_REDIST_DIRS)
+ else()
+ set(MSVC_REDIST_MFC_DIR "${MSVC_REDIST_DIR}")
+ endif()
# Multi-Byte Character Set versions of MFC are available as optional
# addon since Visual Studio 12. So for version 12 or higher, check
@@ -377,46 +406,46 @@ if(MSVC)
if(CMAKE_INSTALL_DEBUG_LIBRARIES)
set(MSVC_MFC_DIR
- "${MSVC_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.DebugMFC")
+ "${MSVC_REDIST_MFC_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC${vs}0.DebugMFC")
set(__install__libs ${__install__libs}
- "${MSVC_MFC_DIR}/mfc${v}0ud.dll"
- "${MSVC_MFC_DIR}/mfcm${v}0ud.dll"
+ "${MSVC_MFC_DIR}/mfc${v}ud.dll"
+ "${MSVC_MFC_DIR}/mfcm${v}ud.dll"
)
- if("${v}" LESS 12 OR EXISTS "${MSVC_MFC_DIR}/mfc${v}0d.dll")
+ if("${v}" LESS 12 OR EXISTS "${MSVC_MFC_DIR}/mfc${v}d.dll")
set(__install__libs ${__install__libs}
- "${MSVC_MFC_DIR}/mfc${v}0d.dll"
- "${MSVC_MFC_DIR}/mfcm${v}0d.dll"
+ "${MSVC_MFC_DIR}/mfc${v}d.dll"
+ "${MSVC_MFC_DIR}/mfcm${v}d.dll"
)
endif()
endif()
- set(MSVC_MFC_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.MFC")
+ set(MSVC_MFC_DIR "${MSVC_REDIST_MFC_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC${vs}0.MFC")
if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
set(__install__libs ${__install__libs}
- "${MSVC_MFC_DIR}/mfc${v}0u.dll"
- "${MSVC_MFC_DIR}/mfcm${v}0u.dll"
+ "${MSVC_MFC_DIR}/mfc${v}u.dll"
+ "${MSVC_MFC_DIR}/mfcm${v}u.dll"
)
- if("${v}" LESS 12 OR EXISTS "${MSVC_MFC_DIR}/mfc${v}0.dll")
+ if("${v}" LESS 12 OR EXISTS "${MSVC_MFC_DIR}/mfc${v}.dll")
set(__install__libs ${__install__libs}
- "${MSVC_MFC_DIR}/mfc${v}0.dll"
- "${MSVC_MFC_DIR}/mfcm${v}0.dll"
+ "${MSVC_MFC_DIR}/mfc${v}.dll"
+ "${MSVC_MFC_DIR}/mfcm${v}.dll"
)
endif()
endif()
# include the language dll's as well as the actuall dll's
- set(MSVC_MFCLOC_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.MFCLOC")
+ set(MSVC_MFCLOC_DIR "${MSVC_REDIST_MFC_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC${vs}0.MFCLOC")
set(__install__libs ${__install__libs}
- "${MSVC_MFCLOC_DIR}/mfc${v}0chs.dll"
- "${MSVC_MFCLOC_DIR}/mfc${v}0cht.dll"
- "${MSVC_MFCLOC_DIR}/mfc${v}0deu.dll"
- "${MSVC_MFCLOC_DIR}/mfc${v}0enu.dll"
- "${MSVC_MFCLOC_DIR}/mfc${v}0esn.dll"
- "${MSVC_MFCLOC_DIR}/mfc${v}0fra.dll"
- "${MSVC_MFCLOC_DIR}/mfc${v}0ita.dll"
- "${MSVC_MFCLOC_DIR}/mfc${v}0jpn.dll"
- "${MSVC_MFCLOC_DIR}/mfc${v}0kor.dll"
- "${MSVC_MFCLOC_DIR}/mfc${v}0rus.dll"
+ "${MSVC_MFCLOC_DIR}/mfc${v}chs.dll"
+ "${MSVC_MFCLOC_DIR}/mfc${v}cht.dll"
+ "${MSVC_MFCLOC_DIR}/mfc${v}deu.dll"
+ "${MSVC_MFCLOC_DIR}/mfc${v}enu.dll"
+ "${MSVC_MFCLOC_DIR}/mfc${v}esn.dll"
+ "${MSVC_MFCLOC_DIR}/mfc${v}fra.dll"
+ "${MSVC_MFCLOC_DIR}/mfc${v}ita.dll"
+ "${MSVC_MFCLOC_DIR}/mfc${v}jpn.dll"
+ "${MSVC_MFCLOC_DIR}/mfc${v}kor.dll"
+ "${MSVC_MFCLOC_DIR}/mfc${v}rus.dll"
)
endif()
endif()
@@ -424,25 +453,36 @@ if(MSVC)
# MSVC 8 was the first version with OpenMP
# Furthermore, there is no debug version of this
if(CMAKE_INSTALL_OPENMP_LIBRARIES)
- if(MSVC_VERSION EQUAL 1900 OR MSVC_VERSION EQUAL 1910)
- set(_MSOMP_VERSION 140)
+ if(MSVC_VERSION EQUAL 1910)
+ set(_MSOMP_DLL_VERSION 140)
+ set(_MSOMP_IDE_VERSION 15)
+ elseif(MSVC_VERSION EQUAL 1900)
+ set(_MSOMP_DLL_VERSION 140)
+ set(_MSOMP_IDE_VERSION 14)
elseif(MSVC_VERSION EQUAL 1800)
- set(_MSOMP_VERSION 120)
+ set(_MSOMP_DLL_VERSION 120)
+ set(_MSOMP_IDE_VERSION 12)
elseif(MSVC_VERSION EQUAL 1700)
- set(_MSOMP_VERSION 110)
+ set(_MSOMP_DLL_VERSION 110)
+ set(_MSOMP_IDE_VERSION 11)
elseif(MSVC_VERSION EQUAL 1600)
- set(_MSOMP_VERSION 100)
+ set(_MSOMP_DLL_VERSION 100)
+ set(_MSOMP_IDE_VERSION 10)
elseif(MSVC_VERSION EQUAL 1500)
- set(_MSOMP_VERSION 90)
+ set(_MSOMP_DLL_VERSION 90)
+ set(_MSOMP_IDE_VERSION 9)
elseif(MSVC_VERSION EQUAL 1400)
- set(_MSOMP_VERSION 80)
+ set(_MSOMP_DLL_VERSION 80)
+ set(_MSOMP_IDE_VERSION 8)
else()
- set(_MSOMP_VERSION "")
+ set(_MSOMP_DLL_VERSION "")
+ set(_MSOMP_IDE_VERSION "")
endif()
- if(_MSOMP_VERSION)
- set(v "${_MSOMP_VERSION}")
- set(MSVC_OPENMP_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC${v}.OPENMP")
+ if(_MSOMP_DLL_VERSION)
+ set(v "${_MSOMP_DLL_VERSION}")
+ set(vs "${_MSOMP_IDE_VERSION}")
+ set(MSVC_OPENMP_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC${vs}0.OPENMP")
if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
set(__install__libs ${__install__libs}
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 2ca3db8..8f2fcac 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,5 +1,5 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 8)
-set(CMake_VERSION_PATCH 20170323)
+set(CMake_VERSION_PATCH 20170327)
#set(CMake_VERSION_RC 1)
diff --git a/Source/CPack/WiX/cmWIXFilesSourceWriter.cxx b/Source/CPack/WiX/cmWIXFilesSourceWriter.cxx
index a471d26..3158343 100644
--- a/Source/CPack/WiX/cmWIXFilesSourceWriter.cxx
+++ b/Source/CPack/WiX/cmWIXFilesSourceWriter.cxx
@@ -9,9 +9,7 @@
#include <cmSystemTools.h>
#include <cmUuid.h>
-#include <sys/types.h>
-// include sys/stat.h after sys/types.h
-#include <sys/stat.h>
+#include "cm_sys_stat.h"
cmWIXFilesSourceWriter::cmWIXFilesSourceWriter(cmCPackLog* logger,
std::string const& filename,
diff --git a/Source/CPack/cmCPackCygwinSourceGenerator.cxx b/Source/CPack/cmCPackCygwinSourceGenerator.cxx
index 92475d9..bd22cec 100644
--- a/Source/CPack/cmCPackCygwinSourceGenerator.cxx
+++ b/Source/CPack/cmCPackCygwinSourceGenerator.cxx
@@ -15,7 +15,7 @@
// system tools because it is not implemented robustly enough to move
// files across directories.
#ifdef _WIN32
-#include <sys/stat.h>
+#include "cm_sys_stat.h"
#include <windows.h>
#endif
diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx
index 5c50da8..ed87238 100644
--- a/Source/CPack/cmCPackDebGenerator.cxx
+++ b/Source/CPack/cmCPackDebGenerator.cxx
@@ -8,6 +8,7 @@
#include "cmCPackLog.h"
#include "cmGeneratedFileStream.h"
#include "cmSystemTools.h"
+#include "cm_sys_stat.h"
#include <cmsys/Glob.hxx>
#include <limits.h>
@@ -16,7 +17,6 @@
#include <set>
#include <stdio.h>
#include <string.h>
-#include <sys/stat.h>
#include <utility>
// NOTE:
diff --git a/Source/CPack/cmCPackGenerator.h b/Source/CPack/cmCPackGenerator.h
index 57b8fff..39fd2cc 100644
--- a/Source/CPack/cmCPackGenerator.h
+++ b/Source/CPack/cmCPackGenerator.h
@@ -17,20 +17,6 @@ class cmCPackLog;
class cmInstalledFile;
class cmMakefile;
-#define cmCPackTypeMacro(klass, superclass) \
- typedef superclass Superclass; \
- const char* GetNameOfClass() CM_OVERRIDE { return #klass; } \
- static cmCPackGenerator* CreateGenerator() { return new klass; } \
- class cmCPackTypeMacro_UseTrailingSemicolon
-
-#define cmCPackLogger(logType, msg) \
- do { \
- std::ostringstream cmCPackLog_msg; \
- cmCPackLog_msg << msg; \
- this->Logger->Log(logType, __FILE__, __LINE__, \
- cmCPackLog_msg.str().c_str()); \
- } while (false)
-
/** \class cmCPackGenerator
* \brief A superclass of all CPack Generators
*
@@ -311,4 +297,18 @@ private:
cmMakefile* MakefileMap;
};
+#define cmCPackTypeMacro(klass, superclass) \
+ typedef superclass Superclass; \
+ const char* GetNameOfClass() CM_OVERRIDE { return #klass; } \
+ static cmCPackGenerator* CreateGenerator() { return new klass; } \
+ class cmCPackTypeMacro_UseTrailingSemicolon
+
+#define cmCPackLogger(logType, msg) \
+ do { \
+ std::ostringstream cmCPackLog_msg; \
+ cmCPackLog_msg << msg; \
+ this->Logger->Log(logType, __FILE__, __LINE__, \
+ cmCPackLog_msg.str().c_str()); \
+ } while (false)
+
#endif
diff --git a/Source/CPack/cmCPackOSXX11Generator.cxx b/Source/CPack/cmCPackOSXX11Generator.cxx
index 0d8dc48..8ea88a8 100644
--- a/Source/CPack/cmCPackOSXX11Generator.cxx
+++ b/Source/CPack/cmCPackOSXX11Generator.cxx
@@ -3,12 +3,12 @@
#include "cmCPackOSXX11Generator.h"
#include <sstream>
-#include <sys/stat.h>
#include "cmCPackGenerator.h"
#include "cmCPackLog.h"
#include "cmGeneratedFileStream.h"
#include "cmSystemTools.h"
+#include "cm_sys_stat.h"
cmCPackOSXX11Generator::cmCPackOSXX11Generator()
{
diff --git a/Source/CPack/cmCPackSTGZGenerator.cxx b/Source/CPack/cmCPackSTGZGenerator.cxx
index 682394e..2765e2a 100644
--- a/Source/CPack/cmCPackSTGZGenerator.cxx
+++ b/Source/CPack/cmCPackSTGZGenerator.cxx
@@ -8,13 +8,10 @@
#include <string>
#include <vector>
-#include <sys/types.h>
-// include sys/stat.h after sys/types.h
-#include <sys/stat.h>
-
#include "cmCPackGenerator.h"
#include "cmCPackLog.h"
#include "cmSystemTools.h"
+#include "cm_sys_stat.h"
cmCPackSTGZGenerator::cmCPackSTGZGenerator()
{
diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx
index cc399b0..88193b0 100644
--- a/Source/CTest/cmCTestSubmitHandler.cxx
+++ b/Source/CTest/cmCTestSubmitHandler.cxx
@@ -25,8 +25,8 @@
#if defined(CTEST_USE_XMLRPC)
#include "cmVersion.h"
+#include "cm_sys_stat.h"
#include <cm_xmlrpc.h>
-#include <sys/stat.h>
#endif
#define SUBMIT_TIMEOUT_IN_SECONDS_DEFAULT 120
diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx
index 5e03c39..b2f0b2d 100644
--- a/Source/QtDialog/CMakeSetup.cxx
+++ b/Source/QtDialog/CMakeSetup.cxx
@@ -184,9 +184,9 @@ int main(int argc, char** argv)
}
#if defined(Q_OS_MAC)
+#include "cm_sys_stat.h"
#include <errno.h>
#include <string.h>
-#include <sys/stat.h>
#include <unistd.h>
static bool cmOSXInstall(std::string const& dir, std::string const& tool)
{
diff --git a/Source/cmCTest.h b/Source/cmCTest.h
index ebdc8b0..be736da 100644
--- a/Source/cmCTest.h
+++ b/Source/cmCTest.h
@@ -20,22 +20,6 @@ class cmGeneratedFileStream;
class cmMakefile;
class cmXMLWriter;
-#define cmCTestLog(ctSelf, logType, msg) \
- do { \
- std::ostringstream cmCTestLog_msg; \
- cmCTestLog_msg << msg; \
- (ctSelf)->Log(cmCTest::logType, __FILE__, __LINE__, \
- cmCTestLog_msg.str().c_str()); \
- } while (false)
-
-#define cmCTestOptionalLog(ctSelf, logType, msg, suppress) \
- do { \
- std::ostringstream cmCTestLog_msg; \
- cmCTestLog_msg << msg; \
- (ctSelf)->Log(cmCTest::logType, __FILE__, __LINE__, \
- cmCTestLog_msg.str().c_str(), suppress); \
- } while (false)
-
/** \class cmCTest
* \brief Represents a ctest invocation.
*
@@ -647,4 +631,20 @@ inline std::ostream& operator<<(std::ostream& os, const cmCTestLogWrite& c)
return os;
}
+#define cmCTestLog(ctSelf, logType, msg) \
+ do { \
+ std::ostringstream cmCTestLog_msg; \
+ cmCTestLog_msg << msg; \
+ (ctSelf)->Log(cmCTest::logType, __FILE__, __LINE__, \
+ cmCTestLog_msg.str().c_str()); \
+ } while (false)
+
+#define cmCTestOptionalLog(ctSelf, logType, msg, suppress) \
+ do { \
+ std::ostringstream cmCTestLog_msg; \
+ cmCTestLog_msg << msg; \
+ (ctSelf)->Log(cmCTest::logType, __FILE__, __LINE__, \
+ cmCTestLog_msg.str().c_str(), suppress); \
+ } while (false)
+
#endif
diff --git a/Source/cmConfigure.cmake.h.in b/Source/cmConfigure.cmake.h.in
index 26f1df2..5f89ba1 100644
--- a/Source/cmConfigure.cmake.h.in
+++ b/Source/cmConfigure.cmake.h.in
@@ -3,7 +3,7 @@
#ifndef cmConfigure_h
#define cmConfigure_h
-#include <cmsys/Configure.hxx> // IWYU pragma: keep
+#include <cmsys/Configure.hxx> // IWYU pragma: export
#ifdef _MSC_VER
#pragma warning(disable : 4786)
diff --git a/Source/cmDynamicLoader.cxx b/Source/cmDynamicLoader.cxx
index a30b642..39a59fc 100644
--- a/Source/cmDynamicLoader.cxx
+++ b/Source/cmDynamicLoader.cxx
@@ -4,7 +4,6 @@
#include <cmConfigure.h>
-#include <cmsys/DynamicLoader.hxx>
#include <map>
#include <string>
#include <utility>
diff --git a/Source/cmDynamicLoader.h b/Source/cmDynamicLoader.h
index d14f81e..5d69400 100644
--- a/Source/cmDynamicLoader.h
+++ b/Source/cmDynamicLoader.h
@@ -10,7 +10,7 @@
#include <cmConfigure.h> // IWYU pragma: keep
-#include <cmsys/DynamicLoader.hxx>
+#include "cmsys/DynamicLoader.hxx" // IWYU pragma: export
class cmDynamicLoader
{
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 957b4cb..97292f9 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -16,10 +16,6 @@
#include <stdlib.h>
#include <string.h>
-#include <sys/types.h>
-// include sys/stat.h after sys/types.h
-#include <sys/stat.h>
-
#include "cmAlgorithms.h"
#include "cmCommandArgumentsHelper.h"
#include "cmCryptoHash.h"
@@ -35,6 +31,7 @@
#include "cmSystemTools.h"
#include "cmTimestamp.h"
#include "cm_auto_ptr.hxx"
+#include "cm_sys_stat.h"
#include "cmake.h"
#if defined(CMAKE_BUILD_WITH_CMAKE)
diff --git a/Source/cmFileTimeComparison.cxx b/Source/cmFileTimeComparison.cxx
index 991ebb8..ef4337b 100644
--- a/Source/cmFileTimeComparison.cxx
+++ b/Source/cmFileTimeComparison.cxx
@@ -10,7 +10,7 @@
// Use a platform-specific API to get file times efficiently.
#if !defined(_WIN32) || defined(__CYGWIN__)
-#include <sys/stat.h>
+#include "cm_sys_stat.h"
#define cmFileTimeComparison_Type struct stat
#else
#include <cmsys/Encoding.hxx>
diff --git a/Source/cmGeneratorExpressionEvaluationFile.h b/Source/cmGeneratorExpressionEvaluationFile.h
index 26135df..1223ffd 100644
--- a/Source/cmGeneratorExpressionEvaluationFile.h
+++ b/Source/cmGeneratorExpressionEvaluationFile.h
@@ -11,12 +11,7 @@
#include "cmGeneratorExpression.h"
#include "cm_auto_ptr.hxx"
-
-#if defined(_MSC_VER)
-typedef unsigned short mode_t;
-#else
-#include <sys/types.h>
-#endif
+#include "cm_sys_stat.h"
class cmLocalGenerator;
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index e27424f..f78a933 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -3315,8 +3315,18 @@ cmGeneratorTarget::GetTargetSourceFileFlags(const cmSourceFile* sf) const
// were not listed in one of the other lists.
if (const char* location = sf->GetProperty("MACOSX_PACKAGE_LOCATION")) {
flags.MacFolder = location;
+ const bool stripResources =
+ this->GlobalGenerator->ShouldStripResourcePath(this->Makefile);
if (strcmp(location, "Resources") == 0) {
flags.Type = cmGeneratorTarget::SourceFileTypeResource;
+ if (stripResources) {
+ flags.MacFolder = "";
+ }
+ } else if (cmSystemTools::StringStartsWith(location, "Resources/")) {
+ flags.Type = cmGeneratorTarget::SourceFileTypeDeepResource;
+ if (stripResources) {
+ flags.MacFolder += strlen("Resources/");
+ }
} else {
flags.Type = cmGeneratorTarget::SourceFileTypeMacContent;
}
@@ -3370,7 +3380,7 @@ void cmGeneratorTarget::ConstructSourceFileFlags() const
if (cmSourceFile* sf = this->Makefile->GetSource(*it)) {
SourceFileFlags& flags = this->SourceFlagsMap[sf];
flags.MacFolder = "";
- if (!this->Makefile->PlatformIsAppleIos()) {
+ if (!this->GlobalGenerator->ShouldStripResourcePath(this->Makefile)) {
flags.MacFolder = "Resources";
}
flags.Type = cmGeneratorTarget::SourceFileTypeResource;
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index 68d6ef8..d60ad24 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -422,7 +422,9 @@ public:
SourceFileTypePublicHeader, // is in "PUBLIC_HEADER" target property
SourceFileTypeResource, // is in "RESOURCE" target property *or*
// has MACOSX_PACKAGE_LOCATION=="Resources"
- SourceFileTypeMacContent // has MACOSX_PACKAGE_LOCATION!="Resources"
+ SourceFileTypeDeepResource, // MACOSX_PACKAGE_LOCATION starts with
+ // "Resources/"
+ SourceFileTypeMacContent // has MACOSX_PACKAGE_LOCATION!="Resources[/]"
};
struct SourceFileFlags
{
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 0d53bf7..851290a 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -2487,6 +2487,11 @@ std::string cmGlobalGenerator::GenerateRuleFile(
return ruleFile;
}
+bool cmGlobalGenerator::ShouldStripResourcePath(cmMakefile* mf) const
+{
+ return mf->PlatformIsAppleIos();
+}
+
std::string cmGlobalGenerator::GetSharedLibFlagsForLanguage(
std::string const& l) const
{
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index b3cb41f..2558fee 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -337,6 +337,10 @@ public:
relevant for mixed macOS and iOS builds. */
virtual bool UseEffectivePlatformName(cmMakefile*) const { return false; }
+ /** Return whether the "Resources" folder prefix should be stripped from
+ MacFolder. */
+ virtual bool ShouldStripResourcePath(cmMakefile*) const;
+
std::string GetSharedLibFlagsForLanguage(std::string const& lang) const;
/** Generate an <output>.rule file path for a given command output. */
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 77f3408..39f7b8f 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -1154,8 +1154,12 @@ bool cmGlobalXCodeGenerator::CreateXCodeTargets(
// dstPath in frameworks is relative to Versions/<version>
ostr << mit->first;
} else if (mit->first != "MacOS") {
- // dstPath in bundles is relative to Contents/MacOS
- ostr << "../" << mit->first.c_str();
+ if (gtgt->Target->GetMakefile()->PlatformIsAppleIos()) {
+ ostr << mit->first;
+ } else {
+ // dstPath in bundles is relative to Contents/MacOS
+ ostr << "../" << mit->first;
+ }
}
copyFilesBuildPhase->AddAttribute("dstPath",
this->CreateString(ostr.str()));
@@ -1173,6 +1177,45 @@ bool cmGlobalXCodeGenerator::CreateXCodeTargets(
}
}
+ // create vector of "resource content file" build phases - only for
+ // framework or bundle targets
+ if (isFrameworkTarget || isBundleTarget || isCFBundleTarget) {
+ typedef std::map<std::string, std::vector<cmSourceFile*> >
+ mapOfVectorOfSourceFiles;
+ mapOfVectorOfSourceFiles bundleFiles;
+ for (std::vector<cmSourceFile*>::const_iterator i = classes.begin();
+ i != classes.end(); ++i) {
+ cmGeneratorTarget::SourceFileFlags tsFlags =
+ gtgt->GetTargetSourceFileFlags(*i);
+ if (tsFlags.Type == cmGeneratorTarget::SourceFileTypeDeepResource) {
+ bundleFiles[tsFlags.MacFolder].push_back(*i);
+ }
+ }
+ mapOfVectorOfSourceFiles::iterator mit;
+ for (mit = bundleFiles.begin(); mit != bundleFiles.end(); ++mit) {
+ cmXCodeObject* copyFilesBuildPhase =
+ this->CreateObject(cmXCodeObject::PBXCopyFilesBuildPhase);
+ copyFilesBuildPhase->SetComment("Copy files");
+ copyFilesBuildPhase->AddAttribute("buildActionMask",
+ this->CreateString("2147483647"));
+ copyFilesBuildPhase->AddAttribute("dstSubfolderSpec",
+ this->CreateString("7"));
+ copyFilesBuildPhase->AddAttribute("dstPath",
+ this->CreateString(mit->first));
+ copyFilesBuildPhase->AddAttribute("runOnlyForDeploymentPostprocessing",
+ this->CreateString("0"));
+ buildFiles = this->CreateObject(cmXCodeObject::OBJECT_LIST);
+ copyFilesBuildPhase->AddAttribute("files", buildFiles);
+ std::vector<cmSourceFile*>::iterator sfIt;
+ for (sfIt = mit->second.begin(); sfIt != mit->second.end(); ++sfIt) {
+ cmXCodeObject* xsf = this->CreateXCodeSourceFile(
+ this->CurrentLocalGenerator, *sfIt, gtgt);
+ buildFiles->AddObject(xsf);
+ }
+ contentBuildPhases.push_back(copyFilesBuildPhase);
+ }
+ }
+
// create framework build phase
cmXCodeObject* frameworkBuildPhase = 0;
if (!externalObjFiles.empty()) {
@@ -3657,6 +3700,12 @@ bool cmGlobalXCodeGenerator::UseEffectivePlatformName(cmMakefile* mf) const
return cmSystemTools::IsOn(epnValue);
}
+bool cmGlobalXCodeGenerator::ShouldStripResourcePath(cmMakefile*) const
+{
+ // Xcode determines Resource location itself
+ return true;
+}
+
void cmGlobalXCodeGenerator::ComputeTargetObjectDirectory(
cmGeneratorTarget* gt) const
{
diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h
index 9eacdef..172e414 100644
--- a/Source/cmGlobalXCodeGenerator.h
+++ b/Source/cmGlobalXCodeGenerator.h
@@ -88,6 +88,8 @@ public:
bool UseEffectivePlatformName(cmMakefile* mf) const CM_OVERRIDE;
+ bool ShouldStripResourcePath(cmMakefile*) const CM_OVERRIDE;
+
bool SetGeneratorToolset(std::string const& ts, cmMakefile* mf) CM_OVERRIDE;
void AppendFlag(std::string& flags, std::string const& flag);
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index c4a488f..f7d822a 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -38,6 +38,7 @@
#include "cmVersion.h"
#include "cmWorkingDirectory.h"
#include "cm_auto_ptr.hxx"
+#include "cm_sys_stat.h"
#include "cmake.h"
#ifdef CMAKE_BUILD_WITH_CMAKE
diff --git a/Source/cmQtAutoGeneratorCommon.cxx b/Source/cmQtAutoGeneratorCommon.cxx
index dcd61a3..2498fe8 100644
--- a/Source/cmQtAutoGeneratorCommon.cxx
+++ b/Source/cmQtAutoGeneratorCommon.cxx
@@ -8,6 +8,7 @@
#include <cmsys/RegularExpression.hxx>
#include <sstream>
+#include <stddef.h>
// - Static functions
diff --git a/Source/cmQtAutoGeneratorCommon.h b/Source/cmQtAutoGeneratorCommon.h
index b54b6fa..b004005 100644
--- a/Source/cmQtAutoGeneratorCommon.h
+++ b/Source/cmQtAutoGeneratorCommon.h
@@ -3,13 +3,10 @@
#ifndef cmQtAutoGeneratorCommon_h
#define cmQtAutoGeneratorCommon_h
-#include <cmConfigure.h> // IWYU pragma: keep
+#include <cmConfigure.h>
#include <string>
#include <vector>
-class cmGeneratorTarget;
-class cmLocalGenerator;
-
class cmQtAutoGeneratorCommon
{
// - Types and statics
diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx
index 6ebc234..d69794c 100644
--- a/Source/cmQtAutoGeneratorInitializer.cxx
+++ b/Source/cmQtAutoGeneratorInitializer.cxx
@@ -7,15 +7,15 @@
#include "cmCustomCommandLines.h"
#include "cmFilePathChecksum.h"
#include "cmGeneratorTarget.h"
-#include "cmGlobalGenerator.h"
#include "cmLocalGenerator.h"
#include "cmMakefile.h"
#include "cmOutputConverter.h"
#include "cmSourceFile.h"
-#include "cmSourceFileLocation.h"
+#include "cmSourceGroup.h"
#include "cmState.h"
#include "cmSystemTools.h"
#include "cmTarget.h"
+#include "cm_sys_stat.h"
#include "cmake.h"
#if defined(_WIN32) && !defined(__CYGWIN__)
@@ -25,13 +25,9 @@
#include <algorithm>
#include <cmConfigure.h>
#include <cmsys/FStream.hxx>
-#include <cmsys/RegularExpression.hxx>
#include <map>
#include <set>
-#include <sstream>
-#include <string.h>
#include <string>
-#include <sys/stat.h>
#include <utility>
#include <vector>
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index b7afa10..ee751f2 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -4,6 +4,7 @@
#include "cmAlgorithms.h"
#include "cmProcessOutput.h"
+#include "cm_sys_stat.h"
#if defined(CMAKE_BUILD_WITH_CMAKE)
#include "cmArchiveWrite.h"
@@ -33,7 +34,6 @@
#include <cmsys/FStream.hxx>
#include <cmsys/RegularExpression.hxx>
#include <cmsys/System.h>
-#include <cmsys/SystemTools.hxx>
#include <cmsys/Terminal.h>
#include <ctype.h>
#include <errno.h>
@@ -43,7 +43,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <sys/stat.h>
#include <time.h>
#include <utility>
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h
index 10e8280..e93eaae 100644
--- a/Source/cmSystemTools.h
+++ b/Source/cmSystemTools.h
@@ -5,19 +5,13 @@
#include <cmConfigure.h> // IWYU pragma: keep
+#include "cmsys/SystemTools.hxx" // IWYU pragma: export
#include <cmProcessOutput.h>
#include <cmsys/Process.h>
-#include <cmsys/SystemTools.hxx>
#include <stddef.h>
#include <string>
#include <vector>
-#if defined(_MSC_VER)
-typedef unsigned short mode_t;
-#else
-#include <sys/types.h>
-#endif
-
class cmSystemToolsFileTime;
/** \class cmSystemTools
diff --git a/Source/cmWriteFileCommand.cxx b/Source/cmWriteFileCommand.cxx
index 96c8e27..ce2de57 100644
--- a/Source/cmWriteFileCommand.cxx
+++ b/Source/cmWriteFileCommand.cxx
@@ -4,12 +4,9 @@
#include <cmsys/FStream.hxx>
-#include <sys/types.h>
-// include sys/stat.h after sys/types.h
-#include <sys/stat.h>
-
#include "cmMakefile.h"
#include "cmSystemTools.h"
+#include "cm_sys_stat.h"
class cmExecutionStatus;
diff --git a/Source/cm_sys_stat.h b/Source/cm_sys_stat.h
new file mode 100644
index 0000000..26e4baa
--- /dev/null
+++ b/Source/cm_sys_stat.h
@@ -0,0 +1,14 @@
+/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+ file Copyright.txt or https://cmake.org/licensing for details. */
+#ifndef cm_sys_stat_h
+#define cm_sys_stat_h
+
+#if defined(_MSC_VER)
+typedef unsigned short mode_t;
+#endif
+
+#include <sys/types.h>
+// include sys/stat.h after sys/types.h
+#include <sys/stat.h>
+
+#endif
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 3af3be6..4363c12 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -25,6 +25,7 @@
#include "cmVersionConfig.h"
#include "cmWorkingDirectory.h"
#include "cm_auto_ptr.hxx"
+#include "cm_sys_stat.h"
#if defined(CMAKE_BUILD_WITH_CMAKE)
#include <cm_jsoncpp_writer.h>
@@ -106,10 +107,6 @@
#include <sys/time.h>
#endif
-#include <sys/types.h>
-// include sys/stat.h after sys/types.h
-#include <sys/stat.h> // struct stat
-
#include <algorithm>
#include <cmsys/FStream.hxx>
#include <cmsys/Glob.hxx>
diff --git a/Source/kwsys/.gitattributes b/Source/kwsys/.gitattributes
index a121ad1..3583f39 100644
--- a/Source/kwsys/.gitattributes
+++ b/Source/kwsys/.gitattributes
@@ -1,12 +1,15 @@
.git* export-ignore
-*.c whitespace=tab-in-indent,no-lf-at-eof
-*.h whitespace=tab-in-indent,no-lf-at-eof
-*.h.in whitespace=tab-in-indent,no-lf-at-eof
-*.cxx whitespace=tab-in-indent,no-lf-at-eof
-*.hxx whitespace=tab-in-indent,no-lf-at-eof
-*.hxx.in whitespace=tab-in-indent,no-lf-at-eof
-*.txt whitespace=tab-in-indent,no-lf-at-eof
-*.cmake whitespace=tab-in-indent,no-lf-at-eof
+*.c our-c-style
+*.c.in our-c-style
+*.cxx our-c-style
+*.h our-c-style
+*.h.in our-c-style
+*.hxx our-c-style
+*.hxx.in our-c-style
+*.cmake whitespace=tab-in-indent
*.rst whitespace=tab-in-indent conflict-marker-size=79
+*.txt whitespace=tab-in-indent
+
+* -format.clang-format
diff --git a/Source/kwsys/ConsoleBuf.hxx.in b/Source/kwsys/ConsoleBuf.hxx.in
index cb58865..32e680c 100644
--- a/Source/kwsys/ConsoleBuf.hxx.in
+++ b/Source/kwsys/ConsoleBuf.hxx.in
@@ -25,8 +25,7 @@ namespace @KWSYS_NAMESPACE@ {
#if defined(_WIN32)
template <class CharT, class Traits = std::char_traits<CharT> >
-class @KWSYS_NAMESPACE@_EXPORT BasicConsoleBuf
- : public std::basic_streambuf<CharT, Traits>
+class BasicConsoleBuf : public std::basic_streambuf<CharT, Traits>
{
public:
typedef typename Traits::int_type int_type;
diff --git a/Source/kwsys/Encoding.hxx.in b/Source/kwsys/Encoding.hxx.in
index 6639efd..bf93f50 100644
--- a/Source/kwsys/Encoding.hxx.in
+++ b/Source/kwsys/Encoding.hxx.in
@@ -13,7 +13,7 @@ class @KWSYS_NAMESPACE@_EXPORT Encoding
{
public:
// Container class for argc/argv.
- class CommandLineArguments
+ class @KWSYS_NAMESPACE@_EXPORT CommandLineArguments
{
public:
// On Windows, get the program command line arguments
diff --git a/Source/kwsys/FStream.hxx.in b/Source/kwsys/FStream.hxx.in
index 736214f..cf331a5 100644
--- a/Source/kwsys/FStream.hxx.in
+++ b/Source/kwsys/FStream.hxx.in
@@ -269,7 +269,7 @@ enum BOM
// If a BOM exists, the stream is advanced to after the BOM.
// This function requires a seekable stream (but not a relative
// seekable stream).
-BOM ReadBOM(std::istream& in);
+@KWSYS_NAMESPACE@_EXPORT BOM ReadBOM(std::istream& in);
}
}
diff --git a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
index fc90d09..a5b38fd 100644
--- a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
+++ b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
@@ -205,14 +205,14 @@ if(CPackGen MATCHES "RPM")
/usr/foo/bar/non_relocatable/depth_two
/usr/foo/bar/non_relocatable/depth_two/symlink_from_non_relocatable_path
/usr/foo/bar/other_relocatable
-/usr/foo/bar/other_relocatable/depth_two$")
+/usr/foo/bar/other_relocatable/depth_two(\n.*\.build-id.*)*$")
elseif(check_file_headers_match)
set(check_file_match_expected_summary ".*${CPACK_RPM_HEADERS_PACKAGE_SUMMARY}.*")
set(check_file_match_expected_description ".*${CPACK_RPM_HEADERS_PACKAGE_DESCRIPTION}.*")
set(check_file_match_expected_relocation_path "Relocations${whitespaces}:${whitespaces}${CPACK_PACKAGING_INSTALL_PREFIX}${whitespaces}${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}")
set(check_file_match_expected_architecture "noarch")
set(spec_regex "*headers*")
- set(check_content_list "^/usr/foo/bar\n/usr/foo/bar/include\n/usr/foo/bar/include/mylib.h$")
+ set(check_content_list "^/usr/foo/bar\n/usr/foo/bar/include\n/usr/foo/bar/include/mylib.h(\n.*\.build-id.*)*$")
elseif(check_file_applications_match)
set(check_file_match_expected_summary ".*${CPACK_RPM_PACKAGE_SUMMARY}.*")
set(check_file_match_expected_description ".*${CPACK_COMPONENT_APPLICATIONS_DESCRIPTION}.*")
@@ -221,7 +221,7 @@ if(CPackGen MATCHES "RPM")
set(spec_regex "*applications*")
set(check_content_list "^/usr/foo/bar
/usr/foo/bar/bin
-/usr/foo/bar/bin/mylibapp$")
+/usr/foo/bar/bin/mylibapp(\n.*\.build-id.*)*$")
elseif(check_file_Unspecified_match)
set(check_file_match_expected_summary ".*${CPACK_RPM_PACKAGE_SUMMARY}.*")
set(check_file_match_expected_description ".*DESCRIPTION.*")
@@ -241,7 +241,7 @@ if(CPackGen MATCHES "RPM")
/usr/foo/bar/share/man/mylib/man3
/usr/foo/bar/share/man/mylib/man3/mylib.1
/usr/foo/bar/share/man/mylib/man3/mylib.1/mylib
-/usr/foo/bar/share/man/mylib/man3/mylib.1/mylib2$")
+/usr/foo/bar/share/man/mylib/man3/mylib.1/mylib2(\n.*\.build-id.*)*$")
else()
message(FATAL_ERROR "error: unexpected rpm package '${check_file}'")
endif()
diff --git a/Tests/Cuda/ObjectLibrary/CMakeLists.txt b/Tests/Cuda/ObjectLibrary/CMakeLists.txt
index cbe1e67..1d93be7 100644
--- a/Tests/Cuda/ObjectLibrary/CMakeLists.txt
+++ b/Tests/Cuda/ObjectLibrary/CMakeLists.txt
@@ -10,3 +10,8 @@ add_library(CudaMixedObjectLib OBJECT static.cu static.cpp)
add_executable(CudaObjectLibrary
main.cpp
$<TARGET_OBJECTS:CudaMixedObjectLib>)
+if(APPLE)
+ # We need to add the default path to the driver (libcuda.dylib) as an rpath, so that
+ # the static cuda runtime can find it at runtime.
+ target_link_libraries(CudaObjectLibrary PRIVATE -Wl,-rpath,/usr/local/cuda/lib)
+endif()
diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt
index 86af746..101b396 100644
--- a/Tests/QtAutogen/CMakeLists.txt
+++ b/Tests/QtAutogen/CMakeLists.txt
@@ -82,9 +82,14 @@ target_compile_features(empty PRIVATE ${QT_COMPILE_FEATURES})
# -- Test
# When a file listed in a .qrc file changes the target must be rebuilt
+set(timeformat "%Y%j%H%M%S")
+set(RCC_DEPENDS_SRC "${CMAKE_CURRENT_SOURCE_DIR}/rccDepends")
+set(RCC_DEPENDS_BIN "${CMAKE_CURRENT_BINARY_DIR}/rccDepends")
+configure_file(${RCC_DEPENDS_SRC}/res1a.qrc.in ${RCC_DEPENDS_BIN}/res1.qrc COPYONLY)
+configure_file(${RCC_DEPENDS_SRC}/res2a.qrc.in ${RCC_DEPENDS_BIN}/res2.qrc.in COPYONLY)
try_compile(RCC_DEPENDS
- "${CMAKE_CURRENT_BINARY_DIR}/rccDepends"
- "${CMAKE_CURRENT_SOURCE_DIR}/rccDepends"
+ "${RCC_DEPENDS_BIN}"
+ "${RCC_DEPENDS_SRC}"
rccDepends
CMAKE_FLAGS "-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}"
"-DQT_TEST_VERSION=${QT_TEST_VERSION}"
@@ -94,47 +99,82 @@ try_compile(RCC_DEPENDS
if (NOT RCC_DEPENDS)
message(SEND_ERROR "Initial build of rccDepends failed. Output: ${output}")
endif()
-
# Get name and timestamp of the output binary
-file(STRINGS "${CMAKE_CURRENT_BINARY_DIR}/rccDepends/target1.txt" target1List)
-list(GET target1List 0 binFile)
-set(timeformat "%Y%j%H%M%S")
-file(TIMESTAMP "${binFile}" timeBegin "${timeformat}")
-
-# Touch first qrc input file and rebuild
+file(STRINGS "${RCC_DEPENDS_BIN}/target.txt" targetList)
+list(GET targetList 0 rccDependsBin)
+file(TIMESTAMP "${rccDependsBin}" timeBegin "${timeformat}")
+# Sleep, touch regular qrc input file, rebuild and compare timestamp
execute_process(COMMAND "${CMAKE_COMMAND}" -E sleep 1) # Ensure that the timestamp will change.
-execute_process(COMMAND "${CMAKE_COMMAND}" -E touch "${CMAKE_CURRENT_BINARY_DIR}/rccDepends/res1/input.txt")
-execute_process(COMMAND "${CMAKE_COMMAND}" --build .
- WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/rccDepends"
- RESULT_VARIABLE rccDepends_result
-)
-if (rccDepends_result)
+execute_process(COMMAND "${CMAKE_COMMAND}" -E touch "${RCC_DEPENDS_BIN}/res1/input.txt")
+execute_process(COMMAND "${CMAKE_COMMAND}" --build . WORKING_DIRECTORY "${RCC_DEPENDS_BIN}" RESULT_VARIABLE result)
+if (result)
message(SEND_ERROR "Second build of rccDepends failed.")
endif()
-# Compare timestamps
-file(TIMESTAMP "${binFile}" timeStep1 "${timeformat}")
+file(TIMESTAMP "${rccDependsBin}" timeStep1 "${timeformat}")
if (NOT timeStep1 GREATER timeBegin)
- message(SEND_ERROR "File (${binFile}) should have changed in the first step!")
+ message(SEND_ERROR "File (${rccDependsBin}) should have changed in the first step!")
endif()
-
-# Touch second qrc input file and rebuild
+# Sleep, update regular qrc file, rebuild and compare timestamp
execute_process(COMMAND "${CMAKE_COMMAND}" -E sleep 1) # Ensure that the timestamp will change.
-execute_process(COMMAND "${CMAKE_COMMAND}" -E touch "${CMAKE_CURRENT_BINARY_DIR}/rccDepends/res2/input.txt")
-execute_process(COMMAND "${CMAKE_COMMAND}" --build .
- WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/rccDepends"
- RESULT_VARIABLE rccDepends_result
-)
-if (rccDepends_result)
+configure_file(${RCC_DEPENDS_SRC}/res1b.qrc.in ${RCC_DEPENDS_BIN}/res1.qrc COPYONLY)
+execute_process(COMMAND "${CMAKE_COMMAND}" --build . WORKING_DIRECTORY "${RCC_DEPENDS_BIN}" RESULT_VARIABLE result)
+if (result)
message(SEND_ERROR "Third build of rccDepends failed.")
endif()
-# Compare timestamps
-file(TIMESTAMP "${binFile}" timeStep2 "${timeformat}")
+file(TIMESTAMP "${rccDependsBin}" timeStep2 "${timeformat}")
if (NOT timeStep2 GREATER timeStep1)
- message(SEND_ERROR "File (${binFile}) should have changed in the second step!")
+ message(SEND_ERROR "File (${rccDependsBin}) should have changed in the second step!")
+endif()
+# Sleep, touch regular qrc newly added input file, rebuild and compare timestamp
+execute_process(COMMAND "${CMAKE_COMMAND}" -E sleep 1) # Ensure that the timestamp will change.
+execute_process(COMMAND "${CMAKE_COMMAND}" -E touch "${RCC_DEPENDS_BIN}/res1/inputAdded.txt")
+execute_process(COMMAND "${CMAKE_COMMAND}" --build . WORKING_DIRECTORY "${RCC_DEPENDS_BIN}" RESULT_VARIABLE result)
+if (result)
+ message(SEND_ERROR "Fourth build of rccDepends failed.")
+endif()
+file(TIMESTAMP "${rccDependsBin}" timeStep3 "${timeformat}")
+if (NOT timeStep3 GREATER timeStep2)
+ message(SEND_ERROR "File (${rccDependsBin}) should have changed in the third step!")
+endif()
+# Sleep, touch generated qrc input file, rebuild and compare timestamp
+execute_process(COMMAND "${CMAKE_COMMAND}" -E sleep 1) # Ensure that the timestamp will change.
+execute_process(COMMAND "${CMAKE_COMMAND}" -E touch "${RCC_DEPENDS_BIN}/res2/input.txt")
+execute_process(COMMAND "${CMAKE_COMMAND}" --build . WORKING_DIRECTORY "${RCC_DEPENDS_BIN}" RESULT_VARIABLE result)
+if (result)
+ message(SEND_ERROR "Fifth build of rccDepends failed.")
+endif()
+file(TIMESTAMP "${rccDependsBin}" timeStep4 "${timeformat}")
+if (NOT timeStep4 GREATER timeStep3)
+ message(SEND_ERROR "File (${rccDependsBin}) should have changed in the fourth step!")
+endif()
+# Sleep, update generated qrc file, rebuild and compare timestamp
+execute_process(COMMAND "${CMAKE_COMMAND}" -E sleep 1) # Ensure that the timestamp will change.
+configure_file(${RCC_DEPENDS_SRC}/res2b.qrc.in ${RCC_DEPENDS_BIN}/res2.qrc.in COPYONLY)
+execute_process(COMMAND "${CMAKE_COMMAND}" --build . WORKING_DIRECTORY "${RCC_DEPENDS_BIN}" RESULT_VARIABLE result)
+if (result)
+ message(SEND_ERROR "Sixth build of rccDepends failed.")
+endif()
+file(TIMESTAMP "${rccDependsBin}" timeStep5 "${timeformat}")
+if (NOT timeStep5 GREATER timeStep4)
+ message(SEND_ERROR "File (${rccDependsBin}) should have changed in the fitfh step!")
+endif()
+# Sleep, touch generated qrc newly added input file, rebuild and compare timestamp
+execute_process(COMMAND "${CMAKE_COMMAND}" -E sleep 1) # Ensure that the timestamp will change.
+execute_process(COMMAND "${CMAKE_COMMAND}" -E touch "${RCC_DEPENDS_BIN}/res2/inputAdded.txt")
+execute_process(COMMAND "${CMAKE_COMMAND}" --build . WORKING_DIRECTORY "${RCC_DEPENDS_BIN}" RESULT_VARIABLE result)
+if (result)
+ message(SEND_ERROR "Seventh build of rccDepends failed.")
+endif()
+file(TIMESTAMP "${rccDependsBin}" timeStep6 "${timeformat}")
+if (NOT timeStep6 GREATER timeStep5)
+ message(SEND_ERROR "File (${rccDependsBin}) should have changed in the sixth step!")
endif()
+
# -- Test
# Ensure a repeated build succeeds when a header containing a QObject changes
+set(timeformat "%Y%j%H%M%S")
+configure_file(mocRerun/test1a.h.in mocRerun/test1.h COPYONLY)
try_compile(MOC_RERUN
"${CMAKE_CURRENT_BINARY_DIR}/mocRerun"
"${CMAKE_CURRENT_SOURCE_DIR}/mocRerun"
@@ -147,13 +187,10 @@ try_compile(MOC_RERUN
if (NOT MOC_RERUN)
message(SEND_ERROR "Initial build of mocRerun failed. Output: ${output}")
endif()
-
# Get name and timestamp of the output binary
file(STRINGS "${CMAKE_CURRENT_BINARY_DIR}/mocRerun/target1.txt" target1List)
list(GET target1List 0 binFile)
-set(timeformat "%Y%j%H%M%S")
file(TIMESTAMP "${binFile}" timeBegin "${timeformat}")
-
# Change file content and rebuild
execute_process(COMMAND "${CMAKE_COMMAND}" -E sleep 1)
configure_file(mocRerun/test1b.h.in mocRerun/test1.h COPYONLY)
@@ -164,7 +201,6 @@ execute_process(COMMAND "${CMAKE_COMMAND}" --build .
if (mocRerun_result)
message(SEND_ERROR "Second build of mocRerun failed.")
endif()
-
# Compare timestamps
file(TIMESTAMP "${binFile}" timeStep1 "${timeformat}")
if (NOT timeStep1 GREATER timeBegin)
diff --git a/Tests/QtAutogen/mocRerun/CMakeLists.txt b/Tests/QtAutogen/mocRerun/CMakeLists.txt
index 6689f50..69ea8d7 100644
--- a/Tests/QtAutogen/mocRerun/CMakeLists.txt
+++ b/Tests/QtAutogen/mocRerun/CMakeLists.txt
@@ -16,10 +16,9 @@ endif()
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
-configure_file(test1a.h.in test1.h COPYONLY)
# Generated source file
add_custom_command(OUTPUT main.cpp
- COMMAND ${CMAKE_COMMAND} -E sleep 3
+ COMMAND ${CMAKE_COMMAND} -E sleep 2
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp.in ${CMAKE_CURRENT_BINARY_DIR}/main.cpp
)
diff --git a/Tests/QtAutogen/rccDepends/CMakeLists.txt b/Tests/QtAutogen/rccDepends/CMakeLists.txt
index de98573..878ae5d 100644
--- a/Tests/QtAutogen/rccDepends/CMakeLists.txt
+++ b/Tests/QtAutogen/rccDepends/CMakeLists.txt
@@ -15,22 +15,21 @@ else()
set(QT_CORE_TARGET Qt5::Core)
endif()
-configure_file(res/input1.txt.in res1/input.txt @ONLY)
-configure_file(res/input2.txt.in res2/input.txt @ONLY)
-# Configure time generated qrc file
-configure_file(res1.qrc.in res1.qrc @ONLY)
+configure_file(res/input1.txt.in res1/input.txt COPYONLY)
+configure_file(res/input1.txt.in res1/inputAdded.txt COPYONLY)
+configure_file(res/input2.txt.in res2/input.txt COPYONLY)
+configure_file(res/input2.txt.in res2/inputAdded.txt COPYONLY)
# Dependency generated qrc file
add_custom_command(OUTPUT res2.qrc
- COMMAND ${CMAKE_COMMAND} -E sleep 3
- COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/res2.qrc.in ${CMAKE_CURRENT_BINARY_DIR}/res2.qrc
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/res2.qrc.in
+ COMMAND ${CMAKE_COMMAND} -E sleep 2
+ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/res2.qrc.in ${CMAKE_CURRENT_BINARY_DIR}/res2.qrc
)
-
add_executable(rccDepends
main.cpp
${CMAKE_CURRENT_BINARY_DIR}/res1.qrc
- ${CMAKE_CURRENT_BINARY_DIR}/res2.qrc
-)
+ ${CMAKE_CURRENT_BINARY_DIR}/res2.qrc )
target_link_libraries(rccDepends ${QT_CORE_TARGET})
add_custom_command(TARGET rccDepends POST_BUILD COMMAND
- ${CMAKE_COMMAND} -E echo "$<TARGET_FILE:rccDepends>" > target1.txt)
+ ${CMAKE_COMMAND} -E echo "$<TARGET_FILE:rccDepends>" > target.txt)
diff --git a/Tests/QtAutogen/rccDepends/res1.qrc.in b/Tests/QtAutogen/rccDepends/res1a.qrc.in
index 2a5417b..d111ffb 100644
--- a/Tests/QtAutogen/rccDepends/res1.qrc.in
+++ b/Tests/QtAutogen/rccDepends/res1a.qrc.in
@@ -1,5 +1,5 @@
<RCC>
- <qresource prefix="/">
+ <qresource prefix="/Texts1">
<file>res1/input.txt</file>
</qresource>
</RCC>
diff --git a/Tests/QtAutogen/rccDepends/res1b.qrc.in b/Tests/QtAutogen/rccDepends/res1b.qrc.in
new file mode 100644
index 0000000..4cb3f04
--- /dev/null
+++ b/Tests/QtAutogen/rccDepends/res1b.qrc.in
@@ -0,0 +1,6 @@
+<RCC>
+ <qresource prefix="/Texts1">
+ <file>res1/input.txt</file>
+ <file alias="Added">res1/inputAdded.txt</file>
+ </qresource>
+</RCC>
diff --git a/Tests/QtAutogen/rccDepends/res2.qrc.in b/Tests/QtAutogen/rccDepends/res2a.qrc.in
index 18b916a..19f34ac 100644
--- a/Tests/QtAutogen/rccDepends/res2.qrc.in
+++ b/Tests/QtAutogen/rccDepends/res2a.qrc.in
@@ -1,5 +1,5 @@
<RCC>
- <qresource prefix="/">
+ <qresource prefix="/Texts2">
<file>res2/input.txt</file>
</qresource>
</RCC>
diff --git a/Tests/QtAutogen/rccDepends/res2b.qrc.in b/Tests/QtAutogen/rccDepends/res2b.qrc.in
new file mode 100644
index 0000000..19e8ba1
--- /dev/null
+++ b/Tests/QtAutogen/rccDepends/res2b.qrc.in
@@ -0,0 +1,6 @@
+<RCC>
+ <qresource prefix="/Texts2">
+ <file>res2/input.txt</file>
+ <file alias="Added">res2/inputAdded.txt</file>
+ </qresource>
+</RCC>
diff --git a/Tests/RunCMake/CPack/RPM/Helpers.cmake b/Tests/RunCMake/CPack/RPM/Helpers.cmake
index bbc358c8..d8012b1 100644
--- a/Tests/RunCMake/CPack/RPM/Helpers.cmake
+++ b/Tests/RunCMake/CPack/RPM/Helpers.cmake
@@ -36,6 +36,10 @@ function(getPackageContentList FILE RESULT_VAR)
OUTPUT_STRIP_TRAILING_WHITESPACE)
string(REGEX REPLACE "\n" ";" package_content_ "${package_content_}")
+ # never versions of rpmbuild (introduced in rpm 4.13.0.1) add build_id links
+ # to packages - tests should ignore them
+ list(FILTER package_content_ EXCLUDE REGEX ".*\.build-id.*")
+
set(${RESULT_VAR} "${package_content_}" PARENT_SCOPE)
endfunction()
diff --git a/Tests/RunCMake/CPack/tests/SOURCE_PACKAGE/VerifyResult.cmake b/Tests/RunCMake/CPack/tests/SOURCE_PACKAGE/VerifyResult.cmake
index bc54d79..73d7481 100644
--- a/Tests/RunCMake/CPack/tests/SOURCE_PACKAGE/VerifyResult.cmake
+++ b/Tests/RunCMake/CPack/tests/SOURCE_PACKAGE/VerifyResult.cmake
@@ -21,7 +21,9 @@ execute_process(COMMAND ${RPMBUILD_EXECUTABLE} --define "_topdir ${CMAKE_CURRENT
set(output_error_message_
"\n${RPMBUILD_EXECUTABLE} error: '${error_}';\nresult: '${result_}';\n${output_error_message}")
-set(EXPECTED_FILE_CONTENT_ "^/foo${whitespaces_}/foo/test_prog$")
+# expected file content are test_prog and optional build-id links that are
+# generated by rpmbuild (introduced in rpm 4.13.0.1)
+set(EXPECTED_FILE_CONTENT_ "^/foo${whitespaces_}/foo/test_prog(${whitespaces_}.*\.build-id.*)*$")
file(GLOB_RECURSE FOUND_FILE_ RELATIVE "${CMAKE_CURRENT_BINARY_DIR}/test_rpm/RPMS" "${CMAKE_CURRENT_BINARY_DIR}/test_rpm/RPMS/*.rpm")
list(APPEND foundFiles_ "${FOUND_FILE_}")
diff --git a/Tests/RunCMake/Framework/FrameworkLayout.cmake b/Tests/RunCMake/Framework/FrameworkLayout.cmake
index ae32134..dcfbd2d 100644
--- a/Tests/RunCMake/Framework/FrameworkLayout.cmake
+++ b/Tests/RunCMake/Framework/FrameworkLayout.cmake
@@ -4,11 +4,17 @@ enable_language(C)
add_library(Framework ${FRAMEWORK_TYPE}
foo.c
foo.h
- res.txt)
+ res.txt
+ flatresource.txt
+ deepresource.txt
+ some.txt)
set_target_properties(Framework PROPERTIES
FRAMEWORK TRUE
PUBLIC_HEADER foo.h
RESOURCE "res.txt")
+set_source_files_properties(flatresource.txt PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
+set_source_files_properties(deepresource.txt PROPERTIES MACOSX_PACKAGE_LOCATION Resources/deep)
+set_source_files_properties(some.txt PROPERTIES MACOSX_PACKAGE_LOCATION somedir)
add_custom_command(TARGET Framework POST_BUILD
COMMAND /usr/bin/file $<TARGET_FILE:Framework>)
diff --git a/Tests/RunCMake/Framework/OSXFrameworkLayout-build-check.cmake b/Tests/RunCMake/Framework/OSXFrameworkLayout-build-check.cmake
index da1ccb4..1a543d8 100644
--- a/Tests/RunCMake/Framework/OSXFrameworkLayout-build-check.cmake
+++ b/Tests/RunCMake/Framework/OSXFrameworkLayout-build-check.cmake
@@ -1,8 +1,11 @@
set(framework-dir "${RunCMake_TEST_BINARY_DIR}/Framework.framework")
set(framework-resources "${framework-dir}/Resources")
set(framework-resource-file "${framework-resources}/res.txt")
+set(framework-flat-resource-file "${framework-resources}/flatresource.txt")
+set(framework-deep-resource-file "${framework-resources}/deep/deepresource.txt")
set(framework-library "${framework-dir}/Framework")
set(framework-versions "${framework-dir}/Versions")
+set(framework-some-file "${framework-versions}/Current/somedir/some.txt")
set(plist-file "${framework-resources}/Info.plist")
set(framework-header "${framework-dir}/Headers/foo.h")
@@ -22,6 +25,18 @@ if(NOT EXISTS ${framework-resource-file})
message(SEND_ERROR "Framework resource file not found at ${framework-resource-file}")
endif()
+if(NOT EXISTS ${framework-flat-resource-file})
+ message(SEND_ERROR "Framework flat resource file not found at ${framework-flat-resource-file}")
+endif()
+
+if(NOT EXISTS ${framework-deep-resource-file})
+ message(SEND_ERROR "Framework deep resource file not found at ${framework-deep-resource-file}")
+endif()
+
+if(NOT EXISTS ${framework-some-file})
+ message(SEND_ERROR "Framework some file not found at ${framework-some-file}")
+endif()
+
if(NOT EXISTS ${framework-versions})
message(SEND_ERROR "Framework versions not found at ${framework-versions}")
endif()
diff --git a/Tests/RunCMake/Framework/deepresource.txt b/Tests/RunCMake/Framework/deepresource.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/Framework/deepresource.txt
diff --git a/Tests/RunCMake/Framework/flatresource.txt b/Tests/RunCMake/Framework/flatresource.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/Framework/flatresource.txt
diff --git a/Tests/RunCMake/Framework/iOSFrameworkLayout-build-check.cmake b/Tests/RunCMake/Framework/iOSFrameworkLayout-build-check.cmake
index b81a5f7..e068a3a 100644
--- a/Tests/RunCMake/Framework/iOSFrameworkLayout-build-check.cmake
+++ b/Tests/RunCMake/Framework/iOSFrameworkLayout-build-check.cmake
@@ -1,6 +1,9 @@
set(framework-dir "${RunCMake_TEST_BINARY_DIR}/Framework.framework")
set(framework-resources "${framework-dir}/Resources")
set(framework-resource-file "${framework-dir}/res.txt")
+set(framework-flat-resource-file "${framework-dir}/flatresource.txt")
+set(framework-deep-resource-file "${framework-dir}/deep/deepresource.txt")
+set(framework-some-file "${framework-dir}/somedir/some.txt")
set(framework-library "${framework-dir}/Framework")
set(framework-versions "${framework-dir}/Versions")
set(plist-file "${framework-dir}/Info.plist")
@@ -22,6 +25,18 @@ if(NOT EXISTS ${framework-resource-file})
message(SEND_ERROR "Framework resource file not found at ${framework-resource-file}")
endif()
+if(NOT EXISTS ${framework-flat-resource-file})
+ message(SEND_ERROR "Framework flat resource file not found at ${framework-flat-resource-file}")
+endif()
+
+if(NOT EXISTS ${framework-deep-resource-file})
+ message(SEND_ERROR "Framework deep resource file not found at ${framework-deep-resource-file}")
+endif()
+
+if(NOT EXISTS ${framework-some-file})
+ message(SEND_ERROR "Framework some file not found at ${framework-some-file}")
+endif()
+
if(EXISTS ${framework-versions})
message(SEND_ERROR "Framework versions found at ${framework-versions}")
endif()
diff --git a/Tests/RunCMake/Framework/some.txt b/Tests/RunCMake/Framework/some.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/Framework/some.txt
diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake
index 5f66da0..9e2fe7a 100644
--- a/Tests/RunCMake/RunCMake.cmake
+++ b/Tests/RunCMake/RunCMake.cmake
@@ -101,7 +101,7 @@ function(run_cmake test)
endif()
foreach(o out err)
string(REGEX REPLACE "\r\n" "\n" actual_std${o} "${actual_std${o}}")
- string(REGEX REPLACE "(^|\n)((==[0-9]+==|BullseyeCoverage|[a-z]+\\([0-9]+\\) malloc:|Error kstat returned|[^\n]*is a member of multiple groups|[^\n]*from Time Machine by path|[^\n]*Bullseye Testing Technology)[^\n]*\n)+" "\\1" actual_std${o} "${actual_std${o}}")
+ string(REGEX REPLACE "(^|\n)((==[0-9]+==|BullseyeCoverage|[a-z]+\\([0-9]+\\) malloc:|Error kstat returned|Hit xcodebuild bug|[^\n]*is a member of multiple groups|[^\n]*from Time Machine by path|[^\n]*Bullseye Testing Technology)[^\n]*\n)+" "\\1" actual_std${o} "${actual_std${o}}")
string(REGEX REPLACE "\n+$" "" actual_std${o} "${actual_std${o}}")
set(expect_${o} "")
if(DEFINED expect_std${o})
diff --git a/Tests/SimpleInstall/CMakeLists.txt b/Tests/SimpleInstall/CMakeLists.txt
index 4cf7355..f8068b1 100644
--- a/Tests/SimpleInstall/CMakeLists.txt
+++ b/Tests/SimpleInstall/CMakeLists.txt
@@ -365,6 +365,7 @@ set(CPACK_PACKAGE_EXECUTABLES "SimpleInstall" "Simple Install")
set(CMAKE_INSTALL_MFC_LIBRARIES 1)
set(CMAKE_INSTALL_DEBUG_LIBRARIES 1)
set(CMAKE_INSTALL_UCRT_LIBRARIES 1)
+set(CMAKE_INSTALL_OPENMP_LIBRARIES 1)
include(InstallRequiredSystemLibraries)
if(CTEST_TEST_CPACK)
diff --git a/Utilities/Release/release_cmake.cmake b/Utilities/Release/release_cmake.cmake
index ee1a0dc..b2c21b7 100644
--- a/Utilities/Release/release_cmake.cmake
+++ b/Utilities/Release/release_cmake.cmake
@@ -40,7 +40,8 @@ elseif(CMAKE_CREATE_VERSION STREQUAL "nightly")
set(GIT_FETCH "${GIT_COMMAND} fetch origin refs/${nightly}:refs/remotes/origin/${nightly}")
set(GIT_BRANCH origin/${nightly})
else()
- set(GIT_FETCH "")
+ set(stage stage/master/head)
+ set(GIT_FETCH "${GIT_COMMAND} fetch origin refs/${stage}:refs/remotes/origin/${stage}")
set(GIT_BRANCH ${CMAKE_CREATE_VERSION})
endif()
diff --git a/Utilities/Scripts/update-kwsys.bash b/Utilities/Scripts/update-kwsys.bash
index 83da8a4..d5485aa 100755
--- a/Utilities/Scripts/update-kwsys.bash
+++ b/Utilities/Scripts/update-kwsys.bash
@@ -15,6 +15,7 @@ readonly paths="
extract_source () {
git_archive
+ disable_custom_gitattributes
}
export HOOKS_ALLOW_KWSYS=1
diff --git a/Utilities/Scripts/update-third-party.bash b/Utilities/Scripts/update-third-party.bash
index 3b8358e..670946e 100644
--- a/Utilities/Scripts/update-third-party.bash
+++ b/Utilities/Scripts/update-third-party.bash
@@ -52,6 +52,14 @@ git_archive () {
tar -C "$extractdir" -x
}
+disable_custom_gitattributes() {
+ pushd "${extractdir}/${name}-reduced"
+ # Git does not allow custom attributes in a subdirectory where we
+ # are about to merge the `.gitattributes` file, so disable them.
+ sed -i '/^\[attr\]/ {s/^/#/}' .gitattributes
+ popd
+}
+
die () {
echo >&2 "$@"
exit 1