mirror of https://github.com/wb2osz/direwolf.git
Merge pull request #261 from ew1abz/dev
cmake: Avoid try_run when cross-compiling
This commit is contained in:
commit
791982a5e4
|
@ -354,7 +354,12 @@ elseif(ARCHITECTURE_ARM)
|
|||
if(C_MSVC)
|
||||
try_run(RUN_NEON COMPILE_NEON "${CMAKE_BINARY_DIR}/tmp" "${TEST_DIR}/test_arm_neon.cxx" COMPILE_DEFINITIONS /O0)
|
||||
else()
|
||||
try_run(RUN_NEON COMPILE_NEON "${CMAKE_BINARY_DIR}/tmp" "${TEST_DIR}/test_arm_neon.cxx" COMPILE_DEFINITIONS -mfpu=neon -O0)
|
||||
if(${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_SYSTEM_PROCESSOR})
|
||||
try_run(RUN_NEON COMPILE_NEON "${CMAKE_BINARY_DIR}/tmp" "${TEST_DIR}/test_arm_neon.cxx" COMPILE_DEFINITIONS -mfpu=neon -O0)
|
||||
else()
|
||||
try_compile(COMPILE_NEON "${CMAKE_BINARY_DIR}/tmp" "${TEST_DIR}/test_arm_neon.cxx" COMPILE_DEFINITIONS -mfpu=neon -O0)
|
||||
set(RUN_NEON 0)
|
||||
endif()
|
||||
endif()
|
||||
if(COMPILE_NEON AND RUN_NEON EQUAL 0)
|
||||
set(HAS_NEON ON CACHE BOOL "Architecture has NEON SIMD enabled")
|
||||
|
|
Loading…
Reference in New Issue