Hello,
I addressed all the comments you gave about the last series.
changes to v1:
* Slit out independent patches
* Restrict testing to Cocoa Applications because I have not managed
to test Frameworks without crashing Xcode
* cross referenced properties
* Enhanced error logs in Xcode generator
open issues:
* if a fatal error is issued in cmGlobalXCodeGenerator::CreateBuildSettings
generation does not stop. So you'll see the error for every configuration.
* Hooking up CocoaExample into test suite. Note: This is an Cocoa application,
so it needs a valid display session.
targets for separate patch sets:
* Framework test support
* Makefile / Ninja xctest support - but this will need some bigger patches
in all Framework, CFBundle, and Application Bundle code. Don't know if it's
worth the trouble
On 09/12/14 21:40, Brad King wrote:
>> > On non-Apple platforms and Xcode < 5.0 those XCTest bundles are pretty
>> > useless.
> What should CMake do on those platforms? The fact that an add_library
> call has occurred means it needs to do something with the target.
> Should it be an error to ensure that the project adds such targets
> only conditionally?
I'd say handle it exactly like CFBundles are handled on foreign platforms.
I added a warning if the Xcode version is too old to support XCTest.
>> > Note: It is currently not possible to run the tests without opening Xcode
>> > once to (auto) generate the Schema files. Otherwise calling
>> > "xcodebuild test -scheme CocoaExample" will not recognise the scheme.
> Does this mean we can't automatically setup testing?
I added a Schema and install it as part of the configuration run. But I don't
know how stable the IDs in the schema or pbxproj are. You can run the tests:
mkdir Tests/CocoaExample/_build
cd Tests/CocoaExample/_build
cmake -GXcode ..
xcodebuild -scheme CocoaExample test
Thanks,
Gregor
Gregor Jasny (4):
Use GetCFBundleDirectory within GetFullNameInternal
Call cmTarget::IsCFBundleOnApple to decide if bundle is being built
Add handling for XCTest bundles
Add XCTest Example
Help/manual/cmake-properties.7.rst | 2 +
Help/prop_tgt/XCTEST.rst | 11 +
Help/prop_tgt/XCTEST_HOST.rst | 8 +
Source/cmGlobalXCodeGenerator.cxx | 69 ++-
Source/cmTarget.cxx| 30 +-
Source/cmTarget.h | 3 +
Tests/CocoaExample/CMakeLists.txt | 31 +
Tests/CocoaExample/CocoaExample.xcscheme | 110
Tests/CocoaExample/CocoaExample/AppDelegate.h | 7 +
Tests/CocoaExample/CocoaExample/AppDelegate.m | 18 +
Tests/CocoaExample/CocoaExample/Info.plist.in | 32 +
Tests/CocoaExample/CocoaExample/MainMenu.xib | 680 +
Tests/CocoaExample/CocoaExample/main.m | 5 +
.../CocoaExampleTests/CocoaExampleTests.m | 13 +
14 files changed, 1005 insertions(+), 14 deletions(-)
create mode 100644 Help/prop_tgt/XCTEST.rst
create mode 100644 Help/prop_tgt/XCTEST_HOST.rst
create mode 100644 Tests/CocoaExample/CMakeLists.txt
create mode 100644 Tests/CocoaExample/CocoaExample.xcscheme
create mode 100644 Tests/CocoaExample/CocoaExample/AppDelegate.h
create mode 100644 Tests/CocoaExample/CocoaExample/AppDelegate.m
create mode 100644 Tests/CocoaExample/CocoaExample/Info.plist.in
create mode 100644 Tests/CocoaExample/CocoaExample/MainMenu.xib
create mode 100644 Tests/CocoaExample/CocoaExample/main.m
create mode 100644 Tests/CocoaExample/CocoaExampleTests/CocoaExampleTests.m
--
1.9.3 (Apple Git-50)
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers