On Thursday 09 April 2009, Jeremy Cowgar wrote:
> When I type:
>
> $ make abc_xyz
>
> I'd like to be able to do some tests against that value, "abc_xyz". How
> can I do that? For instance:
>
> IF( ${CURRENT_MAKE_TARGET} MATCHES "abc_xyz" )
> MESSAGE( "Hello World!" )
> ENDIF()
>
> but I don't know what the var name is and I seem to be missing it in the
> docs.
No, that's wrong in principle.
In the cmake files there is no current target, they describe all targets.
If you want to do something when some target is built, you have to do this via
dependencies, either via add_custom_command() or add_custom_target().
Alex
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake