From: Oleksii Shumeiko -X (oshumeik - SOFTSERVE INC at Cisco) Date: Fri, 28 Apr 2023 12:30:57 +0000 (+0000) Subject: Pull request #3832: CMake: update sed X-Git-Tag: 3.1.61.0~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4de62ca9b9bfea4049ebe373a07076284b121bfe;p=thirdparty%2Fsnort3.git Pull request #3832: CMake: update sed Merge in SNORT/snort3 from ~OSHUMEIK/snort3:js_norm_cmake_sed to master Squashed commit of the following: commit c4bd8e8b2c39d96c367bfb6c6e1340c686add726 Author: Oleksii Shumeiko Date: Fri Apr 28 12:23:30 2023 +0300 cmake: update sed call Use '|' rather than '+' for sed separator. A target name can contain any symbol, for example '+' on OpenWrt. Picking '|' as a more common substitution for '/'. Thanks to graysky for reporting the issue. --- diff --git a/cmake/FindFlexLexer.cmake b/cmake/FindFlexLexer.cmake index 1b686d544..556fa7ca2 100644 --- a/cmake/FindFlexLexer.cmake +++ b/cmake/FindFlexLexer.cmake @@ -16,11 +16,11 @@ macro(FLEX NAME LEXER_IN LEXER_OUT) COMPILE_FLAGS ${FLEX_FLAGS} ) - # we use '+' as a separator for 'sed' to avoid conflicts with '/' in paths from LEXER_OUT + # we use '|' as a separator for 'sed' to avoid conflicts with '/' in paths from LEXER_OUT add_custom_command( OUTPUT ${LEXER_OUT} COMMAND sed -e - "s+void yyFlexLexer::LexerError+yynoreturn void yyFlexLexer::LexerError+;s+${LEXER_OUT}.tmp+${LEXER_OUT}+" + "s|void yyFlexLexer::LexerError|yynoreturn void yyFlexLexer::LexerError|;s|${LEXER_OUT}.tmp|${LEXER_OUT}|" ${FLEX_${NAME}_OUTPUTS} > ${LEXER_OUT} DEPENDS ${FLEX_${NAME}_OUTPUTS} VERBATIM