X-Git-Url: http://wagner.pp.ru/gitweb/?a=blobdiff_plain;f=CMakeLists.txt;h=d6e560698c0436902a774f0c091b8c9295529909;hb=624ddcf67b15d1c5c98b9e9ccd2f66cf7908ecc4;hp=9bab8337f0f9ef9399cc5b9d31d4638a9ba20592;hpb=eaf0efe8098a2a3701f469d777ec1fd2e00574b1;p=openssl-gost%2Fengine.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 9bab833..d6e5606 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,9 +12,9 @@ find_package(OpenSSL 3.0 REQUIRED) include_directories(${OPENSSL_INCLUDE_DIR}) if (CMAKE_C_COMPILER_ID MATCHES "Clang") - add_compile_options(-O2 -Werror -Wall -Wno-unused-parameter -Wno-unused-function -Wno-missing-braces -ggdb -Qunused-arguments) + add_compile_options(-O2 -Werror -Wall -Wno-unused-parameter -Wno-unused-function -Wno-missing-braces -ggdb -Qunused-arguments -Wno-deprecated-declarations) elseif(CMAKE_C_COMPILER_ID MATCHES "GNU") - add_compile_options(-O2 -Werror -Wall -Wno-unused-parameter -Wno-unused-function -Wno-missing-braces -ggdb -Wno-error=unknown-pragmas -Wno-deprecated-declarations) + add_compile_options(-O2 -Werror -Wall -Wno-unused-parameter -Wno-unused-function -Wno-missing-braces -ggdb -Wno-error=unknown-pragmas -Wno-error=pragmas -Wno-deprecated-declarations) elseif(CMAKE_C_COMPILER_ID MATCHES "MSVC") add_definitions(-D_CRT_SECURE_NO_WARNINGS) add_definitions(-D_CRT_DEPRECATED_NO_WARNINGS) @@ -66,6 +66,18 @@ if (ADDCARRY_U64) add_definitions(-DHAVE_ADDCARRY_U64) endif() +check_c_source_runs(" + int main(void) { + char buf[16] = { 0, 1, 2 }; + int *p = (int *)(buf + 1); + int *q = (int *)(buf + 2); + return (*p == *q); + } + " RELAXED_ALIGNMENT) +if (NOT RELAXED_ALIGNMENT) + add_definitions(-DSTRICT_ALIGNMENT) +endif() + set(BIN_DIRECTORY bin) # Same soversion as OpenSSL