cmake_modules/TestBigEndian.cmake
author Wuzzy <almikes@aol.com>
Fri, 06 May 2016 17:20:19 +0200
changeset 11813 5bda5af6a9c7
parent 11658 f87ed83568c8
permissions -rw-r--r--
Add help texts for game scheme's basic settings (initial health, etc.)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11658
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
     1
#.rst:
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
     2
# TestBigEndian
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
     3
# -------------
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
     4
#
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
     5
# The TestBigEndian.cmake module that ships with CMake, which
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
     6
# checks if the system is big endian or little endian, assumes
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
     7
# that a binary is produced that will have bytes that correspond to the
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
     8
# endianness on the target system. Since emscripten produces Javascript, we
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
     9
# override the default behavior and always return little endian.
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    10
#
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    11
# ::
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    12
#
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    13
#   TEST_BIG_ENDIAN(VARIABLE)
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    14
#   VARIABLE - variable to store the result to
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    15
#=============================================================================
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    16
# Copyright 2002-2009 Kitware, Inc.
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    17
#
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    18
# Distributed under the OSI-approved BSD License (the "License");
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    19
# see accompanying file Copyright.txt for details.
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    20
#
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    21
# This software is distributed WITHOUT ANY WARRANTY; without even the
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    22
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    23
# See the License for more information.
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    24
#=============================================================================
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    25
# (To distribute this file outside of CMake, substitute the full
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    26
#  License text for the above reference.)
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    27
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    28
function(TEST_BIG_ENDIAN VARIABLE)
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    29
  set(${VARIABLE} 0 CACHE INTERNAL "Result of TEST_BIG_ENDIAN" FORCE)
f87ed83568c8 Import the Emscripted toolchain configuration
koda
parents:
diff changeset
    30
endfunction()