From: Mouse Date: Tue, 27 Jun 2017 22:50:00 +0000 (-0400) Subject: Enable build by GCC and Clang, and passing -L flag via CMAKE_C_FLAGS variable X-Git-Tag: v1.1.0.2~8^2 X-Git-Url: http://wagner.pp.ru/gitweb/?a=commitdiff_plain;h=12e45d176316c0cd843302418979188ee94216b6;p=openssl-gost%2Fengine.git Enable build by GCC and Clang, and passing -L flag via CMAKE_C_FLAGS variable like the README suggests. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index ccf1730..b239827 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,8 +1,13 @@ cmake_minimum_required(VERSION 2.8) project(ccgost) +if (CMAKE_C_COMPILER_ID MATCHES "Clang") + message(STATUS "Using Clang and adding -Qunused-arguments flag") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Qunused-arguments") +endif() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c98 -O3 -Werror -Qunused-arguments -Wno-unused-function -Wno-missing-braces -Wall") -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -Werror -Wall -Qunused-arguments -Wno-unused-function -Wno-missing-braces -ggdb") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -Werror -Wall -Wno-unused-parameter -Wno-unused-function -Wno-missing-braces -ggdb") include (TestBigEndian) TEST_BIG_ENDIAN(IS_BIG_ENDIAN)