summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorngkaho1234 <ngkaho1234@gmail.com>2016-01-23 22:35:58 +0800
committerngkaho1234 <ngkaho1234@gmail.com>2016-01-23 23:54:21 +0800
commita35c56fdfe17aece72db0636b46e8839e1014877 (patch)
tree82ea41907dbfbba649188cc9b5311d245f3267f8 /CMakeLists.txt
parent854a6310224e668ef55d11616ef8ace2bda1be45 (diff)
Specify flags without -Wextra for non-gcc compilers.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 5 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b226830..1d83974 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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}")