]> wagner.pp.ru Git - openssl-gost/engine.git/commitdiff
Enable build by GCC and Clang, and passing -L flag via CMAKE_C_FLAGS variable 37/head
authorMouse <mouse008@gmail.com>
Tue, 27 Jun 2017 22:50:00 +0000 (18:50 -0400)
committerMouse <mouse008@gmail.com>
Tue, 27 Jun 2017 22:50:00 +0000 (18:50 -0400)
like the README suggests.

CMakeLists.txt

index ccf1730a366c76e1b7ce659db2cd15875627d162..b239827810d59e3482b2e0d1b5f1603de5deb2c1 100644 (file)
@@ -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)