Specify flags without -Wextra for non-gcc compilers.
authorngkaho1234 <ngkaho1234@gmail.com>
Sat, 23 Jan 2016 14:35:58 +0000 (22:35 +0800)
committerngkaho1234 <ngkaho1234@gmail.com>
Sat, 23 Jan 2016 15:54:21 +0000 (23:54 +0800)
CMakeLists.txt

index b226830631aad446335d7bb1bb5aa5b6273185c5..1d83974883aae69bd220f25aecde640d81dd2e5b 100644 (file)
@@ -48,8 +48,11 @@ add_subdirectory(blockdev)
 #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}")