Last active
February 24, 2017 09:40
-
-
Save abhishekgnanda/4928d4986a7bdc9b6f1a7a7a08702708 to your computer and use it in GitHub Desktop.
Detect if system is little-endian in cmake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include (TestBigEndian) | |
TEST_BIG_ENDIAN(IS_BIG_ENDIAN) | |
if(IS_BIG_ENDIAN) | |
message(FATAL_ERROR "This is a big-endian system and is not supported") | |
else() | |
message(STATUS "Little endian system") | |
endif() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment