]> wagner.pp.ru Git - openssl-gost/engine.git/commitdiff
Endianess test
authorDmitry Belyavskiy <beldmit@gmail.com>
Thu, 15 Dec 2016 10:57:19 +0000 (13:57 +0300)
committerDmitry Belyavskiy <beldmit@gmail.com>
Thu, 15 Dec 2016 10:57:19 +0000 (13:57 +0300)
CMakeLists.txt

index 7c87c915df17bb70676fc977639c25eb9625d198..4b50a42539c22df39c8b4b6c68c271f4db713ff4 100644 (file)
@@ -2,7 +2,17 @@ cmake_minimum_required(VERSION 2.8)
 project(ccgost)
 
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c98 -O3 -Werror -Wall")
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 -Werror")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 -Werror -ggdb")
+
+include (TestBigEndian)
+TEST_BIG_ENDIAN(IS_BIG_ENDIAN)
+if(IS_BIG_ENDIAN)
+ message(STATUS "BIG_ENDIAN")
+else()
+ message(STATUS "LITTLE_ENDIAN")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c98 -O3 -Werror -Wall")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DL_ENDIAN")
+endif()
 
 set(GOST_INCLUDE_DIRECTORIES "${OPENSSL_PATH}/include" "${OPENSSL_PATH}/crypto/include")