Files @ r25625:c14e95bbb24a
Branch filter:

Location: cpp/openttd-patchpack/source/cmake/Endian.cmake

Patric Stout
Add: '-X' option to ignore global folders in the search path (#9341)

This is extreme useful for automated testing. Without this, OpenTTD
will always look in your personal-dir (like ~/.local/share/openttd
or %USER%\Documents\OpenTTD). For most users this is exactly what
we want, that there is a shared place for all their files.

However, for automated testing this is rather annoying, as your
local development files influence the automated test. As such,
'-X' counters this, and only gives the local folders. This is
especially useful in combination with '-x' and '-c'.
# 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()
        add_definitions(-DTTD_ENDIAN=TTD_LITTLE_ENDIAN)
    endif()
endfunction()