Skip to content

Commit

Permalink
Prevent build errors due to mismatching target and triple
Browse files Browse the repository at this point in the history
Set the target in accordance with the triple to avoid running into build
errors like `error: unknown target CPU 'x86-64'` when targeting e.g.
`aarch64-w64-mingw32`.
  • Loading branch information
Martchus committed Nov 25, 2024
1 parent 6e31b8b commit 696b0e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cmake/modules/ReflectionGenerator.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function (add_reflection_generator_invocation)

# apply specified REFLECTION_GENERATOR_TRIPLET
if (REFLECTION_GENERATOR_TRIPLE)
list(APPEND ARGS_CLANG_OPTIONS -Xclang -triple -Xclang "${REFLECTION_GENERATOR_TRIPLE}")
list(APPEND ARGS_CLANG_OPTIONS -target "${REFLECTION_GENERATOR_TRIPLE}" -Xclang -triple -Xclang "${REFLECTION_GENERATOR_TRIPLE}")
endif ()

# apply specified REFLECTION_GENERATOR_INCLUDE_DIRECTORIES
Expand Down

0 comments on commit 696b0e0

Please sign in to comment.