[CMake] configuration specific ADD_CUSTOM_COMMAND

Zschocke, Florian Florian.Zschocke at cycos.com
Wed Mar 12 04:42:06 EDT 2008


From: cmake-bounces at cmake.org [mailto:cmake-bounces at cmake.org] On Behalf Of Martin Lütken
>
> The problem I suppose is that CMake is running before MSVC and thus have no way
> of knowing which configuration you will choose unless you tell so when generating the project.

Actually I consider this a bug, or a missing feature if you prefer, because Cmake generates all possible configurations in one go in the multi-configuration case. For one, it should be possible to select parts of the script depending on the configuration. Plus, I think there should be a way to get "just the right" value of a property like LOCATION for the currently active configuration, be it in the single- or multi-configuration case.

Right now it looks to me as if there are things possible in the single-configuration case which aren't possible in the multi-configuration case. Isn't there a variable like CMAKE_BUILD_TYPE that gets set to the currently created configuration during the generation of multi-config files? 

Regards,
Florian


More information about the CMake mailing list