summaryrefslogtreecommitdiff
path: root/cmake/Endian.cmake
blob: 00cb9754456d452aa27247cdd8cf290ca570daf6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Add the definitions to indicate which endian we are building for.
#
# add_endian_definition()
#
function(add_endian_definition)
    include(TestBigEndian)
    TEST_BIG_ENDIAN(IS_BIG_ENDIAN)

    if (IS_BIG_ENDIAN)
        add_definitions(-DTTD_ENDIAN=TTD_BIG_ENDIAN)
    else (IS_BIG_ENDIAN)
        add_definitions(-DTTD_ENDIAN=TTD_LITTLE_ENDIAN)
    endif (IS_BIG_ENDIAN)
endfunction()