summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Auxiliary/cmake-mode.el3
-rw-r--r--Modules/CMakeIOSInstallCombined.cmake12
-rw-r--r--Modules/GenerateExportHeader.cmake4
-rw-r--r--Modules/exportheader.cmake.in7
-rw-r--r--Source/CMakeLists.txt2
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/CPack/cmCPackDragNDropGenerator.cxx21
-rw-r--r--Source/QtDialog/CMakeLists.txt1
-rw-r--r--Source/cmCreateTestSourceList.cxx3
-rw-r--r--Source/cmExtraCodeBlocksGenerator.cxx3
-rw-r--r--Source/cmGeneratorTarget.cxx3
-rw-r--r--Source/cmGlobalGenerator.cxx2
-rw-r--r--Source/cmGlobalVisualStudioGenerator.cxx3
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx3
-rw-r--r--Source/cmMakefile.cxx20
-rw-r--r--Source/cmQtAutoGeneratorInitializer.cxx3
-rw-r--r--Source/cmake.cxx3
-rw-r--r--Tests/Module/GenerateExportHeader/reference/Empty/libshared_export.h7
-rw-r--r--Tests/Module/GenerateExportHeader/reference/Empty/libstatic_export.h7
-rw-r--r--Tests/Module/GenerateExportHeader/reference/MinGW/libshared_export.h7
-rw-r--r--Tests/Module/GenerateExportHeader/reference/MinGW/libstatic_export.h7
-rw-r--r--Tests/Module/GenerateExportHeader/reference/UNIX/libshared_export.h7
-rw-r--r--Tests/Module/GenerateExportHeader/reference/UNIX/libstatic_export.h7
-rw-r--r--Tests/Module/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libshared_export.h7
-rw-r--r--Tests/Module/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libstatic_export.h7
-rw-r--r--Tests/Module/GenerateExportHeader/reference/Win32-Clang/libshared_export.h7
-rw-r--r--Tests/Module/GenerateExportHeader/reference/Win32-Clang/libstatic_export.h7
-rw-r--r--Tests/Module/GenerateExportHeader/reference/Win32/libshared_export.h7
-rw-r--r--Tests/Module/GenerateExportHeader/reference/Win32/libstatic_export.h7
-rw-r--r--Tests/Module/GenerateExportHeader/reference/WinEmpty/libshared_export.h7
-rw-r--r--Tests/Module/GenerateExportHeader/reference/WinEmpty/libstatic_export.h7
-rw-r--r--Tests/RunCMake/XcodeProject/RunCMakeTest.cmake20
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch-install-check.cmake25
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch.cmake19
34 files changed, 166 insertions, 91 deletions
diff --git a/Auxiliary/cmake-mode.el b/Auxiliary/cmake-mode.el
index 08ac490..d74dba0 100644
--- a/Auxiliary/cmake-mode.el
+++ b/Auxiliary/cmake-mode.el
@@ -304,7 +304,8 @@ and store the result as a list in LISTVAR."
(save-window-excursion
(cmake-command-run (concat "--help-" listname "-list") nil temp-buffer-name)
(with-current-buffer temp-buffer-name
- (set listvar (cdr (split-string (buffer-substring-no-properties (point-min) (point-max)) "\n" t))))))
+ ; FIXME: Ignore first line if it is "cmake version ..." from CMake < 3.0.
+ (set listvar (split-string (buffer-substring-no-properties (point-min) (point-max)) "\n" t)))))
(symbol-value listvar)
))
)
diff --git a/Modules/CMakeIOSInstallCombined.cmake b/Modules/CMakeIOSInstallCombined.cmake
index f052a3b..1256f56 100644
--- a/Modules/CMakeIOSInstallCombined.cmake
+++ b/Modules/CMakeIOSInstallCombined.cmake
@@ -52,7 +52,14 @@ function(_ios_install_combined_get_build_setting sdk variable resultvar)
endif()
if(NOT output MATCHES " ${variable} = ([^\n]*)")
- message(FATAL_ERROR "${variable} not found.")
+ if("${variable}" STREQUAL "VALID_ARCHS")
+ # VALID_ARCHS may be unset by user for given SDK
+ # (e.g. for build without simulator).
+ set("${resultvar}" "" PARENT_SCOPE)
+ return()
+ else()
+ message(FATAL_ERROR "${variable} not found.")
+ endif()
endif()
set("${resultvar}" "${CMAKE_MATCH_1}" PARENT_SCOPE)
@@ -72,6 +79,9 @@ function(_ios_install_combined_get_valid_archs sdk resultvar)
list(REMOVE_ITEM valid_archs "") # remove empty elements
list(REMOVE_DUPLICATES valid_archs)
+ string(REPLACE ";" " " printable "${valid_archs}")
+ _ios_install_combined_message("Architectures (${sdk}): ${printable}")
+
set("${resultvar}" "${valid_archs}" PARENT_SCOPE)
endfunction()
diff --git a/Modules/GenerateExportHeader.cmake b/Modules/GenerateExportHeader.cmake
index 4f4efbc..6389d30 100644
--- a/Modules/GenerateExportHeader.cmake
+++ b/Modules/GenerateExportHeader.cmake
@@ -341,7 +341,9 @@ macro(_DO_GENERATE_EXPORT_HEADER TARGET_LIBRARY)
string(MAKE_C_IDENTIFIER ${STATIC_DEFINE} STATIC_DEFINE)
if(_GEH_DEFINE_NO_DEPRECATED)
- set(DEFINE_NO_DEPRECATED TRUE)
+ set(DEFINE_NO_DEPRECATED 1)
+ else()
+ set(DEFINE_NO_DEPRECATED 0)
endif()
if(_GEH_NO_DEPRECATED_MACRO_NAME)
diff --git a/Modules/exportheader.cmake.in b/Modules/exportheader.cmake.in
index 118de16..7cfbcbd 100644
--- a/Modules/exportheader.cmake.in
+++ b/Modules/exportheader.cmake.in
@@ -33,9 +33,10 @@
# define @DEPRECATED_MACRO_NAME@_NO_EXPORT @NO_EXPORT_MACRO_NAME@ @DEPRECATED_MACRO_NAME@
#endif
-#cmakedefine01 DEFINE_NO_DEPRECATED
-#if DEFINE_NO_DEPRECATED
-# define @NO_DEPRECATED_MACRO_NAME@
+#if @DEFINE_NO_DEPRECATED@ /* DEFINE_NO_DEPRECATED */
+# ifndef @NO_DEPRECATED_MACRO_NAME@
+# define @NO_DEPRECATED_MACRO_NAME@
+# endif
#endif
#endif
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 6129293..8dd58af 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -724,7 +724,7 @@ endif()
add_library(CPackLib ${CPACK_SRCS})
target_link_libraries(CPackLib CMakeLib)
if(APPLE)
- target_link_libraries(CPackLib "-framework Carbon")
+ target_link_libraries(CPackLib "-framework CoreServices")
endif()
if(APPLE)
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 5bdaeac..e667257 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 5)
-set(CMake_VERSION_PATCH 20160316)
+set(CMake_VERSION_PATCH 20160318)
#set(CMake_VERSION_RC 1)
diff --git a/Source/CPack/cmCPackDragNDropGenerator.cxx b/Source/CPack/cmCPackDragNDropGenerator.cxx
index 7b94ca3..521b395 100644
--- a/Source/CPack/cmCPackDragNDropGenerator.cxx
+++ b/Source/CPack/cmCPackDragNDropGenerator.cxx
@@ -20,21 +20,12 @@
#include <iomanip>
-#include <CoreFoundation/CFBase.h>
-#include <CoreFoundation/CFString.h>
-#include <CoreFoundation/CFLocale.h>
-
-// The carbon framework is deprecated, but the Region codes it supplies are
-// needed for the LPic data structure used for generating multi-lingual SLAs.
-// There does not seem to be a replacement API for these region codes.
-#if defined(__clang__)
-# pragma clang diagnostic push
-# pragma clang diagnostic ignored "-Wdeprecated-declarations"
-#endif
-#include <Carbon/Carbon.h>
-#if defined(__clang__)
-# pragma clang diagnostic pop
-#endif
+#include <CoreFoundation/CoreFoundation.h>
+
+// For the old LocaleStringToLangAndRegionCodes() function, to convert
+// to the old Script Manager RegionCode values needed for the 'LPic' data
+// structure used for generating multi-lingual SLAs.
+#include <CoreServices/CoreServices.h>
static const char* SLAHeader =
"data 'LPic' (5000) {\n"
diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt
index f17de5d..a906f4a 100644
--- a/Source/QtDialog/CMakeLists.txt
+++ b/Source/QtDialog/CMakeLists.txt
@@ -173,6 +173,7 @@ if(APPLE)
MACOSX_BUNDLE_SHORT_VERSION_STRING "${CMAKE_BUNDLE_VERSION}"
# TBD: MACOSX_BUNDLE_BUNDLE_VERSION "${CMAKE_BUNDLE_VERSION}"
MACOSX_BUNDLE_COPYRIGHT "${copyright_line}"
+ MACOSX_BUNDLE_GUI_IDENTIFIER "org.cmake.cmake"
)
# Create a symlink in the build tree to provide a "cmake-gui" next
diff --git a/Source/cmCreateTestSourceList.cxx b/Source/cmCreateTestSourceList.cxx
index 54c27d6..e670991 100644
--- a/Source/cmCreateTestSourceList.cxx
+++ b/Source/cmCreateTestSourceList.cxx
@@ -78,8 +78,7 @@ bool cmCreateTestSourceList
driver += *i;
++i;
- std::string configFile =
- this->Makefile->GetRequiredDefinition("CMAKE_ROOT");
+ std::string configFile = cmSystemTools::GetCMakeRoot();
configFile += "/Templates/TestDriver.cxx.in";
// Create the test driver file
diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx
index ed0c69c..476d3ac 100644
--- a/Source/cmExtraCodeBlocksGenerator.cxx
+++ b/Source/cmExtraCodeBlocksGenerator.cxx
@@ -259,13 +259,12 @@ void cmExtraCodeBlocksGenerator
}
// Convert
- const char* cmakeRoot = mf->GetDefinition("CMAKE_ROOT");
for (std::vector<std::string>::const_iterator jt = listFiles.begin();
jt != listFiles.end();
++jt)
{
// don't put cmake's own files into the project (#12110):
- if (jt->find(cmakeRoot) == 0)
+ if (jt->find(cmSystemTools::GetCMakeRoot()) == 0)
{
continue;
}
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index ff12320..d7c2782 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -3909,8 +3909,7 @@ void checkPropertyConsistency(cmGeneratorTarget const* depender,
std::vector<std::string> props;
cmSystemTools::ExpandListArgument(prop, props);
- std::string pdir =
- dependee->Target->GetMakefile()->GetRequiredDefinition("CMAKE_ROOT");
+ std::string pdir = cmSystemTools::GetCMakeRoot();
pdir += "/Help/prop_tgt/";
for(std::vector<std::string>::iterator pi = props.begin();
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index c628406..1d0ade4 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -820,7 +820,7 @@ cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
// Now load files that can override any settings on the platform or for
// the project First load the project compatibility file if it is in
// cmake
- std::string projectCompatibility = mf->GetDefinition("CMAKE_ROOT");
+ std::string projectCompatibility = cmSystemTools::GetCMakeRoot();
projectCompatibility += "/Modules/";
projectCompatibility += mf->GetSafeDefinition("PROJECT_NAME");
projectCompatibility += "Compatibility.cmake";
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index 6a1aa29..00bb511 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -184,12 +184,11 @@ void RegisterVisualStudioMacros(const std::string& macrosFile,
//----------------------------------------------------------------------------
void cmGlobalVisualStudioGenerator::ConfigureCMakeVisualStudioMacros()
{
- cmMakefile* mf = this->LocalGenerators[0]->GetMakefile();
std::string dir = this->GetUserMacrosDirectory();
if (dir != "")
{
- std::string src = mf->GetRequiredDefinition("CMAKE_ROOT");
+ std::string src = cmSystemTools::GetCMakeRoot();
src += "/Templates/" CMAKE_VSMACROS_FILENAME;
std::string dst = dir + "/CMakeMacros/" CMAKE_VSMACROS_FILENAME;
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index 3e5611b..abae564 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -1389,7 +1389,8 @@ void cmLocalVisualStudio7Generator::OutputDeploymentDebuggerTool(
"\t\t\t\tRegisterOutput=\"0\"\n"
"\t\t\t\tAdditionalFiles=\"\"/>\n"
;
- std::string const exe = dir + std::string("\\") + target->GetFullName();
+ std::string const exe =
+ dir + std::string("\\") + target->GetFullName(config);
fout <<
"\t\t\t<DebuggerTool\n"
"\t\t\t\tRemoteExecutable=\"" << this->EscapeForXML(exe) << "\"\n"
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 8f59e2c..1df5cec 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -3738,17 +3738,13 @@ std::string cmMakefile::GetModulesFile(const char* filename) const
}
// Always search in the standard modules location.
- const char* cmakeRoot = this->GetDefinition("CMAKE_ROOT");
- if(cmakeRoot)
- {
- moduleInCMakeRoot = cmakeRoot;
- moduleInCMakeRoot += "/Modules/";
- moduleInCMakeRoot += filename;
- cmSystemTools::ConvertToUnixSlashes(moduleInCMakeRoot);
- if(!cmSystemTools::FileExists(moduleInCMakeRoot.c_str()))
- {
- moduleInCMakeRoot = "";
- }
+ moduleInCMakeRoot = cmSystemTools::GetCMakeRoot();
+ moduleInCMakeRoot += "/Modules/";
+ moduleInCMakeRoot += filename;
+ cmSystemTools::ConvertToUnixSlashes(moduleInCMakeRoot);
+ if(!cmSystemTools::FileExists(moduleInCMakeRoot.c_str()))
+ {
+ moduleInCMakeRoot = "";
}
// Normally, prefer the files found in CMAKE_MODULE_PATH. Only when the file
@@ -3763,7 +3759,7 @@ std::string cmMakefile::GetModulesFile(const char* filename) const
if (!moduleInCMakeModulePath.empty() && !moduleInCMakeRoot.empty())
{
const char* currentFile = this->GetDefinition("CMAKE_CURRENT_LIST_FILE");
- std::string mods = cmakeRoot + std::string("/Modules/");
+ std::string mods = cmSystemTools::GetCMakeRoot() + "/Modules/";
if (currentFile && strncmp(currentFile, mods.c_str(), mods.size()) == 0)
{
switch (this->GetPolicyStatus(cmPolicies::CMP0017))
diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx
index 08caea3..4cab81f 100644
--- a/Source/cmQtAutoGeneratorInitializer.cxx
+++ b/Source/cmQtAutoGeneratorInitializer.cxx
@@ -1003,8 +1003,7 @@ void cmQtAutoGeneratorInitializer::SetupAutoGenerateTarget(
SetupAutoRccTarget(target);
}
- const char* cmakeRoot = makefile->GetSafeDefinition("CMAKE_ROOT");
- std::string inputFile = cmakeRoot;
+ std::string inputFile = cmSystemTools::GetCMakeRoot();
inputFile += "/Modules/AutogenInfo.cmake.in";
std::string outputFile = targetDir;
outputFile += "/AutogenInfo.cmake";
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 74364f7..dcc95af 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -2409,8 +2409,7 @@ int cmake::GetSystemInformation(std::vector<std::string>& args)
// we have to find the module directory, so we can copy the files
this->AddCMakePaths();
- std::string modulesPath =
- this->State->GetInitializedCacheValue("CMAKE_ROOT");
+ std::string modulesPath = cmSystemTools::GetCMakeRoot();
modulesPath += "/Modules";
std::string inFile = modulesPath;
inFile += "/SystemInformation.cmake";
diff --git a/Tests/Module/GenerateExportHeader/reference/Empty/libshared_export.h b/Tests/Module/GenerateExportHeader/reference/Empty/libshared_export.h
index b6749b2..e8af0a5 100644
--- a/Tests/Module/GenerateExportHeader/reference/Empty/libshared_export.h
+++ b/Tests/Module/GenerateExportHeader/reference/Empty/libshared_export.h
@@ -33,9 +33,10 @@
# define LIBSHARED_DEPRECATED_NO_EXPORT LIBSHARED_NO_EXPORT LIBSHARED_DEPRECATED
#endif
-#define DEFINE_NO_DEPRECATED 0
-#if DEFINE_NO_DEPRECATED
-# define LIBSHARED_NO_DEPRECATED
+#if 0 /* DEFINE_NO_DEPRECATED */
+# ifndef LIBSHARED_NO_DEPRECATED
+# define LIBSHARED_NO_DEPRECATED
+# endif
#endif
#endif
diff --git a/Tests/Module/GenerateExportHeader/reference/Empty/libstatic_export.h b/Tests/Module/GenerateExportHeader/reference/Empty/libstatic_export.h
index e8000e2..598bd71 100644
--- a/Tests/Module/GenerateExportHeader/reference/Empty/libstatic_export.h
+++ b/Tests/Module/GenerateExportHeader/reference/Empty/libstatic_export.h
@@ -33,9 +33,10 @@
# define LIBSTATIC_DEPRECATED_NO_EXPORT LIBSTATIC_NO_EXPORT LIBSTATIC_DEPRECATED
#endif
-#define DEFINE_NO_DEPRECATED 0
-#if DEFINE_NO_DEPRECATED
-# define LIBSTATIC_NO_DEPRECATED
+#if 0 /* DEFINE_NO_DEPRECATED */
+# ifndef LIBSTATIC_NO_DEPRECATED
+# define LIBSTATIC_NO_DEPRECATED
+# endif
#endif
#endif
diff --git a/Tests/Module/GenerateExportHeader/reference/MinGW/libshared_export.h b/Tests/Module/GenerateExportHeader/reference/MinGW/libshared_export.h
index d376631..cc20e09 100644
--- a/Tests/Module/GenerateExportHeader/reference/MinGW/libshared_export.h
+++ b/Tests/Module/GenerateExportHeader/reference/MinGW/libshared_export.h
@@ -33,9 +33,10 @@
# define LIBSHARED_DEPRECATED_NO_EXPORT LIBSHARED_NO_EXPORT LIBSHARED_DEPRECATED
#endif
-#define DEFINE_NO_DEPRECATED 0
-#if DEFINE_NO_DEPRECATED
-# define LIBSHARED_NO_DEPRECATED
+#if 0 /* DEFINE_NO_DEPRECATED */
+# ifndef LIBSHARED_NO_DEPRECATED
+# define LIBSHARED_NO_DEPRECATED
+# endif
#endif
#endif
diff --git a/Tests/Module/GenerateExportHeader/reference/MinGW/libstatic_export.h b/Tests/Module/GenerateExportHeader/reference/MinGW/libstatic_export.h
index fd021e9..4aaa848 100644
--- a/Tests/Module/GenerateExportHeader/reference/MinGW/libstatic_export.h
+++ b/Tests/Module/GenerateExportHeader/reference/MinGW/libstatic_export.h
@@ -33,9 +33,10 @@
# define LIBSTATIC_DEPRECATED_NO_EXPORT LIBSTATIC_NO_EXPORT LIBSTATIC_DEPRECATED
#endif
-#define DEFINE_NO_DEPRECATED 0
-#if DEFINE_NO_DEPRECATED
-# define LIBSTATIC_NO_DEPRECATED
+#if 0 /* DEFINE_NO_DEPRECATED */
+# ifndef LIBSTATIC_NO_DEPRECATED
+# define LIBSTATIC_NO_DEPRECATED
+# endif
#endif
#endif
diff --git a/Tests/Module/GenerateExportHeader/reference/UNIX/libshared_export.h b/Tests/Module/GenerateExportHeader/reference/UNIX/libshared_export.h
index 7d8087f..053ad18 100644
--- a/Tests/Module/GenerateExportHeader/reference/UNIX/libshared_export.h
+++ b/Tests/Module/GenerateExportHeader/reference/UNIX/libshared_export.h
@@ -33,9 +33,10 @@
# define LIBSHARED_DEPRECATED_NO_EXPORT LIBSHARED_NO_EXPORT LIBSHARED_DEPRECATED
#endif
-#define DEFINE_NO_DEPRECATED 0
-#if DEFINE_NO_DEPRECATED
-# define LIBSHARED_NO_DEPRECATED
+#if 0 /* DEFINE_NO_DEPRECATED */
+# ifndef LIBSHARED_NO_DEPRECATED
+# define LIBSHARED_NO_DEPRECATED
+# endif
#endif
#endif
diff --git a/Tests/Module/GenerateExportHeader/reference/UNIX/libstatic_export.h b/Tests/Module/GenerateExportHeader/reference/UNIX/libstatic_export.h
index fd021e9..4aaa848 100644
--- a/Tests/Module/GenerateExportHeader/reference/UNIX/libstatic_export.h
+++ b/Tests/Module/GenerateExportHeader/reference/UNIX/libstatic_export.h
@@ -33,9 +33,10 @@
# define LIBSTATIC_DEPRECATED_NO_EXPORT LIBSTATIC_NO_EXPORT LIBSTATIC_DEPRECATED
#endif
-#define DEFINE_NO_DEPRECATED 0
-#if DEFINE_NO_DEPRECATED
-# define LIBSTATIC_NO_DEPRECATED
+#if 0 /* DEFINE_NO_DEPRECATED */
+# ifndef LIBSTATIC_NO_DEPRECATED
+# define LIBSTATIC_NO_DEPRECATED
+# endif
#endif
#endif
diff --git a/Tests/Module/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libshared_export.h b/Tests/Module/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libshared_export.h
index 5681f58..808ff01 100644
--- a/Tests/Module/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libshared_export.h
+++ b/Tests/Module/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libshared_export.h
@@ -33,9 +33,10 @@
# define LIBSHARED_DEPRECATED_NO_EXPORT LIBSHARED_NO_EXPORT LIBSHARED_DEPRECATED
#endif
-#define DEFINE_NO_DEPRECATED 0
-#if DEFINE_NO_DEPRECATED
-# define LIBSHARED_NO_DEPRECATED
+#if 0 /* DEFINE_NO_DEPRECATED */
+# ifndef LIBSHARED_NO_DEPRECATED
+# define LIBSHARED_NO_DEPRECATED
+# endif
#endif
#endif
diff --git a/Tests/Module/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libstatic_export.h b/Tests/Module/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libstatic_export.h
index fd021e9..4aaa848 100644
--- a/Tests/Module/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libstatic_export.h
+++ b/Tests/Module/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libstatic_export.h
@@ -33,9 +33,10 @@
# define LIBSTATIC_DEPRECATED_NO_EXPORT LIBSTATIC_NO_EXPORT LIBSTATIC_DEPRECATED
#endif
-#define DEFINE_NO_DEPRECATED 0
-#if DEFINE_NO_DEPRECATED
-# define LIBSTATIC_NO_DEPRECATED
+#if 0 /* DEFINE_NO_DEPRECATED */
+# ifndef LIBSTATIC_NO_DEPRECATED
+# define LIBSTATIC_NO_DEPRECATED
+# endif
#endif
#endif
diff --git a/Tests/Module/GenerateExportHeader/reference/Win32-Clang/libshared_export.h b/Tests/Module/GenerateExportHeader/reference/Win32-Clang/libshared_export.h
index d376631..cc20e09 100644
--- a/Tests/Module/GenerateExportHeader/reference/Win32-Clang/libshared_export.h
+++ b/Tests/Module/GenerateExportHeader/reference/Win32-Clang/libshared_export.h
@@ -33,9 +33,10 @@
# define LIBSHARED_DEPRECATED_NO_EXPORT LIBSHARED_NO_EXPORT LIBSHARED_DEPRECATED
#endif
-#define DEFINE_NO_DEPRECATED 0
-#if DEFINE_NO_DEPRECATED
-# define LIBSHARED_NO_DEPRECATED
+#if 0 /* DEFINE_NO_DEPRECATED */
+# ifndef LIBSHARED_NO_DEPRECATED
+# define LIBSHARED_NO_DEPRECATED
+# endif
#endif
#endif
diff --git a/Tests/Module/GenerateExportHeader/reference/Win32-Clang/libstatic_export.h b/Tests/Module/GenerateExportHeader/reference/Win32-Clang/libstatic_export.h
index fd021e9..4aaa848 100644
--- a/Tests/Module/GenerateExportHeader/reference/Win32-Clang/libstatic_export.h
+++ b/Tests/Module/GenerateExportHeader/reference/Win32-Clang/libstatic_export.h
@@ -33,9 +33,10 @@
# define LIBSTATIC_DEPRECATED_NO_EXPORT LIBSTATIC_NO_EXPORT LIBSTATIC_DEPRECATED
#endif
-#define DEFINE_NO_DEPRECATED 0
-#if DEFINE_NO_DEPRECATED
-# define LIBSTATIC_NO_DEPRECATED
+#if 0 /* DEFINE_NO_DEPRECATED */
+# ifndef LIBSTATIC_NO_DEPRECATED
+# define LIBSTATIC_NO_DEPRECATED
+# endif
#endif
#endif
diff --git a/Tests/Module/GenerateExportHeader/reference/Win32/libshared_export.h b/Tests/Module/GenerateExportHeader/reference/Win32/libshared_export.h
index 976c92e..4e675af 100644
--- a/Tests/Module/GenerateExportHeader/reference/Win32/libshared_export.h
+++ b/Tests/Module/GenerateExportHeader/reference/Win32/libshared_export.h
@@ -33,9 +33,10 @@
# define LIBSHARED_DEPRECATED_NO_EXPORT LIBSHARED_NO_EXPORT LIBSHARED_DEPRECATED
#endif
-#define DEFINE_NO_DEPRECATED 0
-#if DEFINE_NO_DEPRECATED
-# define LIBSHARED_NO_DEPRECATED
+#if 0 /* DEFINE_NO_DEPRECATED */
+# ifndef LIBSHARED_NO_DEPRECATED
+# define LIBSHARED_NO_DEPRECATED
+# endif
#endif
#endif
diff --git a/Tests/Module/GenerateExportHeader/reference/Win32/libstatic_export.h b/Tests/Module/GenerateExportHeader/reference/Win32/libstatic_export.h
index db4df61..4d5ed4e 100644
--- a/Tests/Module/GenerateExportHeader/reference/Win32/libstatic_export.h
+++ b/Tests/Module/GenerateExportHeader/reference/Win32/libstatic_export.h
@@ -33,9 +33,10 @@
# define LIBSTATIC_DEPRECATED_NO_EXPORT LIBSTATIC_NO_EXPORT LIBSTATIC_DEPRECATED
#endif
-#define DEFINE_NO_DEPRECATED 0
-#if DEFINE_NO_DEPRECATED
-# define LIBSTATIC_NO_DEPRECATED
+#if 0 /* DEFINE_NO_DEPRECATED */
+# ifndef LIBSTATIC_NO_DEPRECATED
+# define LIBSTATIC_NO_DEPRECATED
+# endif
#endif
#endif
diff --git a/Tests/Module/GenerateExportHeader/reference/WinEmpty/libshared_export.h b/Tests/Module/GenerateExportHeader/reference/WinEmpty/libshared_export.h
index 2dc41d4..84340e3 100644
--- a/Tests/Module/GenerateExportHeader/reference/WinEmpty/libshared_export.h
+++ b/Tests/Module/GenerateExportHeader/reference/WinEmpty/libshared_export.h
@@ -33,9 +33,10 @@
# define LIBSHARED_DEPRECATED_NO_EXPORT LIBSHARED_NO_EXPORT LIBSHARED_DEPRECATED
#endif
-#define DEFINE_NO_DEPRECATED 0
-#if DEFINE_NO_DEPRECATED
-# define LIBSHARED_NO_DEPRECATED
+#if 0 /* DEFINE_NO_DEPRECATED */
+# ifndef LIBSHARED_NO_DEPRECATED
+# define LIBSHARED_NO_DEPRECATED
+# endif
#endif
#endif
diff --git a/Tests/Module/GenerateExportHeader/reference/WinEmpty/libstatic_export.h b/Tests/Module/GenerateExportHeader/reference/WinEmpty/libstatic_export.h
index e8000e2..598bd71 100644
--- a/Tests/Module/GenerateExportHeader/reference/WinEmpty/libstatic_export.h
+++ b/Tests/Module/GenerateExportHeader/reference/WinEmpty/libstatic_export.h
@@ -33,9 +33,10 @@
# define LIBSTATIC_DEPRECATED_NO_EXPORT LIBSTATIC_NO_EXPORT LIBSTATIC_DEPRECATED
#endif
-#define DEFINE_NO_DEPRECATED 0
-#if DEFINE_NO_DEPRECATED
-# define LIBSTATIC_NO_DEPRECATED
+#if 0 /* DEFINE_NO_DEPRECATED */
+# ifndef LIBSTATIC_NO_DEPRECATED
+# define LIBSTATIC_NO_DEPRECATED
+# endif
#endif
#endif
diff --git a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
index 395c74b..b77d5d4 100644
--- a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
+++ b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
@@ -97,6 +97,7 @@ if(NOT XCODE_VERSION VERSION_LESS 7)
endif()
if(NOT XCODE_VERSION VERSION_LESS 6)
+ # XcodeIOSInstallCombined
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeIOSInstallCombined-build)
set(RunCMake_TEST_NO_CLEAN 1)
set(RunCMake_TEST_OPTIONS
@@ -114,6 +115,7 @@ if(NOT XCODE_VERSION VERSION_LESS 6)
unset(RunCMake_TEST_NO_CLEAN)
unset(RunCMake_TEST_OPTIONS)
+ # XcodeIOSInstallCombinedPrune
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeIOSInstallCombinedPrune-build)
set(RunCMake_TEST_NO_CLEAN 1)
set(RunCMake_TEST_OPTIONS
@@ -130,4 +132,22 @@ if(NOT XCODE_VERSION VERSION_LESS 6)
unset(RunCMake_TEST_BINARY_DIR)
unset(RunCMake_TEST_NO_CLEAN)
unset(RunCMake_TEST_OPTIONS)
+
+ # XcodeIOSInstallCombinedSingleArch
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeIOSInstallCombinedSingleArch-build)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ set(RunCMake_TEST_OPTIONS
+ "-DCMAKE_INSTALL_PREFIX:PATH=${RunCMake_TEST_BINARY_DIR}/_install"
+ "-DCMAKE_IOS_INSTALL_COMBINED=YES")
+
+ file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+
+ run_cmake(XcodeIOSInstallCombinedSingleArch)
+ run_cmake_command(XcodeIOSInstallCombinedSingleArch-build ${CMAKE_COMMAND} --build .)
+ run_cmake_command(XcodeIOSInstallCombinedSingleArch-install ${CMAKE_COMMAND} --build . --target install)
+
+ unset(RunCMake_TEST_BINARY_DIR)
+ unset(RunCMake_TEST_NO_CLEAN)
+ unset(RunCMake_TEST_OPTIONS)
endif()
diff --git a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch-install-check.cmake b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch-install-check.cmake
new file mode 100644
index 0000000..3c11ae0
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch-install-check.cmake
@@ -0,0 +1,25 @@
+function(verify_architecture file)
+ execute_process(
+ COMMAND xcrun lipo -info ${RunCMake_TEST_BINARY_DIR}/_install/${file}
+ OUTPUT_VARIABLE lipo_out
+ ERROR_VARIABLE lipo_err
+ RESULT_VARIABLE lipo_result)
+ if(NOT lipo_result EQUAL "0")
+ message(SEND_ERROR "lipo -info failed: ${lipo_err}")
+ return()
+ endif()
+
+ string(REGEX MATCHALL "is architecture: [^ \n\t]+" architecture "${lipo_out}")
+ string(REGEX REPLACE "is architecture: " "" actual "${architecture}")
+
+ set(expected armv7)
+
+ if(NOT actual STREQUAL expected)
+ message(SEND_ERROR
+ "The actual library architecture:\n ${actual} \n"
+ "which do not match expected ones:\n ${expected} \n"
+ "lipo output:\n${lipo_out}")
+ endif()
+endfunction()
+
+verify_architecture(lib/libfoo.dylib)
diff --git a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch.cmake b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch.cmake
new file mode 100644
index 0000000..4b5e7ce
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch.cmake
@@ -0,0 +1,19 @@
+cmake_minimum_required(VERSION 3.3)
+
+project(XcodeIOSInstallCombinedSingleArch CXX)
+
+set(CMAKE_OSX_SYSROOT iphoneos)
+set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO")
+set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf")
+
+add_library(foo SHARED foo.cpp)
+install(TARGETS foo DESTINATION lib)
+
+set_target_properties(
+ foo
+ PROPERTIES
+ XCODE_ATTRIBUTE_ARCHS[sdk=iphoneos*] armv7
+ XCODE_ATTRIBUTE_VALID_ARCHS[sdk=iphoneos*] armv7
+ XCODE_ATTRIBUTE_ARCHS[sdk=iphonesimulator*] ""
+ XCODE_ATTRIBUTE_VALID_ARCHS[sdk=iphonesimulator*] ""
+)