diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2017-04-26 19:27:50 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2017-04-26 19:27:50 +0200 |
commit | 6486c53de45a285162897a14571bf927f47e8ba6 (patch) | |
tree | 2d2d389128ff84bf3c1bbb5581118b6464f56988 | |
parent | 21113e5ca41e2091a092fdfb4522681d891ec069 (diff) | |
download | cssh-6486c53de45a285162897a14571bf927f47e8ba6.tar.gz cssh-6486c53de45a285162897a14571bf927f47e8ba6.tar.bz2 |
some C flags fixes for clang
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index fa39d6c..53d5b66 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,12 @@ project(cssh C) set( CSSH_VERSION 0.0.1 ) -set(CMAKE_C_FLAGS "-std=c99 -Wall -pedantic -Wfatal-errors -Werror -fPIC -O0 -Wno-unused-but-set-variable -g -D_XOPEN_SOURCE=700") +if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -Wall -pedantic -Wfatal-errors -Werror -fPIC -Wno-unused-but-set-variable -D_XOPEN_SOURCE=700") +endif() +if("${CMAKE_CXX_COMPILER_ID}" MATCHES "[cC]lang") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -Wall -pedantic -Wfatal-errors -Werror -fPIC -D_XOPEN_SOURCE=700") +endif() enable_testing( ) |