[CMAKE]
authorAmine Khaldi <amine.khaldi@reactos.org>
Thu, 11 Sep 2014 10:43:57 +0000 (10:43 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Thu, 11 Sep 2014 10:43:57 +0000 (10:43 +0000)
* Don't set -Wno-unused-but-set-variable until http://llvm.org/bugs/show_bug.cgi?id=20906 is fixed or the warnings are fixed upstream.
CORE-8516

svn path=/trunk/; revision=64114

12 files changed:
reactos/dll/3rdparty/libtiff/CMakeLists.txt
reactos/dll/3rdparty/libxslt/CMakeLists.txt
reactos/dll/opengl/glu32/CMakeLists.txt
reactos/dll/win32/browseui/CMakeLists.txt
reactos/dll/win32/winmm/CMakeLists.txt
reactos/drivers/bluetooth/fbtusb/CMakeLists.txt
reactos/drivers/filesystems/ext2/CMakeLists.txt
reactos/drivers/storage/ide/uniata/CMakeLists.txt
reactos/lib/3rdparty/adns/CMakeLists.txt
reactos/lib/3rdparty/cardlib/CMakeLists.txt
reactos/lib/3rdparty/fullfat/CMakeLists.txt
reactos/lib/3rdparty/libmpg123/CMakeLists.txt

index 27ec6ad..6ea7bb0 100644 (file)
@@ -61,5 +61,7 @@ add_cd_file(TARGET libtiff DESTINATION reactos/system32 FOR all)
 
 if(NOT MSVC)
     allow_warnings(libtiff)
-    add_target_compile_flags(libtiff "-Wno-unused-but-set-variable")
+    if(NOT CMAKE_C_COMPILER_ID STREQUAL "Clang")
+        add_target_compile_flags(libtiff "-Wno-unused-but-set-variable")
+    endif()
 endif()
index 988a7ca..648ca8d 100644 (file)
@@ -48,5 +48,8 @@ add_pch(libxslt precomp.h SOURCE)
 add_cd_file(TARGET libxslt DESTINATION reactos/system32 FOR all)
 
 if(NOT MSVC)
-    add_target_compile_flags(libxslt "-Wno-pointer-sign -Wno-unused-but-set-variable -Wno-unused-function")
+    add_target_compile_flags(libxslt "-Wno-pointer-sign -Wno-unused-function")
+    if(NOT CMAKE_C_COMPILER_ID STREQUAL "Clang")
+        add_target_compile_flags(libxslt "-Wno-unused-but-set-variable")
+    endif()
 endif()
index 4c15d12..3447140 100644 (file)
@@ -113,11 +113,13 @@ add_library(glu32 SHARED ${SOURCE} glu32.rc)
 set_module_type(glu32 win32dll)
 
 if(NOT MSVC)
-    add_target_compile_flags(glu32 "-Wno-write-strings -Wno-unused-but-set-variable")
+    add_target_compile_flags(glu32 "-Wno-write-strings")
     if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
         target_link_libraries(glu32 mingwex)
         #FIXME: longjmp exists in both our msvcrt and mingwex
         add_target_link_flags(glu32 "-Wl,--allow-multiple-definition")
+    else()
+        add_target_compile_flags(glu32 "-Wno-unused-but-set-variable")
     endif()
 endif()
 
index e5f39bc..2c1e04c 100644 (file)
@@ -60,7 +60,9 @@ add_pch(browseui precomp.h SOURCE)
 add_cd_file(TARGET browseui DESTINATION reactos/system32 FOR all)
 
 if(NOT MSVC)
-    add_target_compile_flags(browseui "-Wno-unused-but-set-variable")
+    if(NOT CMAKE_C_COMPILER_ID STREQUAL "Clang")
+        add_target_compile_flags(browseui "-Wno-unused-but-set-variable")
+    endif()
 
     # Binutils linker bug
     if(LTCG)
index 6123003..0c59c51 100644 (file)
@@ -29,6 +29,6 @@ add_pch(winmm winemm.h SOURCE)
 add_subdirectory(midimap)
 add_cd_file(TARGET winmm DESTINATION reactos/system32 FOR all)
 
-if(NOT MSVC)
+if((NOT MSVC) AND (NOT CMAKE_C_COMPILER_ID STREQUAL "Clang"))
     add_target_compile_flags(winmm "-Wno-unused-but-set-variable")
 endif()
index 5b8288f..f3f9d19 100644 (file)
@@ -12,8 +12,8 @@ list(APPEND SOURCE
 
 add_library(fbtusb SHARED ${SOURCE} fbtusb.rc)
 
-if(NOT MSVC)
-    set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-Wno-unused-but-set-variable")
+if((NOT MSVC) AND (NOT CMAKE_C_COMPILER_ID STREQUAL "Clang"))
+    add_target_compile_flags(fbtusb "-Wno-unused-but-set-variable")
 endif()
 
 set_module_type(fbtusb kernelmodedriver)
index afb66a6..8e1f952 100644 (file)
@@ -24,8 +24,8 @@ list(APPEND SOURCE
 
 add_library(ext2fs SHARED ${SOURCE})
 
-if(NOT MSVC)
-    add_compile_flags("-Wno-unused-but-set-variable")
+if((NOT MSVC) AND (NOT CMAKE_C_COMPILER_ID STREQUAL "Clang"))
+    add_target_compile_flags(ext2fs "-Wno-unused-but-set-variable")
 endif()
 
 target_link_libraries(ext2fs ${PSEH_LIB})
index 2236e47..922d18e 100644 (file)
@@ -22,7 +22,10 @@ add_library(uniata SHARED ${SOURCE} idedma.rc)
 
 
 if(NOT MSVC)
-    set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-Wno-unused-but-set-variable -Wno-narrowing")
+    add_target_compile_flags(uniata "-Wno-narrowing")
+    if(NOT CMAKE_C_COMPILER_ID STREQUAL "Clang")
+        add_target_compile_flags(uniata "-Wno-unused-but-set-variable")
+    endif()
 endif()
 
 add_pch(uniata stdafx.h SOURCE)
index e85e707..b8187d8 100644 (file)
@@ -25,6 +25,6 @@ add_library(adns ${SOURCE})
 add_dependencies(adns psdk)
 add_pch(adns src/internal.h SOURCE)
 
-if(NOT MSVC)
+if((NOT MSVC) AND (NOT CMAKE_C_COMPILER_ID STREQUAL "Clang"))
     add_target_compile_flags(adns "-Wno-unused-but-set-variable")
 endif()
index 8369f57..d624197 100644 (file)
@@ -19,6 +19,6 @@ add_library(cardlib ${SOURCE})
 add_dependencies(cardlib psdk)
 add_pch(cardlib cardlib.h SOURCE)
 
-if(NOT MSVC AND (NOT CMAKE_C_COMPILER_ID STREQUAL "Clang"))
+if((NOT MSVC) AND (NOT CMAKE_C_COMPILER_ID STREQUAL "Clang"))
     add_target_compile_flags(cardlib "-Wno-unused-but-set-variable")
 endif()
index 6163ff5..ec426f1 100644 (file)
@@ -19,6 +19,6 @@ list(APPEND SOURCE
 add_library(fullfat ${SOURCE})
 add_dependencies(fullfat bugcodes)
 
-if(NOT MSVC)
+if((NOT MSVC) AND (NOT CMAKE_C_COMPILER_ID STREQUAL "Clang"))
     add_target_compile_flags(fullfat "-Wno-unused-but-set-variable")
 endif()
index 3731927..954682f 100644 (file)
@@ -45,6 +45,6 @@ add_library(libmpg123 ${SOURCE})
 add_dependencies(libmpg123 psdk)
 add_pch(libmpg123 precomp.h SOURCE)
 
-if(NOT MSVC)
+if((NOT MSVC) AND (NOT CMAKE_C_COMPILER_ID STREQUAL "Clang"))
     add_target_compile_flags(libmpg123 "-Wno-unused-but-set-variable")
 endif()