cmake_modules/TestBigEndian.cmake
author Wuzzy <Wuzzy2@mail.ru>
Tue, 28 Aug 2018 05:46:33 +0200
changeset 13710 0da36902e5b6
parent 11658 f87ed83568c8
permissions -rw-r--r--
Space Invasion: Continue playing rounds in case the teams are tied at the end Rules in case of a tie: 1) Eliminate all teams not tied for the lead 2) Play another round with the remaining teams 3) Check for the winner again at the end of that round. If there's another tie, repeat the procedure
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()