summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
Commit message (Collapse)AuthorAgeFilesLines
* Tests: Specify destination for Xcode schemeGregor Jasny2021-10-051-1/+6
| | | | | | | The `Using the first of multiple matching destinations` warning vanishes if we explicitly specify a destination. Fixes: #22704
* FindXCTest: Fix output directory for test bundle with Xcode 12.5Yauheni Khnykin2021-07-261-3/+8
| | | | | | | | | The fix from commit eafe740ead (FindXCTest: Fix output directory for test bundle with new build system, 2021-02-09, v3.19.5~5^2) is not necessary with Xcode 12.5, which seems to have changed/fixed the behaviour again. Fixes: #22462
* Xcode: add extra '$(inherited)' entries using InheritBuildSettingAttribute.Danny Parker2021-05-051-0/+1
| | | | | | | | | These have been added to: GCC_PREPROCESSOR_DEFINITIONS OTHER_CFLAGS OTHER_LDFLAGS This is to allow Cocoapods to work correctly as it uses xcconfig files to alter build settings in Xcode, and requires these build settings to inherit from their parent, not overwrite.
* Tests: Add XCTest cases to cover output directory selectionYauheni Khnykin2021-03-121-0/+26
| | | | Fixes: #21800
* Merge topic 'xcode12-ios_install_combined'Brad King2021-02-091-4/+25
|\ | | | | | | | | | | | | 0110aa018d IOS_INSTALL_COMBINED: Support Xcode 12 (command line only) Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5785
| * IOS_INSTALL_COMBINED: Support Xcode 12 (command line only)Craig Scott2021-02-081-4/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Xcode 12 doesn't allow nested builds within the same build directory. That means we can no longer do an install by building the install target when IOS_INSTALL_COMBINED is true. We can, however, still do an install by running the cmake_install.cmake script or executing cmake --install, since there is no outer build and therefore the associated SDK can be built as a sub-build. The non-build methods previously didn't work when IOS_INSTALL_COMBINED was true because the generated install script and the CMakeIOSInstallCombined script both made certain assumptions that relied on being part of a build. Those assumptions are now removed. A side-effect of this work is that cpack now also works from the command line when IOS_INSTALL_COMBINED is true. Relates: #21282 Fixes: #20023
* | Xcode: Generalize inheritance of project-level search pathsBrad King2020-12-221-0/+1
| | | | | | | | | | | | | | | | | | Generalize the change from commit bffb17be3d (Xcode: Inherit target library and framework search paths from project, 2020-11-04, v3.19.0-rc3~4^2) to apply to framework and other kinds of search paths added either for include directories or for linking. Issue: #21617
* | Tests: Add Xcode cases fixed by switch to the "new build system"Yauheni Khnykin2020-11-301-0/+29
|/ | | | | | | | | | | Support of 'new build system' in Xcode fixes indirectly few issues which were caused by workaround with `XCODE_DEPEND_HELPER.cmake` autogenerated script. This patch adds test which is originated from issue #20260 and reproduces this issue when 'new build system' is disabled. Fixes: #20260
* xcode: conditionally enable combined install testsGregor Jasny2020-09-251-6/+1
| | | | | | | | | | | | | | | | The new Xcode 12 build system does not support recursive invocation. Therefore lazily triggered builds for the corresponding platform which run during the `install` target fail with: ``` error: unable to attach DB: error: accessing build database ``` While looking for a work-around we conditionally disable those tests. Issue: #21206
* xcode: annotate test output with selected SDKGregor Jasny2020-09-251-8/+8
|
* Tests: Skip RunCMake.XcodeProject device cases for Xcode "new build system"Brad King2020-09-181-0/+5
| | | | | | | | The Xcode "new build system" selects different architectures for device builds than the old build system does. Skip those tests on Xcode 12+ pending further investigation. Issue: #21206
* Xcode: Switch to the "new build system" for Xcode 12 and aboveBrad King2020-09-181-0/+4
| | | | | | | Provide an option to switch back to the original build system via `-T buildsystem=1`. Fixes: #18088
* Xcode: Use "Link Binary With Libraries" build phase in some casesGusts Kaksis2020-08-311-0/+13
| | | | | | | OBJECT and STATIC libraries (framework or non-framework) do not use this build phase. Not all items to be linked use this build phase either. Co-Authored-By: Craig Scott <craig.scott@crascit.com>
* Xcode: Link matching zlib for iOS Simulator SDKGregor Jasny2020-08-131-2/+2
| | | | | | | | | | | The XcodeRemoveExcessiveISystem test runs `find_package(ZLIB)` which returns an SDK-relative path to `zlib.tlb`. When the test switches the SDK for building to something different than the SDK used for configuration the linker rightfully complains about the mismatch. The fix is to configure and build with the same SDK.
* Add INTERFACE libraries to generated buildsystem if they have SOURCESBrad King2020-08-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | INTERFACE libraries were created with the intention of collecting usage requirements for use by other targets via `target_link_libraries`. Therefore they were not allowed to have SOURCES and were not included in the generated buildsystem. In practice, this has become limiting: * Header-only libraries do have sources, they just do not compile. Developers should be able to edit those sources (the header files) in their IDE. * Header-only libraries may need to generate some of their header files via custom commands. Some projects work around these limitations by pairing each interface library with an `add_custom_target` that makes the header files and custom commands appear in the generated buildsystem and in IDEs. Lift such limitations by allowing INTERFACE libraries to have SOURCES. For those with sources, add a corresponding build target to the generated buildsystem. Fixes: #19145
* Swift: Exclude SDK include pathsYauheni Khnykin2020-02-101-0/+21
| | | | | | | | Populate `CMAKE_Swift_IMPLICIT_INCLUDE_DIRECTORIES` with the macOS SDK's include directory so that we filter such implicit directories out of Swift targets. Fixes: #19845
* Xcode: Fix post build script for 'top level project only' optYauheni Khnykin2020-01-271-0/+10
| | | | | | | | | | When CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY is set on Xcode generator created post build scripts which tried to call XCODE_DEPEND_HELPER.make script in subproject. But XCODE_DEPEND_HELPER.make don't exist in subprojects when mentioned option is set on. Fixes: #20262
* ObjC: Add OBJC/OBJCXX flags to Xcode projectsCristian Adam2019-11-111-0/+14
| | | | Fixes: #19936
* Xcode: Fix generated references to CMakeLists.txt filesBrad King2019-11-051-0/+1
| | | | | | | | | Refactoring in commit 2d888e3390 (cmSourceFile: Rename mutating GetFullPath() overload, 2019-08-29, v3.16.0-rc1~160^2) accidentally left the paths to `CMakeLists.txt` files empty in generated Xcode project files. Fixes: #19927
* Precompile headers: Add unit testsCristian Adam2019-08-281-0/+1
|
* Apple: Properly lookup XCTest for iOS and tvOSGregor Jasny2019-05-111-0/+15
| | | | Closes: #19172
* Apple: Introduce separate system name for iOS, tvOS, and watchOSGregor Jasny2019-02-041-23/+22
| | | | | | | | | | | - Remove code signing requirements for non-macOS - Do not set deployment target for non-macOS - Build static library for compiler feature detection for non-macOS - Use framework to run CompilerId tests for watchOS - Port tests to new SDK handling - Add new Apple cross-compiling section to toolchain documentation Closes: #17870
* Tests: Isolate RunCMake.XcodeProject per-device cases from host archBrad King2019-02-041-30/+35
| | | | | Run all host cases before per-device cases. Do not expose the host `CMAKE_OSX_ARCHITECTURES` environment value to the per-device tests.
* Xcode: Add variables and properties to configure schemesGregor Jasny2018-08-011-0/+1
| | | | | | | | | Add `XCODE_SCHEME_*` target properties and associated variables `CMAKE_XCODE_SCHEME_*` to initialize them on target creation. Map each target property value to an associated Xcode scheme entry. Co-Author: Martin Sander <mail@martin-sander.de> Fixes: #17919
* Restore support for explicitly referenced CMakeLists.txt sourcesBrad King2018-04-131-0/+2
| | | | | | | | | | | | | | Since commit v3.11.0-rc1~467^2 (VS,Xcode: Add CMakeLists.txt sources without mutating targets, 2017-10-18) we do not add `CMakeLists.txt` to target sources but instead generate references to them directly. This broke projects that explicitly specify their `CMakeLists.txt` file as a source file because the explicit entry is no longer consolidated with the generated one. Teach the relevant generators to avoid duplicating `CMakeLists.txt` source references and add test cases. Fixes: #17828
* Xcode: Generate ZERO_CHECK generator target only onceGregor Jasny2018-02-221-0/+14
| | | | | | | | | | | In case CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY has been enabled generate only the root-level ZERO_CHECK target so targets in subdirectories pick up the root generator target of ZERO_CHECK. For the case that CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY is not enabled more investigation and a proper and final fix is still needed. Issue: 14297
* sourceFile properties: add property INCLUDE_DIRECTORIESMarc Chevrier2018-01-241-0/+2
|
* Darwin: Emit deployment target that matches the SDKGregor Jasny2017-12-221-0/+18
| | | | Closes: #17431
* Add generator expression support to per-source COMPILE_DEFINITIONSMarc Chevrier2017-12-051-0/+1
| | | | | | This allows users to specify different genex-based compile definitions for each file in a target. Fixes: #17508
* Xcode: Add option to generate only topmost project fileGregor Jasny2017-10-311-0/+1
| | | | Closes #16780
* Xcode 9: Lower iOS deployment version to get armv7 buildsGregor Jasny2017-10-101-5/+16
|
* Revert "Xcode: Adjust tests to drop of 32bit iOS architectures"Gregor Jasny2017-10-101-2/+0
| | | | This reverts commit d210b2813072c874ee13fcc941e41aacacf09874.
* Xcode: Adjust tests to drop of 32bit iOS architecturesGregor Jasny2017-10-051-0/+2
|
* Xcode: Add test for schema generationGregor Jasny2017-03-121-0/+16
| | | | Closes: #15441
* Xcode: Control emission of EFFECTIVE_PLATFORM_NAMEGregor Jasny2017-01-201-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When building with multiple SDKs within one project Xcode requires the usage of ${EFFECTIVE_PLATFORM_NAME} to put temporary and build outout into separate directories. For example an iOS device and simulator build use two different SDKs (iphoneos and iphonesimulator). In the past cmake tries to detect embedded toolchains that could possibly use simulators and emitted EFFECTIVE_PLATFORM_NAME (EPN) at the proper locations. In #16253 Mark noticed that if he uses macosx and iphoneos in combination the necessary EPN is not emitted. This is because CMake by default assumes macosx SDK which does not trigger EPN emission. The fist naive approach - enabling EPN unconditionally revealed that then the EPN leaks into generator expressions like $<TARGET_FILE:xxx> which might be a regression and thus is unacceptable. The next approach was to add an CMake property to enable EPN emission unconditionally. This solved the reported problem. But the EPN leakage also happened for the embedded toolchains already without anyone noticing. So the control property was turned into a tri-state one: * No definition: EPN is activated for embedded toolchains like before * ON: EPN is always emitted * OFF: EPN is never emitted That approach gives the user the chance to disable EPN for embedded toolchains and restores generator expression functionality for those. Closes: #16253
* Tests: Add case for Xcode per-config per-source COMPILE_FLAGS diagnosticBrad King2016-10-281-0/+2
|
* Fix XCODE_ATTRIBUTE_..._LOCATION target property lookupBrad King2016-09-221-0/+1
| | | | | | | | | | | | | | | Refactoring in commit v3.5.0-rc1~272^2~16 (cmGeneratorTarget: Add API for property keys, 2015-10-25) changed the Xcode generator implementation of `XCODE_ATTRIBUTE_...` properties to use the target `GetProperty` method on each `XCODE_ATTRIBUTE_...` property listed by `GetPropertyKeys` instead of looping over the property entries directly. This made the lookup of property names of the form `XCODE_ATTRIBUTE_..._LOCATION` accidentally trigger the computed property logic for the undocumented/legacy `<CONFIG>_LOCATION` property. Of course the computed property value is not the same as the value stored in the `XCODE_ATTRIBUTE_..._LOCATION` property. Fix the computed property logic to avoid triggering on `XCODE_ATTRIBUTE_...` attributes. Closes: #16319
* Add tests for BUNDLE_EXTENSIONGregor Jasny2016-07-221-4/+16
|
* Fix iOS combined feature for single architecture targetsRuslan Baratov2016-03-151-0/+20
| | | | | | | If list of valid target architectures is empty for given SDK then there will be no VALID_ARCHS build setting returned by Xcode. Return "" (empty string) explicitly in this case. This may happens if CMAKE_IOS_INSTALL_COMBINED is ON but only one architecture used in target.
* Xcode: Escape all backslashes in strings (#15328)Gregor Jasny2016-01-071-0/+1
| | | | | | | | | | Before this change backslashes in strings were escaped during compile flags adds via AppendFlag(). But global flags like OTHER_CPLUSPLUSFLAGS are not added as flags but as plain strings so they were not escaped properly. Now the escaping is performed within cmXCodeObject::PrintString() which ensures that strings are always encoded.
* Xcode: Add support for combined install on iOSRuslan Baratov2015-12-101-0/+36
| | | | | | | | | | | | This patch solves the problem of installing both: Device and Simulator libraries on iOS. Before only one of them was installed. If the IOS_INSTALL_COMBINED property is set on a target, a special install hook will be activated which builds the corresponding target and combines both at the install location. The original patch was contributed by Ruslan Baratov, and polished by Gregor Jasny.
* Merge topic 'xcode-watch-and-tvos'Brad King2015-10-261-0/+32
|\ | | | | | | | | a91eebeb Xcode: Recognise Watch and TV OS as embedded platforms
| * Xcode: Recognise Watch and TV OS as embedded platformsGregor Jasny2015-10-231-0/+32
| |
* | Xcode: Use regular expression to extract all optimisation flags (#15794)Gregor Jasny2015-10-231-0/+3
|/
* Merge topic 'fix-ios-install'Brad King2015-09-011-0/+14
|\ | | | | | | | | | | | | ad262917 Xcode: Add unit test for iOS project install (#12506) 48fe617e Fix installation of iOS targets (#12506) d2c2319d Replace CMAKE_XCODE_EFFECTIVE_PLATFORMS with call to PlatformIsAppleIos
| * Xcode: Add unit test for iOS project install (#12506)Gregor Jasny2015-08-261-0/+14
| |
* | Darwin: Add support for tbd library stub filesGregor Jasny2015-08-241-0/+6
|/ | | | | | | | Starting with Xcode 7 the OSX and iOS SDKs contain only stub files for dynamic system libraries. These stub files contain some meta data and a list of exported sysbols in plain text. They are handled by the toolchain like regular dylibs.
* Fix iOS Bundle layouts (#15669)Gregor Jasny2015-08-241-0/+32
| | | | | | | | | | In contrast to Mac OS X App bundle layout the iOS one lacks the Contents/MacOSX structure. See also the Bundle Structures documentation in Mac Developer Library: https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html For now detect iOS targets by checking the SDK name/path.
* Xcode: Also quote strings containing // (#15487)Gregor Jasny2015-04-041-0/+1
| | | | | | Otherwise those will be interpreted as start of a comment Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
* OS X: Add platform-specific Frameworks search pathGregor Jasny2015-02-231-0/+3
| | | | | | | | | | | | | | | Otherwise find_library is unable to lookup the XCTest framework which is not located in the SDK serach path: In the 10.10 SDK the SDK frameworks are located here: $DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks whereas the Platform SDKs are located here: $DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/Library/Frameworks Signed-off-by: Gregor Jasny <gjasny@googlemail.com>