MantisBT - CMake
View Issue Details
0003648CMakeCMakepublic2006-08-21 20:062010-12-14 18:46
peter.carr 
David Cole 
normalmajoralways
closedfixed 
 
 
0003648: Directory creation error using MACOSX_BUNDLE
When using MACOSX_BUNDLE in ADD_EXECUTABLE the following error is generated:

/usr/bin/ld: can't create output file: test.app/Contents/MacOS/test (No
such file or directory, errno = 2)

This can be solved by inserting this line before ADD_EXECUTABLE:
SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR})

Probably related to:
http://www.vtk.org/Bug/bug.php?op=show&bugid=1302 [^]
No tags attached.
Issue History
2007-08-21 14:09Alex NeundorfNote Added: 0008554
2007-08-21 14:09Alex NeundorfAssigned ToSystem Admin => David Cole
2007-08-21 14:09Alex NeundorfCategory => Test Category
2008-09-02 12:46David ColeStatusassigned => resolved
2008-09-02 12:46David ColeResolutionopen => fixed
2008-09-02 12:46David ColeNote Added: 0013253
2010-12-14 18:46David ColeNote Added: 0024037
2010-12-14 18:46David ColeStatusresolved => closed

Notes
(0004728)
Eric Wing   
2006-08-23 23:36   
This might be related to an annoyance/bug? that I mentioned in an email. It seems that the .app directory structure is only created at CMake generation time. Remember that to the Finder, a .app bundle looks like a single file. So sometimes I move a whole .app bundle elsewhere or delete it for various reasons. When I try to rebuild, CMake freaks out because the directory structure it is trying to write the executable into has disappeared.
I think the correct fix/behavior would be to check to see if the .app bundle directory exists and recreate it before writing to it when rebuilding.

(0008102)
Neil Weisenfeld   
2007-07-18 17:17   
This is still a problem in 2.4.7

I do *not* think it is related to ewing2121's comment. That is, failing to re-create the application bundle after it's been deleted is probably not related to the issue at hand in this bug: creating it in the wrong directory.

The problem here is that the application bundle is being created in one place and the executable is being linked (or an attempt is being made to link) in another place.

(0008554)
Alex Neundorf   
2007-08-21 14:09   
Andy is not here anymore and Dave is working an framework stuff currently.
(0013253)
David Cole   
2008-09-02 12:46   
Fixed:

    /cvsroot/CMake/CMake/Source/cmMakefileExecutableTargetGenerator.cxx,v <-- Source/cmMakefileExecutableTargetGenerator.cxx
    new revision: 1.48; previous revision: 1.47

CMake should re-run if either of the bundle app's directory or its Info.plist file disappear in between make invocations...
(0024037)
David Cole   
2010-12-14 18:46   
Closing bugs that have been resolved for more than 3 months without any further updates.