Hi Gregor,

Thanks for working on this.  Unfortunately it is a bit complex.

On 1/11/2015 2:25 PM, Gregor Jasny wrote:
> The current approach to determine the CompilerId via
> an XCTest bundle on iOS requires a valid code sign identity.

All the subsequent try_compile calls, including ABI detection,
currently require a signing identity too.  An approach to
overcome that (CODE_SIGNING_REQUIRED) is mentioned here:

 http://www.cmake.org/Bug/view.php?id=15329

I've made a change using that approach here:

 Xcode: Do not require code signing for compiler id (#15329)
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=584aaa1c

That also discusses the need to use a different product type
for try_compile calls too.  For those linking is needed so we
cannot use static libraries.  Selection has to be specific to
the target platform.

> This is a regression compared to CMake 3.0. This patch changes
> the detection to be performed on a static library and also
> unifies detection across iOS and OSX.

As explained in

 http://www.cmake.org/Bug/view.php?id=15214#c37064

3.0 only detected the host OS X compiler.

> -    #  Ld ...
> +    #  CompileC ...

Some versions of Xcode do not actually print the compilation
command line with the full path to the correct compiler tool.
For example with C++ it may compile with the path to the C
compiler and use "-x c++".  That's why we have to use Ld, and
therefore need a product type that links.

I really wish there were another way to detect the path to the
compiler tool that Xcode invokes :(

-Brad
-- 

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

Reply via email to