Commit Graph

20 Commits

Author SHA1 Message Date
Gregor Jasny f951d0adb4 Add tests for BUNDLE_EXTENSION 2016-07-21 23:18:56 -07:00
Kitware Robot d9fd2f5402 Revise C++ coding style using clang-format
Run the `Utilities/Scripts/clang-format.bash` script to update
all our C++ code to a new style defined by `.clang-format`.
Use `clang-format` version 3.8.

* If you reached this commit for a line in `git blame`, re-run the blame
  operation starting at the parent of this commit to see older history
  for the content.

* See the parent commit for instructions to rebase a change across this
  style transition commit.
2016-05-16 16:05:19 -04:00
Ruslan Baratov e3fc2899c8 Fix iOS combined feature for single architecture targets
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.
2016-03-15 10:09:50 -04:00
Brad King 070f09f91e Merge topic 'xcode-global-attribute-variant'
d8bc26a0 Xcode: Parse variant and genex for CMAKE_XCODE_ATTRIBUTE (#14947)
dc0ddb9e Xcode: Store configuration name along with XcodeObject (#14947)
28f98cee Xcode: Make CMAKE_XCODE_ATTRIBUTE calculation last step (#14947)
28db2268 Xcode: Factor out XCODE_ATTRIBUTE_ variant filter (#14947)
2016-01-07 13:28:28 -05:00
Gregor Jasny ba39d7e9d0 Xcode: Escape all backslashes in strings (#15328)
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.
2016-01-07 13:23:24 -05:00
Gregor Jasny d8bc26a065 Xcode: Parse variant and genex for CMAKE_XCODE_ATTRIBUTE (#14947) 2016-01-03 22:31:12 +01:00
Ruslan Baratov 565d080a9a Xcode: Add support for combined install on iOS
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.
2015-12-10 22:36:12 +01:00
Brad King d71920c457 Merge topic 'xcode-watch-and-tvos'
a91eebeb Xcode: Recognise Watch and TV OS as embedded platforms
2015-10-26 13:13:02 -04:00
Gregor Jasny a91eebebdb Xcode: Recognise Watch and TV OS as embedded platforms 2015-10-23 22:19:43 +02:00
Gregor Jasny 601e6e1ad1 Xcode: Use regular expression to extract all optimisation flags (#15794) 2015-10-23 19:29:09 +02:00
Brad King dd2b88777f Merge topic 'fix-ios-install'
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
2015-09-01 09:53:30 -04:00
Gregor Jasny ad262917d9 Xcode: Add unit test for iOS project install (#12506) 2015-08-26 20:54:52 +02:00
Gregor Jasny d2c2319d64 Replace CMAKE_XCODE_EFFECTIVE_PLATFORMS with call to PlatformIsAppleIos
Currently the CMAKE_XCODE_EFFECTIVE_PLATFORMS property acts only as
a kind of toggle switch to enable iOS project layout features.
But instead of relying on this undocumented property, better detect
the presence of an iOS SDK directly.
2015-08-25 21:53:51 +02:00
Gregor Jasny 67f60958b6 Darwin: Add support for tbd library stub files
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.
2015-08-24 22:29:33 +02:00
Gregor Jasny 744e6c497c Fix iOS Bundle layouts (#15669)
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.
2015-08-24 09:50:20 -04:00
Gregor Jasny 6693590f81 Xcode: Refine quoting rules for Strings
$ and . do not need to be quoted, but brackets and * must be to
not confuse the Xcode parser.
2015-04-17 21:50:05 +02:00
Gregor Jasny dfd6f1f290 Xcode: Also quote strings containing // (#15487)
Otherwise those will be interpreted as start of a comment

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
2015-04-04 22:13:45 +02:00
Gregor Jasny 0ee2a004e7 OS X: Add platform-specific Frameworks search path
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>
2015-02-23 13:10:52 -05:00
Gregor Jasny bf8f9c29e7 Xcode: Teach XCODE_ATTRIBUTE target properties about generator expressions
Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
2015-02-12 13:35:31 -05:00
Brad King a339ea6529 Xcode: Add source file property to control file type (#14854)
Add source file properties to control Xcode file type attributes:

  XCODE_EXPLICIT_FILE_TYPE   => explicitFileType
  XCODE_LAST_KNOWN_FILE_TYPE => lastKnownFileType

Add a RunCMake.XcodeProject test to verify generated project content.
2014-05-15 14:34:52 -04:00