From b93b6dc677dc0d8c1359041d4415d39501e6f286 Mon Sep 17 00:00:00 2001 From: Mathieu Malaterre Date: Tue, 3 Nov 2009 17:22:57 -0500 Subject: Replace FATAL_ERROR with status. Remove output when QUIET is ON --- Modules/FindJava.cmake | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Modules/FindJava.cmake b/Modules/FindJava.cmake index 59c10de..252af19 100644 --- a/Modules/FindJava.cmake +++ b/Modules/FindJava.cmake @@ -84,7 +84,9 @@ IF(Java_JAVA_EXECUTABLE) STRING( REGEX REPLACE "java full version \"kaffe-([0-9]+\\.[0-9]+\\.[0-9_]+).*" "\\1" Java_VERSION_STRING "${var}" ) ELSE() - message(FATAL_ERROR "regex not supported: ${var}. Please report") + IF(NOT Java_FIND_QUIETLY) + message(STATUS "regex not supported: ${var}. Please report") + ENDIF(NOT Java_FIND_QUIETLY) ENDIF() STRING( REGEX REPLACE "([0-9]+).*" "\\1" Java_VERSION_MAJOR "${Java_VERSION_STRING}" ) STRING( REGEX REPLACE "[0-9]+\\.([0-9]+).*" "\\1" Java_VERSION_MINOR "${Java_VERSION_STRING}" ) @@ -98,7 +100,9 @@ IF(Java_JAVA_EXECUTABLE) endif( ) # display info #MESSAGE( STATUS "Java version ${Java_VERSION_STRING} configured successfully!" ) # keep me, used for debug - MESSAGE( STATUS "Java version ${Java_VERSION} configured successfully!" ) + IF(NOT Java_FIND_QUIETLY) + MESSAGE( STATUS "Java version ${Java_VERSION} configured successfully!" ) + ENDIF(NOT Java_FIND_QUIETLY) ENDIF() # check version if requested: -- cgit v0.12