]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Pull request #3832: CMake: update sed
authorOleksii Shumeiko -X (oshumeik - SOFTSERVE INC at Cisco) <oshumeik@cisco.com>
Fri, 28 Apr 2023 12:30:57 +0000 (12:30 +0000)
committerOleksii Shumeiko -X (oshumeik - SOFTSERVE INC at Cisco) <oshumeik@cisco.com>
Fri, 28 Apr 2023 12:30:57 +0000 (12:30 +0000)
Merge in SNORT/snort3 from ~OSHUMEIK/snort3:js_norm_cmake_sed to master

Squashed commit of the following:

commit c4bd8e8b2c39d96c367bfb6c6e1340c686add726
Author: Oleksii Shumeiko <oshumeik@cisco.com>
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.

cmake/FindFlexLexer.cmake

index 1b686d544d238a140b0554f37aed05d5e6f2490e..556fa7ca23d6b56dbce224cf1e1960e2ea348dda 100644 (file)
@@ -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