Add "-Wall" to CFLAGS when using Clang as compiler See also: * https://cmake.org/cmake/help/v3.12/variable/CMAKE_LANG_COMPILER_ID.html * https://cmake.org/cmake/help/v3.12/variable/CMAKE_COMPILER_IS_GNUCC.html
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a32d7d8..a62798f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,7 +13,7 @@ if("${CMAKE_BUILD_TYPE}" STREQUAL "")
endif()
-if(CMAKE_COMPILER_IS_GNUCC)
+if(${CMAKE_C_COMPILER_ID} MATCHES GNU|Clang)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
elseif(MSVC)
# Disable warnings about the so-called unsecured functions: