diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2012-10-22 16:05:39 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2012-10-22 16:05:39 +0200 |
commit | f2e498c7db02561b3c10feb2725e680beb5aa0d5 (patch) | |
tree | 52d4aa38bbec6e3b5d919c6ef82150f5c47756c9 /cmake/Modules | |
parent | dde0404dfb1f1a0876356b4eb9c1f949f1e674ff (diff) | |
download | libssh-f2e498c7db02561b3c10feb2725e680beb5aa0d5.tar.gz libssh-f2e498c7db02561b3c10feb2725e680beb5aa0d5.tar.xz libssh-f2e498c7db02561b3c10feb2725e680beb5aa0d5.zip |
cmake: Set GNU compiler flags also for clang.
Diffstat (limited to 'cmake/Modules')
-rw-r--r-- | cmake/Modules/DefineCompilerFlags.cmake | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cmake/Modules/DefineCompilerFlags.cmake b/cmake/Modules/DefineCompilerFlags.cmake index 5b0fbdd6..f2ac0822 100644 --- a/cmake/Modules/DefineCompilerFlags.cmake +++ b/cmake/Modules/DefineCompilerFlags.cmake @@ -7,7 +7,8 @@ if (UNIX AND NOT WIN32) # # Define GNUCC compiler flags # - if (${CMAKE_C_COMPILER_ID} MATCHES GNU) + if (${CMAKE_C_COMPILER_ID} MATCHES "(GNU|Clang)") + # add -Wconversion ? set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -pedantic -pedantic-errors") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wshadow -Wmissing-prototypes -Wdeclaration-after-statement") @@ -29,7 +30,7 @@ if (UNIX AND NOT WIN32) if (WITH_FORTIFY_SOURCE) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_FORTIFY_SOURCE=2") endif (WITH_FORTIFY_SOURCE) - endif (${CMAKE_C_COMPILER_ID} MATCHES GNU) + endif (${CMAKE_C_COMPILER_ID} MATCHES "(GNU|Clang)") # # Check for large filesystem support |