On 01/03/2013 04:33 PM, Bin Chen wrote:
> clang: error: no such file or directory: 
> '/Users/bchen/share/temp/cmake-obj-lib/b-xcode/Debug/liba.a'
> clang: error: no such file or directory: 
> '/Users/bchen/share/temp/cmake-obj-lib/b-xcode/Debug/libb.a'

Xcode does not seem to recognize targets that do not actually list any
source files to compile.  It looks like our ObjectLibrary test has a
workaround for this by adding an empty "dummy.c":

 
http://cmake.org/gitweb?p=cmake.git;a=blob;f=Tests/ObjectLibrary/CMakeLists.txt;hb=v2.8.10.2#l22

I just updated the documentation to note this suggestion:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=51988a4f

> Searched the build tree, it generated two libs with _obj.
> 
> ./test.build/Debug/a_obj.build/Objects-normal/liba_obj.a
> ./test.build/Debug/b_obj.build/Objects-normal/libb_obj.a

Xcode treats object files as intermediate products rather than first-class
so the only way to implement the compilation part of object libraries is
to pretend they are static libraries and then hide the .a files away where
no one should be bothered by them.  Ignore those.

-Brad
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to