summaryrefslogtreecommitdiffstats
path: root/Modules/FindFLEX.cmake
diff options
context:
space:
mode:
authorPhilip Lowman <philip@yhbt.com>2010-09-20 03:56:34 (GMT)
committerPhilip Lowman <philip@yhbt.com>2010-09-20 03:56:34 (GMT)
commit38691d91a58b416fd4698047b037c8123e133e2b (patch)
tree61df7294020efdc36a6f98419740a6c3a8182474 /Modules/FindFLEX.cmake
parentc30c3ade9bfd865bea8e58d38e4044e4b00334a0 (diff)
downloadCMake-38691d91a58b416fd4698047b037c8123e133e2b.zip
CMake-38691d91a58b416fd4698047b037c8123e133e2b.tar.gz
CMake-38691d91a58b416fd4698047b037c8123e133e2b.tar.bz2
FindFLEX.cmake: Fix issue 11249
FindFLEX no longer sense a CMake fatal error if executing "flex --version" fails unless the REQUIRED argument was specified.
Diffstat (limited to 'Modules/FindFLEX.cmake')
-rw-r--r--Modules/FindFLEX.cmake6
1 files changed, 5 insertions, 1 deletions
diff --git a/Modules/FindFLEX.cmake b/Modules/FindFLEX.cmake
index 55b5639..d42e514 100644
--- a/Modules/FindFLEX.cmake
+++ b/Modules/FindFLEX.cmake
@@ -78,7 +78,11 @@ IF(FLEX_EXECUTABLE)
RESULT_VARIABLE FLEX_version_result
OUTPUT_STRIP_TRAILING_WHITESPACE)
IF(NOT ${FLEX_version_result} EQUAL 0)
- MESSAGE(SEND_ERROR "Command \"${FLEX_EXECUTABLE} --version\" failed with output:\n${FLEX_version_error}")
+ IF(FLEX_FIND_REQUIRED)
+ MESSAGE(SEND_ERROR "Command \"${FLEX_EXECUTABLE} --version\" failed with output:\n${FLEX_version_output}\n${FLEX_version_error}")
+ ELSE()
+ MESSAGE("Command \"${FLEX_EXECUTABLE} --version\" failed with output:\n${FLEX_version_output}\n${FLEX_version_error}\nFLEX_VERSION will not be available")
+ ENDIF()
ELSE()
STRING(REGEX REPLACE "^flex (.*)$" "\\1"
FLEX_VERSION "${FLEX_version_output}")