]> sigrok.org Git - pulseview.git/commitdiff
Skip check for unportable sample pack/unpack when cross-compiling
authorMarcus Comstedt <redacted>
Wed, 19 Feb 2014 18:40:34 +0000 (19:40 +0100)
committerMarcus Comstedt <redacted>
Wed, 19 Feb 2014 18:40:34 +0000 (19:40 +0100)
CMake/memaccess.cmake

index 86ceb0e281f640479eaf2b5e60020d0dfbc9fcdb..9fd62f9486f029d738c95d6fee27158cdeb9096b 100644 (file)
@@ -20,6 +20,7 @@
 include(CheckCSourceRuns)
 
 function (memaccess_check_unaligned_le _var)
+IF (NOT CMAKE_CROSSCOMPILING)
 CHECK_C_SOURCE_RUNS("
 #include <stdint.h>
 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()