Skip to content

Commit

Permalink
cmake: use quotes
Browse files Browse the repository at this point in the history
Avoid odd error messages in case TRIPLE is empty.

Signed-off-by: Axel Heider <[email protected]>
  • Loading branch information
Axel Heider committed Jul 2, 2024
1 parent f43fe93 commit 1861070
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions cmake-tool/helpers/check_arch_compiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,54 +11,54 @@ function(check_arch_clang)
MATCH
"^x86_64"
correct_triple
${TRIPLE}
"${TRIPLE}"
)
elseif("${KernelSel4Arch}" STREQUAL "x86_64")
string(
REGEX
MATCH
"^x86_64"
correct_triple
${TRIPLE}
"${TRIPLE}"
)
elseif("${KernelSel4Arch}" STREQUAL "aarch32" OR "${KernelSel4Arch}" STREQUAL "arm_hyp")
string(
REGEX
MATCH
"^arm"
correct_triple
${TRIPLE}
"${TRIPLE}"
)
elseif("${KernelSel4Arch}" STREQUAL "aarch64")
string(
REGEX
MATCH
"^aarch64"
correct_triple
${TRIPLE}
"${TRIPLE}"
)
elseif("${KernelSel4Arch}" STREQUAL "riscv32")
string(
REGEX
MATCH
"^riscv(32|64)"
correct_triple
${TRIPLE}
"${TRIPLE}"
)
elseif("${KernelSel4Arch}" STREQUAL "riscv64")
string(
REGEX
MATCH
"^riscv64"
correct_triple
${TRIPLE}
"${TRIPLE}"
)
else()
message(SEND_ERROR "KernelSel4Arch is not set to a valid arch")
endif()

if(NOT correct_triple)
message(SEND_ERROR "Clang Triple: ${TRIPLE} isn't for seL4_arch: ${KernelSel4Arch}")
message(SEND_ERROR "Clang Triple: '${TRIPLE}' isn't for seL4_arch: ${KernelSel4Arch}")
endif()

endfunction()
Expand Down

0 comments on commit 1861070

Please sign in to comment.