[CMake] How to determine the current target?

Jeremy Cowgar jeremy at cowgar.com
Thu Apr 9 16:14:10 EDT 2009


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.

Thanks,

Jeremy



More information about the CMake mailing list