<div>That is because I have a custom target like</div><div><br></div><div>ADD_CUSTOM_TARGET(testc ALL<br> COMMAND java ${PROJECT_BINARY_DIR}/test.java <br> DEPENDS ${PROJECT_BINARY_DIR}/test.java <br> )</div><div><br>
</div><div>I want to build test.java only if it has been changed.</div><div><br></div><div>Since custom targets are always out-of-date, I wanted to have the</div><div>command inside the custom target like</div><div><br></div>
<div>COMMAND if( test.java has not been modified ) then java build/test.java; fi</div><div><br></div><div>The syntax of <b>if</b> differs between different shells. So I wanted to check for </div><div>the shell first and use the appropriate IF syntax.</div>
<div><br></div><div><br></div><div>Thanks</div><div>Ajay</div>
<div><br></div><div><br></div><div class="gmail_quote">On Mon, Mar 5, 2012 at 11:03 PM, Eric Noulard <span dir="ltr"><<a href="mailto:eric.noulard@gmail.com" target="_blank">eric.noulard@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2012/3/6 Ajay Panyala <<a href="mailto:ajay@csc.lsu.edu" target="_blank">ajay@csc.lsu.edu</a>>:<br>
<div>> Hello,<br>
><br>
> Is there anyway that cmake could figure out the shell (bash,csh,..)<br>
> that is being use when cmake is invoked on the command line ?<br>
<br>
</div>May be you can check $ENV{SHELL} ?<br>
Why would you like to do that?<br>
<br>
Usually when using CMake one tries to avoid shell/command interpreter<br>
dependency??<br>
<font color="#888888">--<br>
Erk<br>
Le gouvernement représentatif n'est pas la démocratie --<br>
<a href="http://www.le-message.org" target="_blank">http://www.le-message.org</a><br>
</font></blockquote></div><br><br clear="all"><br><br>