2009/3/20 Mattias Helsing <[email protected]> > Hi Ankit, > > The set command doesn't work like you think. > set(X a b c) creates a list called X with contents a;b;c. So you have the > list > JAVADIST with contents > (/myjava/jdk/1.4.2/Linux/;XERCESDIR;/myjava/XML4J/4.3.4) > > try > set(JAVADIST /myjava/jdk/1.4.2/Linux/ ) > set(XERCESDIR /myjava/XML4J/4.3.4 ) >
Still it does not work means not creating class files. No errors are generated but .class files are not genrated. I feel there might be a problem with CLASSPATH, But also i try by explicitly set them. It doesnt work. Check this link: http://www.mail-archive.com/[email protected]/msg16764.html Iam not getting whatever given in this link. How to use it i dont know. Ankit > > Mattias > > > On 3/20/09, ankit jain <[email protected]> wrote: > > Hi all, > > > > I have a folder "mainfolder" with sufolder "innerfolder" which has soem > java > > files. i want to create it class files. for that iam using > add_sutom_command > > to run the javac command but still my class files are not generated. > > > > The content of cmakelist of mainfolder is: > > project(mainfolder) > > cmake_minimum_required(VERSION 2.4.0) > > add_subdirectory(innerfolder) > > > > The content of cmakelist of innerfolder is: > > > > set( > > JAVADIST /myjava/jdk/1.4.2/Linux/ > > XERCESDIR /myjava/XML4J/4.3.4 > > ) > > include_directories(${JAVADIST} ${XERCESDIR}) > > include_directories(${CMAKE_CURRENT_SOURCE_DIR}) > > set(JAVADIR $(JAVADIST)/bin) > > set( > > JAVAJRE $(JAVADIST)/jre > > JAVAC $(JAVADIR)/javac > > JAVA $(JAVADIR)/java > > ) > > set(CLASSPATH > > > $(CMAKE_CURRENT_SOURCE_DIR):$(XERCESDIR)/xmlParserAPIs.jar:$(XERCESDIR)/xercesImpl.jar) > > set(innerfolder_srcs > > Myprogram.java > > ) > > ADD_CUSTOM_COMMAND(OUTPUT ${innerfolder_srcs} > > COMMAND ${JAVAC} ARGS -classpath ${CLASSPATH} > > ${innerfolder_srcs} > > ) > > > > > > I dont know where iam doing something wrongdue to which class files for > the > > specifed source java file is not genrated.. > > > > Please guide me.. > > > > Ankit > > >
_______________________________________________ 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
