From b62d0732d28d9213cfc412e3f679b791c3979162 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Tue, 21 Jul 2009 11:10:09 +0200 Subject: Only add additional warnings if we have a GNU compiler. --- cmake/Modules/DefineCompilerFlags.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) -- cgit v1.2.3