MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0006193 | CMake | CMake | public | 2007-12-21 09:21 | 2008-01-10 15:18 |
Reporter | Nicolas Tisserand | ||||
Assigned To | |||||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | OS | OS Version | |||
Product Version | |||||
Target Version | Fixed in Version | ||||
Summary | 0006193: XCode generator produces projects that do not handle correctly handle certain dependency patterns | ||||
Description | Hi, I'm working on a C++ project that's been happily using CMake as a cross-platform (mac/pc/linux) build tool for a year now. We're using CMake 2.4.6 on all platforms. Recently, some changes in our build system lead to the following dependency graph: LIB1 <- EXE1 <- LIB2 <- EXE2 ^ | `---------------------' (LIB* are static libraries, and EXE* executables) EXE1 is a tool that generates input source files for LIB2, hence the extra-dependency. Everything works nice and smooth with the Linux / Make, MacOS X / Make and WIN32 / VC80 generators. Trouble is, on the mac, the XCODE_DEPEND_HELPER (XDH) is added to all final (executable, dynamic libraries and modules) targets by the XCode generator: .----------------------------- v \ LIB1 <-------. | EXE1 <- LIB2 <- EXE2 XDH <-------' | ^------------------------------' When EXE2 (or ALL_BUILD) is the active target and LIB2 needs a rebuild, the following happens: * The XCODE_DEPEND_HELPER make command is run, doing nothing. * EXE1 is left alone * LIB2 gets correctly rebuilt * EXE2 does not get relinked because when XCODE_DEPEND_HELPER was run, EXE2 was still up-to-date with LIB2 :-( This is very annoying. Here's the only sort-of workaround I could come up with: * remove the EXE1 <- LIB2 dependency, so that EXE2 gets correctly relinked when the active target is EXE2 * exclude EXE1 from the build (using EXCLUDE_FROM_ALL), so that EXE2 gets correctly relinked when the active target is ALL_BUILD But this forces XCode users to rebuild EXE1 manually. | ||||
Steps To Reproduce | |||||
Additional Information | Please find attached a minimal example project that you can use to reproduce the behavior. There is a README.txt inside the archive, with detailed instructions. | ||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | ![]() https://public.kitware.com/Bug/file/1266/CMakeBug.tar.gz | ||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2007-12-21 09:21 | Nicolas Tisserand | New Issue | |||
2007-12-21 09:21 | Nicolas Tisserand | File Added: CMakeBug.tar.gz | |||
2008-01-02 18:03 | Bill Hoffman | Note Added: 0010052 | |||
2008-01-10 15:18 | Bill Hoffman | Note Added: 0010106 | |||
2008-01-10 15:18 | Bill Hoffman | Status | new => closed | ||
2008-01-10 15:18 | Bill Hoffman | Resolution | open => fixed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|