diff options
author | Brent Cook <busterb@gmail.com> | 2024-02-12 03:00:53 -0600 |
---|---|---|
committer | Brent Cook <busterb@gmail.com> | 2024-02-12 03:00:53 -0600 |
commit | db3ab1675bbf8b821ef2fa26e7af14a8b4d38bfe (patch) | |
tree | 67d8e6b08cdc2a798cdfda7a7a907f13b7b5cbe0 /CMakeLists.txt | |
parent | f63596fabd53ed24577957b554283d2f5e7128b2 (diff) | |
parent | 5bd332ec20ea1c66e769f841b510a76320b995c3 (diff) | |
download | portable-db3ab1675bbf8b821ef2fa26e7af14a8b4d38bfe.tar.gz portable-db3ab1675bbf8b821ef2fa26e7af14a8b4d38bfe.tar.bz2 portable-db3ab1675bbf8b821ef2fa26e7af14a8b4d38bfe.zip |
Land #998, Windows: Improve check for endianness when using Visual Studio
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f8cbb4..199c00e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
@@ -140,6 +140,15 @@ endif() | |||
140 | if(MSVC) | 140 | if(MSVC) |
141 | add_definitions(-Dinline=__inline) | 141 | add_definitions(-Dinline=__inline) |
142 | message(STATUS "Using [${CMAKE_C_COMPILER_ID}] compiler") | 142 | message(STATUS "Using [${CMAKE_C_COMPILER_ID}] compiler") |
143 | |||
144 | include(TestBigEndian) | ||
145 | TEST_BIG_ENDIAN(HAVE_BIG_ENDIAN) | ||
146 | if(HAVE_BIG_ENDIAN) | ||
147 | add_definitions(-DHAVE_BIG_ENDIAN) | ||
148 | else() | ||
149 | add_definitions(-DHAVE_LITTLE_ENDIAN) | ||
150 | endif() | ||
151 | |||
143 | if(CMAKE_C_COMPILER_ID MATCHES "MSVC" OR CMAKE_C_COMPILER_ID MATCHES "Clang") | 152 | if(CMAKE_C_COMPILER_ID MATCHES "MSVC" OR CMAKE_C_COMPILER_ID MATCHES "Clang") |
144 | set(MSVC_DISABLED_WARNINGS_LIST | 153 | set(MSVC_DISABLED_WARNINGS_LIST |
145 | "C4018" # 'expression' : signed/unsigned mismatch | 154 | "C4018" # 'expression' : signed/unsigned mismatch |