MantisBT - CMake
View Issue Details
0009777CMakeModulespublic2009-10-26 05:002009-10-30 11:56
Mathieu Malaterre 
Mathieu Malaterre 
normalminorhave not tried
closedfixed 
 
 
0009777: FindJNI update not found in FindJava / CMakeDetermineJavaCompiler
There has been much work on FindJNI (see Bug 0009611). But those changes have not been propagated to the following modules:
- FindJava.cmake
- CMakeDetermineJavaCompiler.cmake

Thanks
No tags attached.
related to 0009611closed Mathieu Malaterre Arch independent FindJNI.cmake on Linux (supports Sun Java, OpenJDK, Kaffe and GCJ paths) 
parent of 0009476closed Bill Hoffman FindJNI.cmake is missing a lot of ARCH 
Issue History
2009-10-26 05:00Mathieu MalaterreNew Issue
2009-10-26 05:01Mathieu MalaterreRelationship addedrelated to 0009611
2009-10-26 05:02Mathieu MalaterreRelationship addedparent of 0009476
2009-10-26 05:35Modestas VainiusNote Added: 0018233
2009-10-26 05:58Mathieu MalaterreNote Added: 0018234
2009-10-26 06:12Modestas VainiusNote Added: 0018235
2009-10-27 16:24Alex NeundorfCategoryCMake => Modules
2009-10-30 11:51Mathieu MalaterreStatusnew => assigned
2009-10-30 11:51Mathieu MalaterreAssigned To => Mathieu Malaterre
2009-10-30 11:56Mathieu MalaterreNote Added: 0018300
2009-10-30 11:56Mathieu MalaterreNote Added: 0018301
2009-10-30 11:56Mathieu MalaterreStatusassigned => closed
2009-10-30 11:56Mathieu MalaterreResolutionopen => fixed

Notes
(0018233)
Modestas Vainius   
2009-10-26 05:35   
What is wrong with those? They search for binaries so they do not need {libarch} hack. Maybe:

* $ENV{JAVA_HOME}/bin could be added to CMakeDetermineJavaCompiler.cmake
* /usr/lib/jvm/java-6-openjdk/bin and /usr/lib/jvm/default-java/bin paths could be added to both.

But since they look in /usr/bin already, that's not a big deal (at least on Debian).
(0018234)
Mathieu Malaterre   
2009-10-26 05:58   
That's what I do not like. Let say I have on my machine (which I do):
- sun java
- openjdk
- gcj

The expected behavior of setting JAVA_HOME would be that in the end

JAVA_RUNTIME and JAVA_COMPILER be set to the proper java / javac located *underneath* JAVA_HOME

See debian bug: http://bugs.debian.org/536102 [^]
It allows me to quickly reproduce issues on a particular java implementation without update-alternatives trickeries (simply changing JAVA_HOME).

Cheers
(0018235)
Modestas Vainius   
2009-10-26 06:12   
That's my point 1.
(0018300)
Mathieu Malaterre   
2009-10-30 11:56   
Index: Modules/CMakeDetermineJavaCompiler.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CMakeDetermineJavaCompiler.cmake,v
retrieving revision 1.15
diff -u -r1.15 CMakeDetermineJavaCompiler.cmake
--- Modules/CMakeDetermineJavaCompiler.cmake 28 Sep 2009 15:46:47 -0000 1.15
+++ Modules/CMakeDetermineJavaCompiler.cmake 30 Oct 2009 15:54:40 -0000
@@ -51,14 +51,18 @@
     "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.5;JavaHome]/bin"
     "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.4;JavaHome]/bin"
     "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.3;JavaHome]/bin"
+ $ENV{JAVA_HOME}/bin
     /usr/bin
     /usr/lib/java/bin
     /usr/share/java/bin
     /usr/local/bin
     /usr/local/java/bin
+ /usr/local/java/share/bin
     /usr/java/j2sdk1.4.2_04
     /usr/lib/j2sdk1.4-sun/bin
+ /usr/java/j2sdk1.4.2_09/bin
     /usr/lib/j2sdk1.5-sun/bin
+ /opt/sun-jdk-1.5.0.04/bin
     )
   # if no compiler has been specified yet, then look for one
   IF(CMAKE_Java_COMPILER_INIT)
(0018301)
Mathieu Malaterre   
2009-10-30 11:56   
$ cvs ci -m"ENH: FIX 0009777. This should sync FindJava and CMakeDetermineJavaCompiler.cmake now" CMakeDetermineJavaCompiler.cmake
Committer: Mathieu Malaterre <mathieu.malaterre@kitware.com>
/cvsroot/CMake/CMake/Modules/CMakeDetermineJavaCompiler.cmake,v <-- CMakeDetermineJavaCompiler.cmake
new revision: 1.16; previous revision: 1.15