[ros-diffs] [jgardou] 53585: [CMAKE] - enable -Werror by default on gcc build

jgardou at svn.reactos.org jgardou at svn.reactos.org
Sun Sep 4 17:32:31 UTC 2011


Author: jgardou
Date: Sun Sep  4 17:32:30 2011
New Revision: 53585

URL: http://svn.reactos.org/svn/reactos?rev=53585&view=rev
Log:
[CMAKE]
- enable -Werror by default on gcc build

Modified:
    trunk/reactos/base/applications/winhlp32/CMakeLists.txt
    trunk/reactos/base/applications/wordpad/CMakeLists.txt
    trunk/reactos/base/applications/write/CMakeLists.txt
    trunk/reactos/cmake/gcc.cmake
    trunk/reactos/dll/3rdparty/libtiff/CMakeLists.txt
    trunk/reactos/dll/3rdparty/libxslt/CMakeLists.txt
    trunk/reactos/dll/3rdparty/mesa32/CMakeLists.txt
    trunk/reactos/dll/directx/quartz/CMakeLists.txt
    trunk/reactos/dll/directx/wine/wined3d/CMakeLists.txt
    trunk/reactos/dll/win32/cabinet/CMakeLists.txt
    trunk/reactos/dll/win32/itss/CMakeLists.txt
    trunk/reactos/dll/win32/jscript/CMakeLists.txt
    trunk/reactos/dll/win32/localspl/CMakeLists.txt
    trunk/reactos/dll/win32/mciseq/CMakeLists.txt
    trunk/reactos/dll/win32/mciwave/CMakeLists.txt
    trunk/reactos/dll/win32/rpcrt4/CMakeLists.txt
    trunk/reactos/dll/win32/shdocvw/CMakeLists.txt
    trunk/reactos/dll/win32/winhttp/CMakeLists.txt
    trunk/reactos/dll/win32/wininet/CMakeLists.txt
    trunk/reactos/lib/3rdparty/libxml2/CMakeLists.txt
    trunk/reactos/lib/drivers/lwip/CMakeLists.txt
    trunk/reactos/lib/rossym_new/CMakeLists.txt
    trunk/reactos/lib/sdk/crt/msvcrtex.cmake

Modified: trunk/reactos/base/applications/winhlp32/CMakeLists.txt
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/winhlp32/CMakeLists.txt?rev=53585&r1=53584&r2=53585&view=diff
==============================================================================
--- trunk/reactos/base/applications/winhlp32/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/base/applications/winhlp32/CMakeLists.txt [iso-8859-1] Sun Sep  4 17:32:30 2011
@@ -22,3 +22,7 @@
 target_link_libraries(winhlp32 wine)
 add_importlibs(winhlp32 user32 gdi32 shell32 comctl32 comdlg32 msvcrt kernel32 ntdll)
 add_cd_file(TARGET winhlp32 DESTINATION reactos FOR all)
+
+if(NOT MSVC)
+    allow_warnings(winhlp32)
+endif()

Modified: trunk/reactos/base/applications/wordpad/CMakeLists.txt
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/wordpad/CMakeLists.txt?rev=53585&r1=53584&r2=53585&view=diff
==============================================================================
--- trunk/reactos/base/applications/wordpad/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/base/applications/wordpad/CMakeLists.txt [iso-8859-1] Sun Sep  4 17:32:30 2011
@@ -18,3 +18,7 @@
 target_link_libraries(wordpad wine uuid)
 add_importlibs(wordpad comdlg32 ole32 shell32 user32 gdi32 advapi32 comctl32 msvcrt kernel32 ntdll)
 add_cd_file(TARGET wordpad DESTINATION reactos/system32 FOR all)
+
+if(NOT MSVC)
+    allow_warnings(wordpad)
+endif()

Modified: trunk/reactos/base/applications/write/CMakeLists.txt
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/write/CMakeLists.txt?rev=53585&r1=53584&r2=53585&view=diff
==============================================================================
--- trunk/reactos/base/applications/write/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/base/applications/write/CMakeLists.txt [iso-8859-1] Sun Sep  4 17:32:30 2011
@@ -5,3 +5,7 @@
 set_module_type(write win32gui UNICODE)
 add_importlibs(write user32 gdi32 msvcrt kernel32)
 add_cd_file(TARGET write DESTINATION reactos/system32 FOR all)
+
+if(NOT MSVC)
+    allow_warnings(write)
+endif()

Modified: trunk/reactos/cmake/gcc.cmake
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/gcc.cmake?rev=53585&r1=53584&r2=53585&view=diff
==============================================================================
--- trunk/reactos/cmake/gcc.cmake [iso-8859-1] (original)
+++ trunk/reactos/cmake/gcc.cmake [iso-8859-1] Sun Sep  4 17:32:30 2011
@@ -4,6 +4,9 @@
 
 # Debugging (Note: DWARF-4 on 4.5.1 when we ship)
 add_compile_flags("-gdwarf-2 -g2 -femit-struct-debug-detailed=none -feliminate-unused-debug-types")
+
+# Do not allow warnings
+add_compile_flags("-Werror")
 
 # For some reason, cmake sets -fPIC, and we don't want it
 string(REPLACE "-fPIC" "" CMAKE_SHARED_LIBRARY_ASM_FLAGS ${CMAKE_SHARED_LIBRARY_ASM_FLAGS})
@@ -349,3 +352,7 @@
     add_custom_target(${_target_name} ALL DEPENDS ${_binary_file})
 
 endfunction()
+
+function(allow_warnings __module)
+    add_target_compile_flags(${__module} -Wno-error)
+endfunction()

Modified: trunk/reactos/dll/3rdparty/libtiff/CMakeLists.txt
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/3rdparty/libtiff/CMakeLists.txt?rev=53585&r1=53584&r2=53585&view=diff
==============================================================================
--- trunk/reactos/dll/3rdparty/libtiff/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/3rdparty/libtiff/CMakeLists.txt [iso-8859-1] Sun Sep  4 17:32:30 2011
@@ -50,8 +50,12 @@
     tif_write.c
     tif_zip.c)
 
-set_entrypoint(libtiff 0)
+set_module_type(libtiff win32dll ENTRYPOINT 0)
 target_link_libraries(libtiff zlib getopt)
 add_importlibs(libtiff user32 msvcrt kernel32)
 add_dependencies(libtiff psdk)
 add_cd_file(TARGET libtiff DESTINATION reactos/system32 FOR all)
+
+if(NOT MSVC)
+    allow_warnings(libtiff)
+endif()

Modified: trunk/reactos/dll/3rdparty/libxslt/CMakeLists.txt
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/3rdparty/libxslt/CMakeLists.txt?rev=53585&r1=53584&r2=53585&view=diff
==============================================================================
--- trunk/reactos/dll/3rdparty/libxslt/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/3rdparty/libxslt/CMakeLists.txt [iso-8859-1] Sun Sep  4 17:32:30 2011
@@ -44,3 +44,7 @@
 add_dependencies(libxslt psdk)
 add_pch(libxslt libxslt.h)
 add_cd_file(TARGET libxslt DESTINATION reactos/system32 FOR all)
+
+if(NOT MSVC)
+    allow_warnings(libxslt)
+endif()

Modified: trunk/reactos/dll/3rdparty/mesa32/CMakeLists.txt
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/3rdparty/mesa32/CMakeLists.txt?rev=53585&r1=53584&r2=53585&view=diff
==============================================================================
--- trunk/reactos/dll/3rdparty/mesa32/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/3rdparty/mesa32/CMakeLists.txt [iso-8859-1] Sun Sep  4 17:32:30 2011
@@ -260,7 +260,11 @@
 
 add_library(mesa32 SHARED ${SOURCE})
 add_pch(mesa32 src/main/glheader.h)
-set_entrypoint(mesa32 0)
+set_module_type(mesa32 win32dll ENTRYPOINT 0)
 add_importlibs(mesa32 gdi32 user32 msvcrt kernel32 ntdll)
 add_dependencies(mesa32 psdk)
 add_cd_file(TARGET mesa32 DESTINATION reactos/system32 FOR all)
+
+if(NOT MSVC)
+    allow_warnings(mesa32)
+endif()

Modified: trunk/reactos/dll/directx/quartz/CMakeLists.txt
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/quartz/CMakeLists.txt?rev=53585&r1=53584&r2=53585&view=diff
==============================================================================
--- trunk/reactos/dll/directx/quartz/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/quartz/CMakeLists.txt [iso-8859-1] Sun Sep  4 17:32:30 2011
@@ -72,3 +72,7 @@
 
 add_pch(quartz quartz_private.h)
 add_cd_file(TARGET quartz DESTINATION reactos/system32 FOR all)
+
+if(NOT MSVC)
+    allow_warnings(quartz)
+endif()

Modified: trunk/reactos/dll/directx/wine/wined3d/CMakeLists.txt
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/wined3d/CMakeLists.txt?rev=53585&r1=53584&r2=53585&view=diff
==============================================================================
--- trunk/reactos/dll/directx/wine/wined3d/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/wined3d/CMakeLists.txt [iso-8859-1] Sun Sep  4 17:32:30 2011
@@ -70,3 +70,7 @@
 add_pch(wined3d wined3d_private.h)
 add_cd_file(TARGET wined3d DESTINATION reactos/system32 FOR all)
 add_importlib_target(wined3d.spec)
+
+if(NOT MSVC)
+    allow_warnings(wined3d)
+endif()

Modified: trunk/reactos/dll/win32/cabinet/CMakeLists.txt
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cabinet/CMakeLists.txt?rev=53585&r1=53584&r2=53585&view=diff
==============================================================================
--- trunk/reactos/dll/win32/cabinet/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/cabinet/CMakeLists.txt [iso-8859-1] Sun Sep  4 17:32:30 2011
@@ -15,7 +15,7 @@
 
 add_library(cabinet SHARED ${SOURCE})
 
-set_entrypoint(cabinet 0)
+set_module_type(cabinet win32dll ENTRYPOINT 0)
 target_link_libraries(cabinet wine)
 add_importlibs(cabinet kernel32 ntdll)
 add_importlib_target(cabinet.spec)

Modified: trunk/reactos/dll/win32/itss/CMakeLists.txt
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/itss/CMakeLists.txt?rev=53585&r1=53584&r2=53585&view=diff
==============================================================================
--- trunk/reactos/dll/win32/itss/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/itss/CMakeLists.txt [iso-8859-1] Sun Sep  4 17:32:30 2011
@@ -24,6 +24,8 @@
 target_link_libraries(itss uuid wine)
 if(MSVC)
     target_link_libraries(itss itss_guid)
+else()
+    allow_warnings(itss)
 endif()
 
 add_importlibs(itss

Modified: trunk/reactos/dll/win32/jscript/CMakeLists.txt
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/jscript/CMakeLists.txt?rev=53585&r1=53584&r2=53585&view=diff
==============================================================================
--- trunk/reactos/dll/win32/jscript/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/jscript/CMakeLists.txt [iso-8859-1] Sun Sep  4 17:32:30 2011
@@ -62,3 +62,7 @@
 add_pch(jscript jscript.h)
 add_dependencies(jscript jsglobal)
 add_cd_file(TARGET jscript DESTINATION reactos/system32 FOR all)
+
+if(NOT MSVC)
+    allow_warnings(jscript)
+endif()

Modified: trunk/reactos/dll/win32/localspl/CMakeLists.txt
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/localspl/CMakeLists.txt?rev=53585&r1=53584&r2=53585&view=diff
==============================================================================
--- trunk/reactos/dll/win32/localspl/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/localspl/CMakeLists.txt [iso-8859-1] Sun Sep  4 17:32:30 2011
@@ -33,3 +33,7 @@
     ntdll)
 
 add_cd_file(TARGET localspl DESTINATION reactos/system32 FOR all)
+
+if(NOT MSVC)
+    allow_warnings(localspl)
+endif()

Modified: trunk/reactos/dll/win32/mciseq/CMakeLists.txt
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mciseq/CMakeLists.txt?rev=53585&r1=53584&r2=53585&view=diff
==============================================================================
--- trunk/reactos/dll/win32/mciseq/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/mciseq/CMakeLists.txt [iso-8859-1] Sun Sep  4 17:32:30 2011
@@ -10,8 +10,13 @@
 
 add_library(mciseq SHARED ${SOURCE})
 
-set_entrypoint(mciseq 0)
+set_module_type(mciseq win32dll ENTRYPOINT 0)
+
 target_link_libraries(mciseq wine)
 add_importlibs(mciseq winmm user32 kernel32 ntdll msvcrt)
 add_dependencies(mciseq psdk)
 add_cd_file(TARGET mciseq DESTINATION reactos/system32 FOR all)
+
+if(NOT MSVC)
+    allow_warnings(mciseq)
+endif()

Modified: trunk/reactos/dll/win32/mciwave/CMakeLists.txt
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mciwave/CMakeLists.txt?rev=53585&r1=53584&r2=53585&view=diff
==============================================================================
--- trunk/reactos/dll/win32/mciwave/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/mciwave/CMakeLists.txt [iso-8859-1] Sun Sep  4 17:32:30 2011
@@ -13,8 +13,13 @@
 
 add_library(mciwave SHARED ${SOURCE})
 
-set_entrypoint(mciwave 0)
+set_module_type(mciwave win32dll ENTRYPOINT 0)
+
 target_link_libraries(mciwave wine)
 add_importlibs(mciwave user32 winmm msvcrt kernel32 ntdll)
 add_dependencies(mciwave psdk)
 add_cd_file(TARGET mciwave DESTINATION reactos/system32 FOR all)
+
+if(NOT MSVC)
+    allow_warnings(mciwave)
+endif()

Modified: trunk/reactos/dll/win32/rpcrt4/CMakeLists.txt
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/rpcrt4/CMakeLists.txt?rev=53585&r1=53584&r2=53585&view=diff
==============================================================================
--- trunk/reactos/dll/win32/rpcrt4/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/rpcrt4/CMakeLists.txt [iso-8859-1] Sun Sep  4 17:32:30 2011
@@ -50,3 +50,7 @@
 add_importlibs(rpcrt4 msvcrt advapi32 ws2_32 kernel32 ntdll)
 add_cd_file(TARGET rpcrt4 DESTINATION reactos/system32 FOR all)
 add_importlib_target(rpcrt4.spec)
+
+if(NOT MSVC)
+    allow_warnings(rpcrt4)
+endif()

Modified: trunk/reactos/dll/win32/shdocvw/CMakeLists.txt
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shdocvw/CMakeLists.txt?rev=53585&r1=53584&r2=53585&view=diff
==============================================================================
--- trunk/reactos/dll/win32/shdocvw/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shdocvw/CMakeLists.txt [iso-8859-1] Sun Sep  4 17:32:30 2011
@@ -53,3 +53,7 @@
 add_pch(shdocvw shdocvw.h)
 add_cd_file(TARGET shdocvw DESTINATION reactos/system32 FOR all)
 add_importlib_target(shdocvw.spec)
+
+if(NOT MSVC)
+    allow_warnings(shdocvw)
+endif()

Modified: trunk/reactos/dll/win32/winhttp/CMakeLists.txt
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winhttp/CMakeLists.txt?rev=53585&r1=53584&r2=53585&view=diff
==============================================================================
--- trunk/reactos/dll/win32/winhttp/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/winhttp/CMakeLists.txt [iso-8859-1] Sun Sep  4 17:32:30 2011
@@ -22,3 +22,7 @@
 add_importlibs(winhttp shlwapi wininet ws2_32 msvcrt advapi32 kernel32 ntdll)
 add_importlib_target(winhttp.spec)
 add_cd_file(TARGET winhttp DESTINATION reactos/system32 FOR all)
+
+if(NOT MSVC)
+    allow_warnings(winhttp)
+endif()

Modified: trunk/reactos/dll/win32/wininet/CMakeLists.txt
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/CMakeLists.txt?rev=53585&r1=53584&r2=53585&view=diff
==============================================================================
--- trunk/reactos/dll/win32/wininet/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/wininet/CMakeLists.txt [iso-8859-1] Sun Sep  4 17:32:30 2011
@@ -34,3 +34,7 @@
 add_importlibs(wininet mpr shlwapi shell32 user32 advapi32 ws2_32 msvcrt kernel32 ntdll)
 add_cd_file(TARGET wininet DESTINATION reactos/system32 FOR all)
 add_importlib_target(wininet.spec)
+
+if(NOT MSVC)
+    allow_warnings(wininet)
+endif()

Modified: trunk/reactos/lib/3rdparty/libxml2/CMakeLists.txt
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/libxml2/CMakeLists.txt?rev=53585&r1=53584&r2=53585&view=diff
==============================================================================
--- trunk/reactos/lib/3rdparty/libxml2/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/lib/3rdparty/libxml2/CMakeLists.txt [iso-8859-1] Sun Sep  4 17:32:30 2011
@@ -59,3 +59,7 @@
 add_library(libxml2 ${SOURCE})
 target_link_libraries(libxml2 oldnames)
 add_dependencies(libxml2 psdk)
+
+if(NOT MSVC)
+    allow_warnings(libxml2)
+endif()

Modified: trunk/reactos/lib/drivers/lwip/CMakeLists.txt
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/lwip/CMakeLists.txt?rev=53585&r1=53584&r2=53585&view=diff
==============================================================================
--- trunk/reactos/lib/drivers/lwip/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/lwip/CMakeLists.txt [iso-8859-1] Sun Sep  4 17:32:30 2011
@@ -58,3 +58,6 @@
 
 add_library(lwip ${SOURCE})
 add_dependencies(lwip bugcodes)
+if(NOT MSVC)
+    allow_warnings(lwip)
+endif()

Modified: trunk/reactos/lib/rossym_new/CMakeLists.txt
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rossym_new/CMakeLists.txt?rev=53585&r1=53584&r2=53585&view=diff
==============================================================================
--- trunk/reactos/lib/rossym_new/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/lib/rossym_new/CMakeLists.txt [iso-8859-1] Sun Sep  4 17:32:30 2011
@@ -22,4 +22,5 @@
     add_library(rossym ${SOURCE})
     add_pch(rossym precomp.h)
     add_dependencies(rossym psdk bugcodes)
+    allow_warnings(rossym)
 endif()

Modified: trunk/reactos/lib/sdk/crt/msvcrtex.cmake
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/msvcrtex.cmake?rev=53585&r1=53584&r2=53585&view=diff
==============================================================================
--- trunk/reactos/lib/sdk/crt/msvcrtex.cmake [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/msvcrtex.cmake [iso-8859-1] Sun Sep  4 17:32:30 2011
@@ -68,6 +68,7 @@
 
 if(NOT MSVC)
     target_link_libraries(msvcrtex oldnames)
+    allow_warnings(msvcrtex)
 endif()
 
 add_dependencies(msvcrtex psdk asm)




More information about the Ros-diffs mailing list