diff options
author | Mouse <mouse008@gmail.com> | 2017-06-27 18:50:00 -0400 |
---|---|---|
committer | Mouse <mouse008@gmail.com> | 2017-06-27 18:50:00 -0400 |
commit | 12e45d176316c0cd843302418979188ee94216b6 (patch) | |
tree | a67de5a70fb35487fb7932804c65a1fcfba1a276 /CMakeLists.txt | |
parent | 05690cd479ec4ed9646afbc764f0dcb264b861e8 (diff) | |
download | gost-engine-12e45d176316c0cd843302418979188ee94216b6.zip gost-engine-12e45d176316c0cd843302418979188ee94216b6.tar.gz gost-engine-12e45d176316c0cd843302418979188ee94216b6.tar.bz2 |
Enable build by GCC and Clang, and passing -L flag via CMAKE_C_FLAGS variable
like the README suggests.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 6 insertions, 1 deletions
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) |