The regex check for version of java does not find the version.
My system reports java -version as:
          java version "1.7.0_b147-icedtea"

I changed line 110-113:

      IF(var MATCHES "java version \"[0-9]+\\.[0-9]+\\.[0-9_.]+[oem-]*\".*")
        # This is most likely Sun / OpenJDK, or maybe GCJ-java compat layer
        STRING( REGEX REPLACE ".* version 
\"([0-9]+\\.[0-9]+\\.[0-9_.]+)[oem-]*\".*"
                "\\1" Java_VERSION_STRING "${var}" )

TO:


      IF(var MATCHES "java version \"[0-9]+\\.[0-9]+\\.[0-9_.]+.*\".*")
        # This is most likely Sun / OpenJDK, or maybe GCJ-java compat layer
        STRING( REGEX REPLACE ".* version \"([0-9]+\\.[0-9]+\\.[0-9_.]+).*\".*"
                "\\1" Java_VERSION_STRING "${var}" )


And it happily reported the version as 1.7.0.

Thanks,
     Allen
--

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

Reply via email to