diff -Nru cmake-3.5.0/debian/changelog cmake-3.5.1/debian/changelog --- cmake-3.5.0/debian/changelog 2016-03-29 22:39:51.000000000 +0000 +++ cmake-3.5.1/debian/changelog 2016-03-30 05:40:44.000000000 +0000 @@ -1,3 +1,25 @@ +cmake (3.5.1-1ubuntu1) xenial; urgency=medium + + * Merge from Debian unstable (LP: #1563580). Remaining changes: + - debian/cmake-data.install + debian/MultiArchCross.cmake + debian/patches/ubuntu_cmake-crosscompile.patch: + help cmake to find libraries in multiarch path + xnox says this is not yet ready to go upstream but he will work on it + - debian/patches/ubuntu_boost-multiarch.patch + find boost and python in multiarch path + this is a candidate for removal but needs rdepend testing + + -- Gianfranco Costamagna Wed, 30 Mar 2016 00:59:16 +0200 + +cmake (3.5.1-1) unstable; urgency=medium + + * New upstream release. + - Fixes FindCUDA regression in separate compilation. (Closes: #818937) + * Update copyright file. + + -- Felix Geyer Tue, 29 Mar 2016 22:16:11 +0200 + cmake (3.5.0-1ubuntu3) xenial; urgency=medium * Fix FindPkgModules.cmake (LP: #1563548) @@ -7,7 +29,7 @@ cmake (3.5.0-1ubuntu2) xenial; urgency=medium - * Add back MultiaArchCross.cmake file. + * Add again MultiaArchCross.cmake file. -- Gianfranco Costamagna Tue, 29 Mar 2016 17:15:05 +0200 diff -Nru cmake-3.5.0/debian/copyright cmake-3.5.1/debian/copyright --- cmake-3.5.0/debian/copyright 2015-09-20 18:52:58.000000000 +0000 +++ cmake-3.5.1/debian/copyright 2016-03-29 19:22:18.000000000 +0000 @@ -27,11 +27,16 @@ 2014 Felix Geyer License: BSD-3-clause -Files: Source/cmDependsFortranParserTokens.h - Source/cmDependsFortranParser.cxx +Files: Source/cmFortranParserTokens.h Copyright: 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. License: GPL-3+with_exception +Files: Source/cmFortranParser.cxx +Copyright: 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. + 2000-2015 Kitware, Inc., Insight Software Consortium + 2000-2006 Erik Edelmann +License: GPL-3+with_exception + Files: Source/cmDependsJavaParser.cxx Source/cmCommandArgumentParserTokens.h Source/cmExprParserTokens.h diff -Nru cmake-3.5.0/debian/patches/FindBoost_add_-lpthread_#563479.diff cmake-3.5.1/debian/patches/FindBoost_add_-lpthread_#563479.diff --- cmake-3.5.0/debian/patches/FindBoost_add_-lpthread_#563479.diff 2016-03-13 12:48:42.000000000 +0000 +++ cmake-3.5.1/debian/patches/FindBoost_add_-lpthread_#563479.diff 2016-03-29 16:56:13.000000000 +0000 @@ -12,7 +12,7 @@ --- cmake.orig/Modules/FindBoost.cmake +++ cmake/Modules/FindBoost.cmake @@ -447,6 +447,22 @@ function(_Boost_GUESS_COMPILER_PREFIX _r - set(${componentvar} ${_boost_processed_components} PARENT_SCOPE) + set(${extravar} ${_boost_extra_components} PARENT_SCOPE) endfunction() +function(_Boost_consider_adding_pthreads _outvar) diff -Nru cmake-3.5.0/debian/patches/fix-broken-pkg-support.patch cmake-3.5.1/debian/patches/fix-broken-pkg-support.patch --- cmake-3.5.0/debian/patches/fix-broken-pkg-support.patch 2016-03-29 22:39:51.000000000 +0000 +++ cmake-3.5.1/debian/patches/fix-broken-pkg-support.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ -Description: Fix broken pkg-config support in xenial - Seems that the variable were filled in _pkg_check_prefix and saved in a - different name _pkg_check_modules_pkg. - this leads to variable saved in form of glib-2.0_INCLUDEDIR instead of - the correct GLIB2_INCLUDEDIR. - . - This patch restores the old GLIB2_INCLUDEDIR variable, and fixes the - empty glib-2.0_INCLUDEDIR new version because of the typo in the set command - . - The macro uses the first parameter "_pkg_check_prefix" as result variable, - and then the result has to be taken from there. - -Author: Gianfranco Costamagna -Bug-Ubuntu: https://bugs.launchpad.net/bugs/1563548 - ---- cmake-3.5.0.orig/Modules/FindPkgConfig.cmake -+++ cmake-3.5.0/Modules/FindPkgConfig.cmake -@@ -387,7 +387,8 @@ macro(_pkg_check_modules_internal _is_re - 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_modules_pkg}_${variable}" "${${_pkg_check_prefix}_${variable}}") -+ _pkgconfig_set("${_pkg_check_prefix}_${variable}" "${${_pkg_check_prefix}_${variable}}") - endforeach () - - if (NOT ${_is_silent}) diff -Nru cmake-3.5.0/debian/patches/series cmake-3.5.1/debian/patches/series --- cmake-3.5.0/debian/patches/series 2016-03-29 22:39:51.000000000 +0000 +++ cmake-3.5.1/debian/patches/series 2016-03-30 05:40:29.000000000 +0000 @@ -3,4 +3,3 @@ fix-ftbfs-on-kfreebsd.patch ubuntu_boost-multiarch.patch ubuntu_cmake-crosscompile.patch -fix-broken-pkg-support.patch diff -Nru cmake-3.5.0/Modules/CMakeIOSInstallCombined.cmake cmake-3.5.1/Modules/CMakeIOSInstallCombined.cmake --- cmake-3.5.0/Modules/CMakeIOSInstallCombined.cmake 2016-03-08 14:36:22.000000000 +0000 +++ cmake-3.5.1/Modules/CMakeIOSInstallCombined.cmake 2016-03-24 14:12:20.000000000 +0000 @@ -52,7 +52,14 @@ 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 @@ 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 -Nru cmake-3.5.0/Modules/FindBoost.cmake cmake-3.5.1/Modules/FindBoost.cmake --- cmake-3.5.0/Modules/FindBoost.cmake 2016-03-08 14:36:22.000000000 +0000 +++ cmake-3.5.1/Modules/FindBoost.cmake 2016-03-24 14:12:20.000000000 +0000 @@ -745,9 +745,10 @@ # 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 @@ 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 @@ # 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 @@ 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}") diff -Nru cmake-3.5.0/Modules/FindCUDA.cmake cmake-3.5.1/Modules/FindCUDA.cmake --- cmake-3.5.0/Modules/FindCUDA.cmake 2016-03-08 14:36:22.000000000 +0000 +++ cmake-3.5.1/Modules/FindCUDA.cmake 2016-03-24 14:12:20.000000000 +0000 @@ -1551,7 +1551,12 @@ 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* diff -Nru cmake-3.5.0/Modules/FindPkgConfig.cmake cmake-3.5.1/Modules/FindPkgConfig.cmake --- cmake-3.5.0/Modules/FindPkgConfig.cmake 2016-03-08 14:36:22.000000000 +0000 +++ cmake-3.5.1/Modules/FindPkgConfig.cmake 2016-03-24 14:12:21.000000000 +0000 @@ -383,7 +383,7 @@ 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}) diff -Nru cmake-3.5.0/Source/CMakeLists.txt cmake-3.5.1/Source/CMakeLists.txt --- cmake-3.5.0/Source/CMakeLists.txt 2016-03-08 14:36:22.000000000 +0000 +++ cmake-3.5.1/Source/CMakeLists.txt 2016-03-24 14:12:21.000000000 +0000 @@ -728,7 +728,20 @@ 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 \n" + "Some CPack functionality may be limited.\n" + "See CMakeFiles/CMakeError.log for details of the failure.") + endif() endif() if(APPLE) diff -Nru cmake-3.5.0/Source/CMakeVersion.cmake cmake-3.5.1/Source/CMakeVersion.cmake --- cmake-3.5.0/Source/CMakeVersion.cmake 2016-03-08 14:36:22.000000000 +0000 +++ cmake-3.5.1/Source/CMakeVersion.cmake 2016-03-24 14:12:21.000000000 +0000 @@ -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) diff -Nru cmake-3.5.0/Source/cmMakefile.cxx cmake-3.5.1/Source/cmMakefile.cxx --- cmake-3.5.0/Source/cmMakefile.cxx 2016-03-08 14:36:22.000000000 +0000 +++ cmake-3.5.1/Source/cmMakefile.cxx 2016-03-24 14:12:21.000000000 +0000 @@ -2531,15 +2531,22 @@ 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 diff -Nru cmake-3.5.0/Source/cmVariableWatch.cxx cmake-3.5.1/Source/cmVariableWatch.cxx --- cmake-3.5.0/Source/cmVariableWatch.cxx 2016-03-08 14:36:22.000000000 +0000 +++ cmake-3.5.1/Source/cmVariableWatch.cxx 2016-03-24 14:12:21.000000000 +0000 @@ -96,7 +96,7 @@ } } -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 @@ (*it)->Method(variable, access_type, (*it)->ClientData, newValue, mf); } + return true; } + return false; } diff -Nru cmake-3.5.0/Source/cmVariableWatch.h cmake-3.5.1/Source/cmVariableWatch.h --- cmake-3.5.0/Source/cmVariableWatch.h 2016-03-08 14:36:22.000000000 +0000 +++ cmake-3.5.1/Source/cmVariableWatch.h 2016-03-24 14:12:21.000000000 +0000 @@ -42,7 +42,7 @@ /** * 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; /** diff -Nru cmake-3.5.0/Source/CPack/cmCPackDragNDropGenerator.cxx cmake-3.5.1/Source/CPack/cmCPackDragNDropGenerator.cxx --- cmake-3.5.0/Source/CPack/cmCPackDragNDropGenerator.cxx 2016-03-08 14:36:22.000000000 +0000 +++ cmake-3.5.1/Source/CPack/cmCPackDragNDropGenerator.cxx 2016-03-24 14:12:21.000000000 +0000 @@ -20,20 +20,13 @@ #include -#include -#include -#include - -// 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 -#if defined(__clang__) -# pragma clang diagnostic pop +#include + +#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 #endif static const char* SLAHeader = @@ -652,9 +645,11 @@ 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 @@ 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'); diff -Nru cmake-3.5.0/Source/QtDialog/CMakeLists.txt cmake-3.5.1/Source/QtDialog/CMakeLists.txt --- cmake-3.5.0/Source/QtDialog/CMakeLists.txt 2016-03-08 14:36:22.000000000 +0000 +++ cmake-3.5.1/Source/QtDialog/CMakeLists.txt 2016-03-24 14:12:21.000000000 +0000 @@ -173,6 +173,7 @@ 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 -Nru cmake-3.5.0/Tests/RunCMake/FindPkgConfig/FindPkgConfig_cache_variables.cmake cmake-3.5.1/Tests/RunCMake/FindPkgConfig/FindPkgConfig_cache_variables.cmake --- cmake-3.5.0/Tests/RunCMake/FindPkgConfig/FindPkgConfig_cache_variables.cmake 2016-03-08 14:36:24.000000000 +0000 +++ cmake-3.5.1/Tests/RunCMake/FindPkgConfig/FindPkgConfig_cache_variables.cmake 2016-03-24 14:12:22.000000000 +0000 @@ -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 () diff -Nru cmake-3.5.0/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake cmake-3.5.1/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake --- cmake-3.5.0/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake 2016-03-08 14:36:24.000000000 +0000 +++ cmake-3.5.1/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake 2016-03-24 14:12:22.000000000 +0000 @@ -97,6 +97,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 @@ 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 @@ -129,5 +131,23 @@ 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 -Nru cmake-3.5.0/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch.cmake cmake-3.5.1/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch.cmake --- cmake-3.5.0/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch.cmake 1970-01-01 00:00:00.000000000 +0000 +++ cmake-3.5.1/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch.cmake 2016-03-24 14:12:22.000000000 +0000 @@ -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*] "" +) diff -Nru cmake-3.5.0/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch-install-check.cmake cmake-3.5.1/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch-install-check.cmake --- cmake-3.5.0/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch-install-check.cmake 1970-01-01 00:00:00.000000000 +0000 +++ cmake-3.5.1/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch-install-check.cmake 2016-03-24 14:12:22.000000000 +0000 @@ -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)