[cmake-developers] [PATCH v8 0/5] Add XCTest Bundle Support

Gregor Jasny gjasny at googlemail.com
Sat Mar 14 15:03:44 EDT 2015


Hello,

this is the eighth version of the XCTest patch. Besides the
changes mentioned below I added some more input validation
for the two xctest functions.

On 27/02/15 16:26, Brad King wrote:
> The XCTestUtilities module is feeling more like a find module
> now that it finds XCTest components.  Perhaps we should rename
> it to FindXCTest and use find_package(XCTest) to use it.

I changed it into a Find module and it looks much more polished
now.

> Is this kind of modification of the testee safe?  Will projects
> actually want their targets modified by adding tests for them?
> Currently the settings will affect how the tested targets are
> installed.

I fully agree that modifying the testee is not something one would
expect when adding a test for it. Therefore I reverted the rpath
setting for Frameworks and replaced it with a DYLD environment
variable when calling xctest. For the App Bundle I reverted your
ENABLE_EXPORTS call and replaced it with Xcode specific settings
for the XCODE generator and a linker flag for the Makefile generator.

Once you ACK the series I will create a topic branch and follow
the developer instructions.

Thanks,
Gregor

Brad King (2):
  Tests: Compute Xcode version for any generator on OS X
  Help: Add notes for topic 'xcode-xctest'

Gregor Jasny (3):
  OS X: Add handling for XCTest bundles
  OS X: Add FindXCTest module
  Tests: Add XCTest example to test Frameworks and Cocoa App Bundles

 Help/manual/cmake-modules.7.rst                    |   1 +
 Help/manual/cmake-properties.7.rst                 |   1 +
 Help/module/FindXCTest.rst                         |   1 +
 Help/prop_tgt/XCTEST.rst                           |  13 +
 Help/release/dev/xcode-xctest.rst                  |   6 +
 Modules/FindXCTest.cmake                           | 196 ++++++
 Source/cmGlobalXCodeGenerator.cxx                  |  12 +-
 Source/cmTarget.cxx                                |  16 +-
 Source/cmTarget.h                                  |   3 +
 Tests/CMakeLists.txt                               |  16 +
 Tests/XCTest/CMakeLists.txt                        |  57 ++
 Tests/XCTest/CocoaExample/AppDelegate.h            |   6 +
 Tests/XCTest/CocoaExample/AppDelegate.m            |  18 +
 Tests/XCTest/CocoaExample/Info.plist               |  30 +
 Tests/XCTest/CocoaExample/MainMenu.xib             | 680 +++++++++++++++++++++
 Tests/XCTest/CocoaExample/main.m                   |   5 +
 Tests/XCTest/CocoaExampleTests/CocoaExampleTests.m |  13 +
 Tests/XCTest/FrameworkExample/FrameworkExample.c   |   6 +
 Tests/XCTest/FrameworkExample/FrameworkExample.h   |   1 +
 Tests/XCTest/FrameworkExample/Info.plist           |  28 +
 .../FrameworkExampleTests/FrameworkExampleTests.m  |  16 +
 Tests/XCTest/FrameworkExampleTests/Info.plist      |  24 +
 22 files changed, 1146 insertions(+), 3 deletions(-)
 create mode 100644 Help/module/FindXCTest.rst
 create mode 100644 Help/prop_tgt/XCTEST.rst
 create mode 100644 Help/release/dev/xcode-xctest.rst
 create mode 100644 Modules/FindXCTest.cmake
 create mode 100644 Tests/XCTest/CMakeLists.txt
 create mode 100644 Tests/XCTest/CocoaExample/AppDelegate.h
 create mode 100644 Tests/XCTest/CocoaExample/AppDelegate.m
 create mode 100644 Tests/XCTest/CocoaExample/Info.plist
 create mode 100644 Tests/XCTest/CocoaExample/MainMenu.xib
 create mode 100644 Tests/XCTest/CocoaExample/main.m
 create mode 100644 Tests/XCTest/CocoaExampleTests/CocoaExampleTests.m
 create mode 100644 Tests/XCTest/FrameworkExample/FrameworkExample.c
 create mode 100644 Tests/XCTest/FrameworkExample/FrameworkExample.h
 create mode 100644 Tests/XCTest/FrameworkExample/Info.plist
 create mode 100644 Tests/XCTest/FrameworkExampleTests/FrameworkExampleTests.m
 create mode 100644 Tests/XCTest/FrameworkExampleTests/Info.plist

-- 
2.3.0



More information about the cmake-developers mailing list