aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-03-30 18:44:01 -0700
committerGuy Harris <guy@alum.mit.edu>2016-04-03 22:21:29 +0000
commit59816ef00c6dd09532d80b393ba03f8194aba236 (patch)
treef5e84c67ebe0e69542db94d56db70fa476c0db6c /cmake
parente42a43bc58a36848316adae19981878a5f430c46 (diff)
Make the Flex scanners and YACC parser in libraries reentrant.
master-branch libpcap now generates a reentrant Flex scanner and Bison/Berkeley YACC parser for capture filter expressions, so it requires versions of Flex and Bison/Berkeley YACC that support that. We might as well do the same. For libwiretap, it means we could actually have multiple K12 text or Ascend/Lucent text files open at the same time. For libwireshark, it might not be as useful, as we only read configuration files at startup (which should only happen once, in one thread) or on demand (in which case, if we ever support multiple threads running libwireshark, we'd need a mutex to ensure that only one file reads it), but it's still the right thing to do. We also require a version of Flex that can write out a header file, so we change the runlex script to generate the header file ourselves. This means we require a version of Flex new enough to support --header-file. Clean up some other stuff encountered in the process. Change-Id: Id23078c6acea549a52fc687779bb55d715b55c16 Reviewed-on: https://code.wireshark.org/review/14719 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/FindLEX.cmake10
1 files changed, 5 insertions, 5 deletions
diff --git a/cmake/modules/FindLEX.cmake b/cmake/modules/FindLEX.cmake
index c540011041..ec53b04acd 100644
--- a/cmake/modules/FindLEX.cmake
+++ b/cmake/modules/FindLEX.cmake
@@ -35,15 +35,15 @@ MACRO(ADD_LEX_FILES _sources )
SET(_outh ${CMAKE_CURRENT_BINARY_DIR}/${_basename}_lex.h)
ADD_CUSTOM_COMMAND(
- OUTPUT ${_outc}
+ OUTPUT ${_outc} ${_outh}
COMMAND ${SH_EXECUTABLE} ${SH_FLAGS1} ${SH_FLAGS2} ${CMAKE_SOURCE_DIR}/tools/runlex.sh ${LEX_EXECUTABLE} ${SED_EXECUTABLE}
-o${_outc}
- --header-file=${_outh}
${_in}
DEPENDS ${_in}
)
- SET(${_sources} ${${_sources}} ${_outc} )
- INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
- ENDFOREACH (_current_FILE)
+ SET(${_sources} ${${_sources}} ${_outc} )
+ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
+ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
+ ENDFOREACH (_current_FILE)
ENDMACRO(ADD_LEX_FILES)