diff options
author | Andreas Schneider <mail@cynapses.org> | 2009-07-21 11:10:09 +0200 |
---|---|---|
committer | Andreas Schneider <mail@cynapses.org> | 2009-07-23 09:07:00 +0200 |
commit | b62d0732d28d9213cfc412e3f679b791c3979162 (patch) | |
tree | 82f9d321b76ae1f61100df4091dc29c7e42cf71b /cmake | |
parent | 90a6d431a75e9bcec68cd2e7c1a42465238d3faf (diff) | |
download | libssh-b62d0732d28d9213cfc412e3f679b791c3979162.tar.gz libssh-b62d0732d28d9213cfc412e3f679b791c3979162.tar.xz libssh-b62d0732d28d9213cfc412e3f679b791c3979162.zip |
Only add additional warnings if we have a GNU compiler.
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/Modules/DefineCompilerFlags.cmake | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cmake/Modules/DefineCompilerFlags.cmake b/cmake/Modules/DefineCompilerFlags.cmake index 26cee6c8..6168b4e4 100644 --- a/cmake/Modules/DefineCompilerFlags.cmake +++ b/cmake/Modules/DefineCompilerFlags.cmake @@ -34,7 +34,9 @@ if (UNIX AND NOT WIN32) add_definitions(${_lfs_CFLAGS}) endif (CMAKE_SIZEOF_VOID_P MATCHES "8") - add_definitions(-Wall -Wextra -Wmissing-prototypes -Wdeclaration-after-statement -Wunused) + if (CMAKE_COMPILER_IS_GNUCC) + add_definitions(-Wall -Wextra -Wmissing-prototypes -Wdeclaration-after-statement -Wunused) + endif (CMAKE_COMPILER_IS_GNUCC) check_c_compiler_flag("-fstack-protector" WITH_STACK_PROTECTOR) if (WITH_STACK_PROTECTOR) |