The following issue has been SUBMITTED. 
====================================================================== 
http://cmake.org/Bug/view.php?id=13452 
====================================================================== 
Reported By:                Grant Limberg
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   13452
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2012-08-03 00:25 EDT
Last Modified:              2012-08-03 00:25 EDT
====================================================================== 
Summary:                    Invalid path generated to .o files in an object
library with Xcode Generator
Description: 
When linking an executable to a library built using the new object library
format for add_library(), the path to the .o files is invalid when linking the
final executable.

I've attached a sample project:

CMakeLists.txt - project(CMAKE-BUG)
|
| - liba/CMakeLists.txt - project(A)
|
| - exec1/CMakeLists.txt - project(exec1)
|
| - exec2/CMakeLists.txt - project(exec2)

When Xcode goes to link the .o file from liba, the path given to the linker is:

/Users/grant/Development/CMakeBug/build/liba/exec2.build/Debug/A.build/Objects-normal/x86_64/a.o'

However, the actual path to the .o file is:

clang: error: no such file or directory:
'/Users/grant/Development/CMakeBug/build/liba/CMAKE-BUG.build/Debug/A.build/Objects-normal/x86_64/a.o'

Somehow the folder that should be named CMAKE-BUG.build, after the top level
project name, is being replaced with the name of the last executable project
name that was loaded. In this case, exec2.build.




Steps to Reproduce: 
See attached minimal sample.  Build on OS X with arguments "-G Xcode"
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2012-08-03 00:25 Grant Limberg  New Issue                                    
======================================================================

--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to