]> sigrok.org Git - pulseview.git/commitdiff
memaccess.cmake: Cosmetics, whitespace, consistency fixes.
authorUwe Hermann <redacted>
Thu, 20 Feb 2014 13:34:47 +0000 (14:34 +0100)
committerUwe Hermann <redacted>
Thu, 20 Feb 2014 13:34:47 +0000 (14:34 +0100)
Match the rest of PulseView's CMake file conventions more closely.

CMake/memaccess.cmake

index 9fd62f9486f029d738c95d6fee27158cdeb9096b..a4a05f945a1c59c916bc65041e6b36229a71ed9d 100644 (file)
@@ -19,8 +19,8 @@
 
 include(CheckCSourceRuns)
 
 
 include(CheckCSourceRuns)
 
-function (memaccess_check_unaligned_le _var)
-IF (NOT CMAKE_CROSSCOMPILING)
+function(memaccess_check_unaligned_le _var)
+if(NOT CMAKE_CROSSCOMPILING)
 CHECK_C_SOURCE_RUNS("
 #include <stdint.h>
 int main() {
 CHECK_C_SOURCE_RUNS("
 #include <stdint.h>
 int main() {
@@ -28,14 +28,14 @@ int main() {
     union { uint64_t u64; uint8_t u8[16]; } d;
     uint64_t v;
     for (i=0; i<16; i++)
     union { uint64_t u64; uint8_t u8[16]; } d;
     uint64_t v;
     for (i=0; i<16; i++)
-       d.u8[i] = i;
+        d.u8[i] = i;
     v = *(uint64_t *)(d.u8+1);
     if (v != 0x0807060504030201ULL)
        return 1;
     return 0;
 }" ${_var})
     v = *(uint64_t *)(d.u8+1);
     if (v != 0x0807060504030201ULL)
        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)
+endif()
+if(CMAKE_CROSSCOMPILING)
+  message(WARNING "Cross compiling - using portable code for memory access")
+endif()
 endfunction()
 endfunction()