From: Marcus Comstedt Date: Wed, 19 Feb 2014 18:40:34 +0000 (+0100) Subject: Skip check for unportable sample pack/unpack when cross-compiling X-Git-Tag: pulseview-0.2.0~65 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=7846778e253870d1507be1213de12ef8cff8ebf5;p=pulseview.git Skip check for unportable sample pack/unpack when cross-compiling --- diff --git a/CMake/memaccess.cmake b/CMake/memaccess.cmake index 86ceb0e2..9fd62f94 100644 --- a/CMake/memaccess.cmake +++ b/CMake/memaccess.cmake @@ -20,6 +20,7 @@ include(CheckCSourceRuns) function (memaccess_check_unaligned_le _var) +IF (NOT CMAKE_CROSSCOMPILING) CHECK_C_SOURCE_RUNS(" #include int main() { @@ -33,4 +34,8 @@ int main() { return 1; return 0; }" ${_var}) +ENDIF (NOT CMAKE_CROSSCOMPILING) +IF (CMAKE_CROSSCOMPILING) + MESSAGE(WARNING "Cross compiling - using portable code for memory access") +ENDIF (CMAKE_CROSSCOMPILING) endfunction()