[CMake] configuration specific ADD_CUSTOM_COMMAND

Zschocke, Florian Florian.Zschocke at cycos.com
Wed Mar 12 10:07:16 EDT 2008


> From: Bill Hoffman [mailto:bill.hoffman at kitware.com]
> 
> With the use of CMAKE_CFG_INTDIR, you should be able to get to the
> targets you need inside custom commands with the multiconfiguration
> build systems.   Have you tried CVS CMake, I think that the LOCATION
of
> the target includes CMAKE_CFG_INTDIR in it.

I can get the path of the target fine. I haven't tried the CVS CMake.
Would you consider it stable enough for general use? I use 2.4.8 with a
few patches.

The CMAKE_CFG_INTDIR is part of the LOCATION in 2.4.8 (as far as I can
see), so the path is not the problem. The problem is with using a
DEBUG_POSTFIX. This is not honoured in LOCATION, I would have to use
DEBUG_LOCATION for that. Which means that I have to somehow know myself
in the script when to use LOCATION and when DEBUG_LOCATION.

I guess what I am saying is that when CMake has a way of getting "the
right" path, why can't it also get "the right" filename. 

By now I have given up on the DEBUG_POSTFIX and am using different
directories again, which wasn't quite what I wanted originally.

Thanks anyways,
Florian



More information about the CMake mailing list