View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0013452 | CMake | CMake | public | 2012-08-03 00:25 | 2013-01-09 10:54 | ||||
Reporter | Grant Limberg | ||||||||
Assigned To | Brad King | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | CMake 2.8.8 | ||||||||
Target Version | CMake 2.8.10 | Fixed in Version | |||||||
Summary | 0013452: 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" | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | ![]() | ||||||||
Relationships | |
Relationships |
Notes | |
(0030163) Brad King (manager) 2012-08-03 09:41 |
Try this patch:diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 938977b..c366bcb 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -3739,7 +3739,7 @@ cmGlobalXCodeGenerator const char* configName = this->GetCMakeCFGIntDir(); std::string dir = this->GetObjectsNormalDirectory( - this->CurrentProject, configName, gt->Target); + "$(PROJECT_NAME)", configName, gt->Target); if(this->XcodeVersion >= 21) { dir += "$(CURRENT_ARCH)/"; |
(0030164) Brad King (manager) 2012-08-03 10:31 |
Fixed and test added: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b237dbd8 [^] Thanks for the detailed report. |
(0032009) Robert Maynard (manager) 2013-01-09 10:54 |
Closing resolved issues that have not been updated in more than 4 months. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2012-08-03 00:25 | Grant Limberg | New Issue | |
2012-08-03 00:25 | Grant Limberg | File Added: CMakeBug.zip | |
2012-08-03 09:41 | Brad King | Note Added: 0030163 | |
2012-08-03 09:41 | Brad King | Assigned To | => Brad King |
2012-08-03 09:41 | Brad King | Status | new => assigned |
2012-08-03 10:31 | Brad King | Note Added: 0030164 | |
2012-08-03 10:31 | Brad King | Status | assigned => resolved |
2012-08-03 10:31 | Brad King | Resolution | open => fixed |
2012-08-03 10:31 | Brad King | Target Version | => CMake 2.8.10 |
2013-01-09 10:54 | Robert Maynard | Note Added: 0032009 | |
2013-01-09 10:54 | Robert Maynard | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |