Revision 0d5355a3ce646571836b8d44d17dc3b11001bc6e authored by timlinux on 08 February 2008, 15:33:14 UTC, committed by timlinux on 08 February 2008, 15:33:14 UTC
git-svn-id: http://svn.osgeo.org/qgis/branches/Release-0.9.2rc1@8124 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 8ca85ca
Flex.cmake
# flex a .ll file
# search flex
MACRO(FIND_FLEX)
IF(NOT FLEX_EXECUTABLE)
IF (MSVC)
FIND_PROGRAM(FLEX_EXECUTABLE
"$ENV{LIB_DIR}/bin/flex.exe"
)
ELSE(MSVC)
FIND_PROGRAM(FLEX_EXECUTABLE flex)
ENDIF (MSVC)
IF (NOT FLEX_EXECUTABLE)
MESSAGE(FATAL_ERROR "flex not found - aborting")
ENDIF (NOT FLEX_EXECUTABLE)
ENDIF(NOT FLEX_EXECUTABLE)
ENDMACRO(FIND_FLEX)
MACRO(ADD_FLEX_FILES _sources )
FIND_FLEX()
FOREACH (_current_FILE ${ARGN})
GET_FILENAME_COMPONENT(_in ${_current_FILE} ABSOLUTE)
GET_FILENAME_COMPONENT(_basename ${_current_FILE} NAME_WE)
SET(_out ${CMAKE_CURRENT_BINARY_DIR}/flex_${_basename}.cpp)
# -d option for flex means that it will produce output to stderr while analyzing
ADD_CUSTOM_COMMAND(
OUTPUT ${_out}
COMMAND ${FLEX_EXECUTABLE}
ARGS
-o${_out} -d
${_in}
DEPENDS ${_in}
)
SET(${_sources} ${${_sources}} ${_out} )
ENDFOREACH (_current_FILE)
ENDMACRO(ADD_FLEX_FILES)
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...