MantisBT - CMake
View Issue Details
0011249CMakeModulespublic2010-09-19 23:442010-11-09 22:57
Philip Lowman 
Philip Lowman 
normalminoralways
closedfixed 
CMake-2-8 
CMake 2.8.3CMake 2.8.3 
0011249: FindFLEX.cmake: Sends a CMake fatal error if flex execution fails or doesn't support --version flag
As reported by Bill Hoffman:

In FindFLEX.cmake, you have this:
 EXECUTE_PROCESS(COMMAND ${FLEX_EXECUTABLE} --version
   OUTPUT_VARIABLE FLEX_version_output
   ERROR_VARIABLE FLEX_version_error
   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}")
 ELSE()

So, if the flex that is found does not support the --version flag, or fails to run, it is always a fatal error. It should only be a fatal error if the find_package(FLEX REQUIRED) is given.
No tags attached.
Issue History
2010-09-19 23:44Philip LowmanNew Issue
2010-09-19 23:45Philip LowmanAssigned To => Philip Lowman
2010-09-19 23:45Philip LowmanStatusnew => assigned
2010-09-19 23:45Philip LowmanTarget Version => CMake 2.8.3
2010-09-20 08:09Philip LowmanStatusassigned => resolved
2010-09-20 08:09Philip LowmanFixed in Version => CMake 2.8.3
2010-09-20 08:09Philip LowmanResolutionopen => fixed
2010-11-09 22:57Philip LowmanStatusresolved => closed

There are no notes attached to this issue.