Only compile with -Wmissing-declarations and -Wmissing-prototypes in
library, not tests and programs
diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt
index c4060d1..1a3e077 100644
--- a/library/CMakeLists.txt
+++ b/library/CMakeLists.txt
@@ -69,6 +69,11 @@
set(libs ws2_32)
endif(WIN32)
+if(CMAKE_COMPILER_IS_GNUCC)
+ set(CMAKE_C_FLAGS_CHECK "${CMAKE_C_FLAGS_CHECK} -Wmissing-declarations -Wmissing-prototypes")
+ set(CMAKE_C_FLAGS_CHECKFULL "${CMAKE_C_FLAGS_CHECK} -Wcast-qual")
+endif(CMAKE_COMPILER_IS_GNUCC)
+
if(NOT USE_SHARED_POLARSSL_LIBRARY)
add_library(polarssl STATIC ${src})