[Cmake-commits] CMake branch, master, updated. 0da537d16792ffcc38ec1fb19d518900b1fe7432

cmake-commits at cmake.org cmake-commits at cmake.org
Sun Apr 25 16:07:39 EDT 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
       via  0da537d16792ffcc38ec1fb19d518900b1fe7432 (commit)
      from  70f90787806f92ce38172c465eab76cc8a915aba (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0da537d16792ffcc38ec1fb19d518900b1fe7432
commit 0da537d16792ffcc38ec1fb19d518900b1fe7432
Author: Bill Hoffman <bill.hoffman at kitware.com>
Date:   Sun Apr 25 16:05:21 2010 -0400

    Do not error out if the java version is not found, if java is not required.

diff --git a/Modules/FindJava.cmake b/Modules/FindJava.cmake
index 7eb6d90..9e2a640 100644
--- a/Modules/FindJava.cmake
+++ b/Modules/FindJava.cmake
@@ -82,7 +82,11 @@ IF(Java_JAVA_EXECUTABLE)
       OUTPUT_STRIP_TRAILING_WHITESPACE
       ERROR_STRIP_TRAILING_WHITESPACE)
     IF( res )
-      MESSAGE( FATAL_ERROR "Error executing java -version" )
+      IF(${Java_FIND_REQUIRED})
+        MESSAGE( FATAL_ERROR "Error executing java -version" )
+      ELSE()
+        MESSAGE( STATUS "Warning, could not run java --version")
+      ENDIF()
     ELSE()
       # extract major/minor version and patch level from "java -version" output
       # Tested on linux using 

-----------------------------------------------------------------------

Summary of changes:
 Modules/FindJava.cmake |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list