<br><br>
<div class="gmail_quote">2009/3/20 Mattias Helsing <span dir="ltr"><<a href="mailto:helsing72@gmail.com">helsing72@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi Ankit,<br><br>I have no xp with cmake for java. I was just pointing out my first<br>immediate reaction to your script code.<br>
<br>Perhaps you should try things in smaller scale, e.g. try to create a<br>custom_command that compiles one java file. Also - during development<br>I often use the message command (printf debugging), i.e.<br>message("MYVAR ${MYVAR}")<br>
<br>cheers<br>
<div>
<div></div>
<div class="h5">Mattias<br><br>No problem. Thanks anyways for the support </div></div></blockquote>
<div> </div>
<div>Ankit</div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>
<div class="h5"><span id=""></span><br>On 3/20/09, ankit jain <<a href="mailto:ankitguddu@gmail.com">ankitguddu@gmail.com</a>> wrote:<br>> 2009/3/20 Mattias Helsing <<a href="mailto:helsing72@gmail.com">helsing72@gmail.com</a>><br>
><br>>> Hi Ankit,<br>>><br>>> The set command doesn't work like you think.<br>>> set(X a b c) creates a list called X with contents a;b;c. So you have the<br>>> list<br>>> JAVADIST with contents<br>
>> (/myjava/jdk/1.4.2/Linux/;XERCESDIR;/myjava/XML4J/4.3.4)<br>>><br>>> try<br>>> set(JAVADIST /myjava/jdk/1.4.2/Linux/ )<br>>> set(XERCESDIR /myjava/XML4J/4.3.4 )<br>>><br>><br>> Still it does not work means not creating class files. No errors are<br>
> generated but .class files are not genrated.<br>> I feel there might be a problem with CLASSPATH,<br>> But also i try by explicitly set them. It doesnt work.<br>><br>> Check this link:<br>> <a href="http://www.mail-archive.com/cmake@cmake.org/msg16764.html" target="_blank">http://www.mail-archive.com/cmake@cmake.org/msg16764.html</a><br>
><br>> Iam not getting whatever given in this link. How to use it i dont know.<br>> Ankit<br>><br>>><br>>> Mattias<br>>><br>>><br>>> On 3/20/09, ankit jain <<a href="mailto:ankitguddu@gmail.com">ankitguddu@gmail.com</a>> wrote:<br>
>> > Hi all,<br>>> ><br>>> > I have a folder "mainfolder" with sufolder "innerfolder" which has soem<br>>> java<br>>> > files. i want to create it class files. for that iam using<br>
>> add_sutom_command<br>>> > to run the javac command but still my class files are not generated.<br>>> ><br>>> > The content of cmakelist of mainfolder is:<br>>> > project(mainfolder)<br>
>> > cmake_minimum_required(VERSION 2.4.0)<br>>> > add_subdirectory(innerfolder)<br>>> ><br>>> > The content of cmakelist of innerfolder is:<br>>> ><br>>> > set(<br>>> > JAVADIST /myjava/jdk/1.4.2/Linux/<br>
>> > XERCESDIR /myjava/XML4J/4.3.4<br>>> > )<br>>> > include_directories(${JAVADIST} ${XERCESDIR})<br>>> > include_directories(${CMAKE_CURRENT_SOURCE_DIR})<br>>> > set(JAVADIR $(JAVADIST)/bin)<br>
>> > set(<br>>> > JAVAJRE $(JAVADIST)/jre<br>>> > JAVAC $(JAVADIR)/javac<br>>> > JAVA $(JAVADIR)/java<br>>> > )<br>>> > set(CLASSPATH<br>>> ><br>
>> $(CMAKE_CURRENT_SOURCE_DIR):$(XERCESDIR)/xmlParserAPIs.jar:$(XERCESDIR)/xercesImpl.jar)<br>>> > set(innerfolder_srcs<br>>> > Myprogram.java<br>>> > )<br>>> > ADD_CUSTOM_COMMAND(OUTPUT ${innerfolder_srcs}<br>
>> > COMMAND ${JAVAC} ARGS -classpath ${CLASSPATH}<br>>> > ${innerfolder_srcs}<br>>> > )<br>>> ><br>>> ><br>>> > I dont know where iam doing something wrongdue to which class files for<br>
>> the<br>>> > specifed source java file is not genrated..<br>>> ><br>>> > Please guide me..<br>>> ><br>>> > Ankit<br>>> ><br>>><br>><br></div></div></blockquote>
</div><br>