ref: a35c56fdfe17aece72db0636b46e8839e1014877
parent: 854a6310224e668ef55d11616ef8ace2bda1be45
author: ngkaho1234 <ngkaho1234@gmail.com>
date: Sat Jan 23 17:35:58 EST 2016
Specify flags without -Wextra for non-gcc compilers.
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -48,8 +48,11 @@
#Library build
add_subdirectory(lwext4)
#Detect all possible warnings for lwext4 target
-set_target_properties(lwext4 PROPERTIES COMPILE_FLAGS "-Wall -Wextra -pedantic")
-
+if (NOT CMAKE_COMPILER_IS_GNUCC)
+ set_target_properties(lwext4 PROPERTIES COMPILE_FLAGS "")
+else()
+ set_target_properties(lwext4 PROPERTIES COMPILE_FLAGS "-Wall -Wextra -pedantic")
+endif()
#DISTRIBUTION
set(CPACK_PACKAGE_VERSION_MAJOR "${VERSION_MAJOR}")