Re: [CMake] Order of compilation of Java files
Andreas, Do you mind sharing a CMakeLists.txt for one of your Java projects? Thank You. -- Artur Kedzierski -Original Message- From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of Andreas Pakulat Sent: Thursday, March 08, 2012 8:33 To: cmake@cmake.org Subject: Re: [CMake] Order of compilation of Java files On 08.03.12 06:39:37, Kedzierski, Artur CIV NSWC Corona, PA13 wrote: I am trying to use CMake for a small Java project that's part of a bigger C++ project. I have a Java project that looks like that: project(MyProject Java) include_directories(${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/MyProject.dir) add_library(MyProject file1.java file2.java file3.java ) It works on Linux. However, when I tried it on Windows, I've ran into two problems: 1) The resulting *.class files were placed in ${CMAKE_CURRENT_BINARY_DIR}. As a work around, I changed include_directories to be: include_directories(${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/MyProject.dir ${CMAKE_CURRENT_BINARY_DIR}) Is there a way to specify where the *.class file will be generated? 2) Unlike on Linux, the java files are not compiled in a listed order. I have dependencies where one file2.java depends on file1.class so it doesn't compile. How can I tell it to compile the *.java files in specific order? Is there a way for CMake to automatically determine the dependencies? I've looked at using CMake to build some Java files (in an otherwise C++/C project) some time ago and the result was that Java-support simply does not fit with CMake's language and functions - at least not in the way include_directories() and co are currently implemented for Java. So I've simply opted for custom-command's and targets to compile Java. Andreas -- 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 smime.p7s Description: S/MIME cryptographic signature -- 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
Re: [CMake] Order of compilation of Java files
On 12.03.12 08:42:44, Kedzierski, Artur CIV NSWC Corona, PA13 wrote: Andreas, Do you mind sharing a CMakeLists.txt for one of your Java projects? Thank You. Sorry, thats not possible since its closed source. Andreas -- 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
[CMake] Order of compilation of Java files
I am trying to use CMake for a small Java project that's part of a bigger C++ project. I have a Java project that looks like that: project(MyProject Java) include_directories(${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/MyProject.dir) add_library(MyProject file1.java file2.java file3.java ) It works on Linux. However, when I tried it on Windows, I've ran into two problems: 1) The resulting *.class files were placed in ${CMAKE_CURRENT_BINARY_DIR}. As a work around, I changed include_directories to be: include_directories(${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/MyProject.dir ${CMAKE_CURRENT_BINARY_DIR}) Is there a way to specify where the *.class file will be generated? 2) Unlike on Linux, the java files are not compiled in a listed order. I have dependencies where one file2.java depends on file1.class so it doesn't compile. How can I tell it to compile the *.java files in specific order? Is there a way for CMake to automatically determine the dependencies? Thank You -- Artur Kedzierski smime.p7s Description: S/MIME cryptographic signature -- 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
Re: [CMake] Order of compilation of Java files
On 08.03.12 06:39:37, Kedzierski, Artur CIV NSWC Corona, PA13 wrote: I am trying to use CMake for a small Java project that's part of a bigger C++ project. I have a Java project that looks like that: project(MyProject Java) include_directories(${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/MyProject.dir) add_library(MyProject file1.java file2.java file3.java ) It works on Linux. However, when I tried it on Windows, I've ran into two problems: 1) The resulting *.class files were placed in ${CMAKE_CURRENT_BINARY_DIR}. As a work around, I changed include_directories to be: include_directories(${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/MyProject.dir ${CMAKE_CURRENT_BINARY_DIR}) Is there a way to specify where the *.class file will be generated? 2) Unlike on Linux, the java files are not compiled in a listed order. I have dependencies where one file2.java depends on file1.class so it doesn't compile. How can I tell it to compile the *.java files in specific order? Is there a way for CMake to automatically determine the dependencies? I've looked at using CMake to build some Java files (in an otherwise C++/C project) some time ago and the result was that Java-support simply does not fit with CMake's language and functions - at least not in the way include_directories() and co are currently implemented for Java. So I've simply opted for custom-command's and targets to compile Java. Andreas -- 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