Upstream version 3.5.1
-----BEGIN PGP SIGNATURE----- iQIcBAABCgAGBQJW+rLoAAoJEP4ixv2DE11Ft/kP/3ldcb2g+Vx3qS6Vc/F1BqMp RU9djyTBGOlX35R/iMgccIps8wPzAcUUJiVF5p3LjqPfi4YprmtHPgdGEDY5y9Qr M9LvXgNDq10RwOuRWpdWjl2sGPUjG7Bn5YOo7kQPj5YDlfkDY6z0PIHEdsaeI4S1 k9j+DDNWvmhFvxnI1KCJzPq6F9iU8nMMYC+Lzoa+y8/9NtQlqtiKxN2zy7DYTaaH 0dHKQZ123osbBf1byCahWDma7YE6UsO3ETRcAJqw1ivehJmDfqMmG61v6z4uEp1H kXwdwN4zlbZ8uzRETDKjfvw7JD2niKLuaNu0cwVsmgf1qoXtc+dAxTIeXfRuPfIN Y7lwYSkcEDoluu/wn3pql4unBTNRYgIyFaUXj2q3ZXr332Ja9YqRD8QD/XEMuURs nwuZc8u7mHFnaHmQwqF32ZV2WjByZrfFNaQ9kC2WUqhIUP/F/yvjBcGobc5PYPzH yHTD4Od83LmVurkBRM8U7cRg7t/G4zlZr9Kb5DQQQgA9H5yIfnMEKuQS8QuL68oL fP6ra2XqDH1VNZ0nKiwkGzyHPrEcgoSgcrK5+nG9wtPnfbFUZgs5rXH/uncKr29h Es8pHGFa6z0VwGK0CQyUWk9/Rinc0FumvA4So3Ou9Su2RHh0uFdbgDcABYo3E3MJ t7H+qocTcTA+YJ1kQ8Gs =NO/Z -----END PGP SIGNATURE----- Merge tag 'upstream/3.5.1' Upstream version 3.5.1 # gpg: Signature made Di 29 Mär 2016 18:52:56 CEST # gpg: using RSA key 0xFE22C6FD83135D45 # gpg: Good signature from "Felix Geyer <felix@fobos.de>" [ultimate] # gpg: aka "Felix Geyer <debfx-pkg@fobos.de>" [ultimate] # gpg: aka "Felix Geyer <debfx@kubuntu.org>" [ultimate] # gpg: aka "Felix Geyer <debfx@fobos.de>" [ultimate] # gpg: aka "Felix Geyer <debfx@ubuntu.com>" [ultimate] # gpg: aka "Felix Geyer <felix.geyer@fobos.de>" [ultimate] # gpg: aka "Felix Geyer <fgeyer@debian.org>" [ultimate] # Primary key fingerprint: 164C 7051 2F79 2947 6764 AB56 FE22 C6FD 8313 5D45
This commit is contained in:
		
						commit
						1fe9e70aa8
					
				@ -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()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -745,9 +745,10 @@ endfunction()
 | 
			
		||||
# defined; FALSE if dependency information is unavailable).
 | 
			
		||||
#
 | 
			
		||||
# componentvar - the component list variable name
 | 
			
		||||
# extravar - the indirect dependency list variable name
 | 
			
		||||
#
 | 
			
		||||
#
 | 
			
		||||
function(_Boost_MISSING_DEPENDENCIES componentvar)
 | 
			
		||||
function(_Boost_MISSING_DEPENDENCIES componentvar extravar)
 | 
			
		||||
  # _boost_unprocessed_components - list of components requiring processing
 | 
			
		||||
  # _boost_processed_components - components already processed (or currently being processed)
 | 
			
		||||
  # _boost_new_components - new components discovered for future processing
 | 
			
		||||
@ -773,7 +774,12 @@ function(_Boost_MISSING_DEPENDENCIES componentvar)
 | 
			
		||||
    set(_boost_unprocessed_components ${_boost_new_components})
 | 
			
		||||
    unset(_boost_new_components)
 | 
			
		||||
  endwhile()
 | 
			
		||||
  set(_boost_extra_components ${_boost_processed_components})
 | 
			
		||||
  if(_boost_extra_components AND ${componentvar})
 | 
			
		||||
    list(REMOVE_ITEM _boost_extra_components ${${componentvar}})
 | 
			
		||||
  endif()
 | 
			
		||||
  set(${componentvar} ${_boost_processed_components} PARENT_SCOPE)
 | 
			
		||||
  set(${extravar} ${_boost_extra_components} PARENT_SCOPE)
 | 
			
		||||
endfunction()
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
@ -1306,7 +1312,7 @@ endif()
 | 
			
		||||
 | 
			
		||||
# Additional components may be required via component dependencies.
 | 
			
		||||
# Add any missing components to the list.
 | 
			
		||||
_Boost_MISSING_DEPENDENCIES(Boost_FIND_COMPONENTS)
 | 
			
		||||
_Boost_MISSING_DEPENDENCIES(Boost_FIND_COMPONENTS _Boost_EXTRA_FIND_COMPONENTS)
 | 
			
		||||
 | 
			
		||||
# If thread is required, get the thread libs as a dependency
 | 
			
		||||
list(FIND Boost_FIND_COMPONENTS thread _Boost_THREAD_DEPENDENCY_LIBS)
 | 
			
		||||
@ -1484,6 +1490,10 @@ if(Boost_FOUND)
 | 
			
		||||
      list(APPEND _Boost_MISSING_COMPONENTS ${COMPONENT})
 | 
			
		||||
    endif()
 | 
			
		||||
  endforeach()
 | 
			
		||||
  if(_Boost_MISSING_COMPONENTS AND _Boost_EXTRA_FIND_COMPONENTS)
 | 
			
		||||
    # Optional indirect dependencies are not counted as missing.
 | 
			
		||||
    list(REMOVE_ITEM _Boost_MISSING_COMPONENTS ${_Boost_EXTRA_FIND_COMPONENTS})
 | 
			
		||||
  endif()
 | 
			
		||||
 | 
			
		||||
  if(Boost_DEBUG)
 | 
			
		||||
    message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] Boost_FOUND = ${Boost_FOUND}")
 | 
			
		||||
 | 
			
		||||
@ -1551,7 +1551,12 @@ function(CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS output_file cuda_target options
 | 
			
		||||
    list( FIND nvcc_flags "-ccbin" ccbin_found0 )
 | 
			
		||||
    list( FIND nvcc_flags "--compiler-bindir" ccbin_found1 )
 | 
			
		||||
    if( ccbin_found0 LESS 0 AND ccbin_found1 LESS 0 AND CUDA_HOST_COMPILER )
 | 
			
		||||
      list(APPEND nvcc_flags -ccbin "\"${CUDA_HOST_COMPILER}\"")
 | 
			
		||||
      # Match VERBATIM check below.
 | 
			
		||||
      if(CUDA_HOST_COMPILER MATCHES "\\$\\(VCInstallDir\\)")
 | 
			
		||||
        list(APPEND nvcc_flags -ccbin "\"${CUDA_HOST_COMPILER}\"")
 | 
			
		||||
      else()
 | 
			
		||||
        list(APPEND nvcc_flags -ccbin "${CUDA_HOST_COMPILER}")
 | 
			
		||||
      endif()
 | 
			
		||||
    endif()
 | 
			
		||||
 | 
			
		||||
    # Create a list of flags specified by CUDA_NVCC_FLAGS_${CONFIG} and CMAKE_${CUDA_C_OR_CXX}_FLAGS*
 | 
			
		||||
 | 
			
		||||
@ -383,7 +383,7 @@ macro(_pkg_check_modules_internal _is_required _is_silent _no_cmake_path _no_cma
 | 
			
		||||
        pkg_get_variable("${_pkg_check_prefix}_INCLUDEDIR" ${_pkg_check_modules_pkg} "includedir")
 | 
			
		||||
        pkg_get_variable("${_pkg_check_prefix}_LIBDIR" ${_pkg_check_modules_pkg} "libdir")
 | 
			
		||||
        foreach (variable IN ITEMS PREFIX INCLUDEDIR LIBDIR)
 | 
			
		||||
          _pkgconfig_set("${_pkg_check_modules_pkg}_${variable}" "${${_pkg_check_modules_pkg}_${variable}}")
 | 
			
		||||
          _pkgconfig_set("${_pkg_check_prefix}_${variable}" "${${_pkg_check_prefix}_${variable}}")
 | 
			
		||||
        endforeach ()
 | 
			
		||||
 | 
			
		||||
        if (NOT ${_is_silent})
 | 
			
		||||
 | 
			
		||||
@ -728,7 +728,20 @@ endif()
 | 
			
		||||
add_library(CPackLib ${CPACK_SRCS})
 | 
			
		||||
target_link_libraries(CPackLib CMakeLib)
 | 
			
		||||
if(APPLE)
 | 
			
		||||
  target_link_libraries(CPackLib "-framework Carbon")
 | 
			
		||||
  # Some compilers produce errors in the CoreServices framework headers.
 | 
			
		||||
  # Ideally such errors should be fixed by either the compiler vendor
 | 
			
		||||
  # or the framework source, but we try to workaround it and build anyway.
 | 
			
		||||
  # If it does not work, build with reduced functionality and warn.
 | 
			
		||||
  check_include_file("CoreServices/CoreServices.h" HAVE_CoreServices)
 | 
			
		||||
  if(HAVE_CoreServices)
 | 
			
		||||
    set_property(SOURCE CPack/cmCPackDragNDropGenerator.cxx PROPERTY COMPILE_DEFINITIONS HAVE_CoreServices)
 | 
			
		||||
    target_link_libraries(CPackLib "-framework CoreServices")
 | 
			
		||||
  else()
 | 
			
		||||
    message(WARNING "This compiler does not appear to support\n"
 | 
			
		||||
      "  #include <CoreServices/CoreServices.h>\n"
 | 
			
		||||
      "Some CPack functionality may be limited.\n"
 | 
			
		||||
      "See CMakeFiles/CMakeError.log for details of the failure.")
 | 
			
		||||
  endif()
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
if(APPLE)
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
# CMake version number components.
 | 
			
		||||
set(CMake_VERSION_MAJOR 3)
 | 
			
		||||
set(CMake_VERSION_MINOR 5)
 | 
			
		||||
set(CMake_VERSION_PATCH 0)
 | 
			
		||||
set(CMake_VERSION_PATCH 1)
 | 
			
		||||
#set(CMake_VERSION_RC 0)
 | 
			
		||||
 | 
			
		||||
@ -20,20 +20,13 @@
 | 
			
		||||
 | 
			
		||||
#include <iomanip>
 | 
			
		||||
 | 
			
		||||
#include <CoreFoundation/CFBase.h>
 | 
			
		||||
#include <CoreFoundation/CFString.h>
 | 
			
		||||
#include <CoreFoundation/CFLocale.h>
 | 
			
		||||
#include <CoreFoundation/CoreFoundation.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
 | 
			
		||||
#ifdef HAVE_CoreServices
 | 
			
		||||
// 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>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
static const char* SLAHeader =
 | 
			
		||||
@ -652,9 +645,11 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
 | 
			
		||||
                           kCFStringEncodingMacRoman);
 | 
			
		||||
        LangCode lang = 0;
 | 
			
		||||
        RegionCode region = 0;
 | 
			
		||||
#ifdef HAVE_CoreServices
 | 
			
		||||
        OSStatus err = LocaleStringToLangAndRegionCodes(iso_language_cstr,
 | 
			
		||||
                                                        &lang, ®ion);
 | 
			
		||||
        if (err != noErr)
 | 
			
		||||
#endif
 | 
			
		||||
          {
 | 
			
		||||
          cmCPackLogger(cmCPackLog::LOG_ERROR,
 | 
			
		||||
            "No language/region code available for " << iso_language_cstr
 | 
			
		||||
@ -662,10 +657,12 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
 | 
			
		||||
          free(iso_language_cstr);
 | 
			
		||||
          return 0;
 | 
			
		||||
          }
 | 
			
		||||
#ifdef HAVE_CoreServices
 | 
			
		||||
        free(iso_language_cstr);
 | 
			
		||||
        header_data.push_back(region);
 | 
			
		||||
        header_data.push_back(i);
 | 
			
		||||
        header_data.push_back(0);
 | 
			
		||||
#endif
 | 
			
		||||
        }
 | 
			
		||||
      ofs << "data 'LPic' (5000) {\n";
 | 
			
		||||
      ofs << std::hex << std::uppercase << std::setfill('0');
 | 
			
		||||
 | 
			
		||||
@ -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
 | 
			
		||||
 | 
			
		||||
@ -2531,15 +2531,22 @@ const char* cmMakefile::GetDefinition(const std::string& name) const
 | 
			
		||||
  cmVariableWatch* vv = this->GetVariableWatch();
 | 
			
		||||
  if ( vv && !this->SuppressWatches )
 | 
			
		||||
    {
 | 
			
		||||
    if ( def )
 | 
			
		||||
      {
 | 
			
		||||
      vv->VariableAccessed(name, cmVariableWatch::VARIABLE_READ_ACCESS,
 | 
			
		||||
        def, this);
 | 
			
		||||
      }
 | 
			
		||||
    else
 | 
			
		||||
      {
 | 
			
		||||
    bool const watch_function_executed =
 | 
			
		||||
      vv->VariableAccessed(name,
 | 
			
		||||
          cmVariableWatch::UNKNOWN_VARIABLE_READ_ACCESS, def, this);
 | 
			
		||||
                           def ? cmVariableWatch::VARIABLE_READ_ACCESS
 | 
			
		||||
                           : cmVariableWatch::UNKNOWN_VARIABLE_READ_ACCESS,
 | 
			
		||||
                           def, this);
 | 
			
		||||
 | 
			
		||||
    if (watch_function_executed)
 | 
			
		||||
      {
 | 
			
		||||
      // A callback was executed and may have caused re-allocation of the
 | 
			
		||||
      // variable storage.  Look it up again for now.
 | 
			
		||||
      // FIXME: Refactor variable storage to avoid this problem.
 | 
			
		||||
      def = this->StateSnapshot.GetDefinition(name);
 | 
			
		||||
      if(!def)
 | 
			
		||||
        {
 | 
			
		||||
        def = this->GetState()->GetInitializedCacheValue(name);
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -96,7 +96,7 @@ void cmVariableWatch::RemoveWatch(const std::string& variable,
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void  cmVariableWatch::VariableAccessed(const std::string& variable,
 | 
			
		||||
bool  cmVariableWatch::VariableAccessed(const std::string& variable,
 | 
			
		||||
                                        int access_type,
 | 
			
		||||
                                        const char* newValue,
 | 
			
		||||
                                        const cmMakefile* mf) const
 | 
			
		||||
@ -112,5 +112,7 @@ void  cmVariableWatch::VariableAccessed(const std::string& variable,
 | 
			
		||||
      (*it)->Method(variable, access_type, (*it)->ClientData,
 | 
			
		||||
        newValue, mf);
 | 
			
		||||
      }
 | 
			
		||||
    return true;
 | 
			
		||||
    }
 | 
			
		||||
  return false;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -42,7 +42,7 @@ public:
 | 
			
		||||
  /**
 | 
			
		||||
   * This method is called when variable is accessed
 | 
			
		||||
   */
 | 
			
		||||
  void VariableAccessed(const std::string& variable, int access_type,
 | 
			
		||||
  bool VariableAccessed(const std::string& variable, int access_type,
 | 
			
		||||
    const char* newValue, const cmMakefile* mf) const;
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
 | 
			
		||||
@ -1,14 +1,15 @@
 | 
			
		||||
cmake_minimum_required(VERSION 3.3)
 | 
			
		||||
 | 
			
		||||
find_package(PkgConfig REQUIRED)
 | 
			
		||||
pkg_check_modules(NCURSES QUIET ncurses)
 | 
			
		||||
 | 
			
		||||
if (NCURSES_FOUND)
 | 
			
		||||
  foreach (variable IN ITEMS PREFIX INCLUDEDIR LIBDIR)
 | 
			
		||||
    get_property("${variable}"
 | 
			
		||||
    get_property(value
 | 
			
		||||
      CACHE     "NCURSES_${variable}"
 | 
			
		||||
      PROPERTY  TYPE
 | 
			
		||||
      SET)
 | 
			
		||||
    if (NOT ${variable})
 | 
			
		||||
      message(FATAL_ERROR "Failed to set cache entry for NCURSES_${variable}")
 | 
			
		||||
      PROPERTY  VALUE)
 | 
			
		||||
    if (NOT value STREQUAL NCURSES_${variable})
 | 
			
		||||
      message(FATAL_ERROR "Failed to set cache entry for NCURSES_${variable}:\nexpected -->${value}<--\nreceived -->${NCURSES_${variable}}<--")
 | 
			
		||||
    endif ()
 | 
			
		||||
  endforeach ()
 | 
			
		||||
else ()
 | 
			
		||||
 | 
			
		||||
@ -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()
 | 
			
		||||
 | 
			
		||||
@ -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)
 | 
			
		||||
@ -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*] ""
 | 
			
		||||
)
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user