Skip to content

Commit

Permalink
i#6327: Do not try-run when cross-compiling (#6328)
Browse files Browse the repository at this point in the history
Fixes a crash in newer CMake versions from an attempt to run a
target-arch executable when cross-compiling.

Tested on the same setup where the issue was reported.

Fixes #6327
  • Loading branch information
derekbruening authored Sep 25, 2023
1 parent a73e526 commit 48f6c62
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions make/utils.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# **********************************************************
# Copyright (c) 2012-2017 Google, Inc. All rights reserved.
# Copyright (c) 2012-2023 Google, Inc. All rights reserved.
# **********************************************************
#
# Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -331,8 +331,9 @@ function (check_sve_processor_and_compiler_support out)
set(proc_found_sve_EXITCODE 1 CACHE STRING
"Set to 0 if target processor/emulator supports SVE to enable SVE tests"
FORCE)
else ()
check_c_source_runs("${sve_prog}" proc_found_sve)
endif ()
check_c_source_runs("${sve_prog}" proc_found_sve)
if (proc_found_sve)
message(STATUS "Compiler and processor support SVE.")
else ()
Expand Down

0 comments on commit 48f6c62

Please sign in to comment.