aboutsummaryrefslogtreecommitdiff
path: root/cmake/Modules
diff options
context:
space:
mode:
authorAndreas Schneider <mail@cynapses.org>2009-07-21 11:10:09 +0200
committerAndreas Schneider <mail@cynapses.org>2009-07-21 11:10:09 +0200
commit1a6038baa58554b86b6e29f87ccdea62bcfd22c2 (patch)
tree87ec7a6c9221f921098e8688545bc50aafe0d4ca /cmake/Modules
parent41a8fb5810759118d93bee30a254ecf4863437b5 (diff)
downloadlibssh-1a6038baa58554b86b6e29f87ccdea62bcfd22c2.tar.gz
libssh-1a6038baa58554b86b6e29f87ccdea62bcfd22c2.tar.xz
libssh-1a6038baa58554b86b6e29f87ccdea62bcfd22c2.zip
Only add additional warnings if we have a GNU compiler.
Diffstat (limited to 'cmake/Modules')
-rw-r--r--cmake/Modules/DefineCompilerFlags.cmake4
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)