[CMake] Why does XCODE_DEPEND_HELPER delete my target after it has been build?

Kenny Erleben kenny at diku.dk
Sat Apr 2 10:48:26 EDT 2011


Hi,

I got a cmake project that builds one static lib and one target that 
depends on my static lib.

I have set the ARCHIVE_OUTPUT_DIRECOTRY target properties to 
${PROJECT_SOURCE_DIR}/lib and the RUNTIME_OUTPUT_DIRECOTRY target 
properties to ${PROJECT_SOURCE_DIR}/bin.

When I make an all build my static lib is correctly builded prior to my 
application target. The application target also builds and links fine. 
However after having completed the linking CMake performs a 'CMake 
PostBuild Rules' which gives me the output


echo "Depend check for xcode"
Depend check for xcode
cd /Users/kenny/Documents/prox_trunk/SPH/xbuild && make -C 
/Users/kenny/Documents/prox_trunk/SPH/xbuild -f 
/Users/kenny/Documents/prox_trunk/SPH/xbuild/CMakeScripts/XCODE_DEPEND_HELPER.make 
all.Debug
/Users/kenny/Documents/prox_trunk/SPH/xbuild/CMakeScripts/XCODE_DEPEND_HELPER.make:37: 
warning: overriding commands for target 
`/Users/kenny/Documents/prox_trunk/SPH/bin/XSPHTestApplication.app/Contents/MacOS/XSPHTestApplication'
/Users/kenny/Documents/prox_trunk/SPH/xbuild/CMakeScripts/XCODE_DEPEND_HELPER.make:28: 
warning: ignoring old commands for target 
`/Users/kenny/Documents/prox_trunk/SPH/bin/XSPHTestApplication.app/Contents/MacOS/XSPHTestApplication'
/bin/rm -f 
/Users/kenny/Documents/prox_trunk/SPH/bin/XSPHTestApplication.app/Contents/MacOS/XSPHTestApplication

I have no idea about what the two warnings mean? Even worse I am very 
puzzled about why cmake insist on deleting the target it has just build?

I have observed that if I do not mess around with the 
RUNTIME_OUTPUT_DIRECOTRY target properties then this behavior does not 
occur. However, I really need my target to end up in my bin-folder so 
this is not a solution for me.

I am using CMake 2.8.4 and Xcode 3.2.5

/Kenny


More information about the CMake mailing list