Skip to content

Commit

Permalink
runtime/Cpp/cmake/antlr4-generator.cmake.in: Quote the additional dep…
Browse files Browse the repository at this point in the history
…endencies argument properly

The 6th argument takes a list of dependencies. But for a list you must
quote the variable as otherwise cmake complains with:

CMake Error at XXX/antlr4-generator-config.cmake:137 (if):
  if given arguments:

    "(" "ARGC" "GREATER_EQUAL" "7" ")" "AND" "(" "NOT" "YYY/Base.g4" "ZZZ/Expressions.g4" "STREQUAL" "" ")"

  Unknown arguments specified
Call Stack (most recent call first):
  CMakeLists.txt:95 (antlr4_generate)

Signed-off-by: Thomas Braun <[email protected]>
  • Loading branch information
t-b committed Nov 7, 2023
1 parent d25d421 commit 334f114
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions runtime/Cpp/cmake/antlr4-generator.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ function(antlr4_generate
set(Antlr4_NamespaceOption "")
endif ()

if ( (ARGC GREATER_EQUAL 7 ) AND (NOT ${ARGV6} STREQUAL "") )
set(Antlr4_AdditionalDependencies ${ARGV6})
if ( (ARGC GREATER_EQUAL 7 ) AND (NOT "${ARGV6}" STREQUAL "") )
set(Antlr4_AdditionalDependencies "${ARGV6}")
else()
set(Antlr4_AdditionalDependencies "")
endif ()
Expand Down

0 comments on commit 334f114

Please sign in to comment.