[CMake] Clearing up custom targets/commands
alaterale at elitemail.org
alaterale at elitemail.org
Thu May 26 14:48:10 EDT 2005
Thanks everyone for your prompt responses to my questions. I seem to
have a large supply of them, but I'm getting the hang of this more and
more I think :)
I have yet another question about how to do something in cmake. How
would it be possible to add a bunch of conditionals to a custom target?
I know you can make a custom target with ADD_CUSTOM_TARGET and add a
"command" with ADD_CUSTOM_COMMAND (which I'm guessing is a executable
command right?). My confusing arises when trying to convert a part of
an ant build document that goes something like this:
<target name="init" depends="clean">
<condition property="DEBUG" value="true">
<not><isset property="${DEBUG}"/></not>
</condition>
<condition property="NOCRAWL" value="true">
<not><isset property="${NOCRAWL}"/></not>
</condition>
<condition property="devflags" value="-DDEBUG=1">
<istrue value="${DEBUG}"/>
</condition>
<property name="cppflags" value="${devflags} ${phone_flag} -DLANG_${LANG}=1"/>
<mkdir dir="${build}"/>
<mkdir dir="${deploy}"/>
<mkdir dir="${obf}"/>
</target>
Basically, I want to be able to only run the IFs if a certain make
target is called. I don't really know how to do this with cmake, though
it has to be possible right?
More information about the CMake
mailing list