[CMAKE]
authorJérôme Gardou <jerome.gardou@reactos.org>
Sun, 4 Sep 2011 17:32:30 +0000 (17:32 +0000)
committerJérôme Gardou <jerome.gardou@reactos.org>
Sun, 4 Sep 2011 17:32:30 +0000 (17:32 +0000)
- enable -Werror by default on gcc build

svn path=/trunk/; revision=53585

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

index 6f3b9e1..1391b0c 100644 (file)
@@ -22,3 +22,7 @@ set_module_type(winhlp32 win32gui)
 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()
index d04e11c..62915f6 100644 (file)
@@ -18,3 +18,7 @@ set_module_type(wordpad win32gui)
 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()
index 48f6ff3..9437922 100644 (file)
@@ -5,3 +5,7 @@ add_executable(write write.c rsrc.rc)
 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()
index 4149b5d..05b9ee6 100644 (file)
@@ -5,6 +5,9 @@ add_compile_flags("-pipe -fms-extensions")
 # 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 @@ function(CreateBootSectorTarget2 _target_name _asm_file _binary_file _base_addre
     add_custom_target(${_target_name} ALL DEPENDS ${_binary_file})
 
 endfunction()
+
+function(allow_warnings __module)
+    add_target_compile_flags(${__module} -Wno-error)
+endfunction()
index a83ca57..315e039 100644 (file)
@@ -50,8 +50,12 @@ add_library(libtiff SHARED
     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()
index 10df37c..e90c979 100644 (file)
@@ -44,3 +44,7 @@ endif()
 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()
index 32cf70f..caf5bbc 100644 (file)
@@ -260,7 +260,11 @@ endif()
 
 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()
index aff1955..aa1c426 100644 (file)
@@ -72,3 +72,7 @@ add_importlibs(quartz
 
 add_pch(quartz quartz_private.h)
 add_cd_file(TARGET quartz DESTINATION reactos/system32 FOR all)
+
+if(NOT MSVC)
+    allow_warnings(quartz)
+endif()
index a7b742b..dc5fd3c 100644 (file)
@@ -70,3 +70,7 @@ add_dependencies(wined3d wineheaders)
 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()
index f576efd..e90ef01 100644 (file)
@@ -15,7 +15,7 @@ list(APPEND SOURCE
 
 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)
index 188c2c3..6e10707 100644 (file)
@@ -24,6 +24,8 @@ set_module_type(itss win32dll)
 target_link_libraries(itss uuid wine)
 if(MSVC)
     target_link_libraries(itss itss_guid)
+else()
+    allow_warnings(itss)
 endif()
 
 add_importlibs(itss
index d346e64..b4d4869 100644 (file)
@@ -62,3 +62,7 @@ add_importlibs(jscript
 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()
index 5ce1b18..08808d0 100644 (file)
@@ -33,3 +33,7 @@ add_importlibs(localspl
     ntdll)
 
 add_cd_file(TARGET localspl DESTINATION reactos/system32 FOR all)
+
+if(NOT MSVC)
+    allow_warnings(localspl)
+endif()
index b6bba6b..5b9fc45 100644 (file)
@@ -10,8 +10,13 @@ list(APPEND SOURCE
 
 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()
index 48e6d5a..8a29a83 100644 (file)
@@ -13,8 +13,13 @@ list(APPEND SOURCE
 
 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()
index 46a2b70..2f9d2d8 100644 (file)
@@ -50,3 +50,7 @@ add_delay_importlibs(rpcrt4 iphlpapi wininet secur32 user32)
 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()
index 1ad12e9..1be4704 100644 (file)
@@ -53,3 +53,7 @@ add_dependencies(shdocvw shdocvw_v1)
 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()
index 33777f2..dd2250b 100644 (file)
@@ -22,3 +22,7 @@ add_delay_importlibs(winhttp crypt32)
 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()
index 865ef70..6ba338e 100644 (file)
@@ -34,3 +34,7 @@ add_delay_importlibs(wininet secur32 crypt32)
 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()
index 39ed9e7..8d18f18 100644 (file)
@@ -59,3 +59,7 @@ list(APPEND SOURCE
 add_library(libxml2 ${SOURCE})
 target_link_libraries(libxml2 oldnames)
 add_dependencies(libxml2 psdk)
+
+if(NOT MSVC)
+    allow_warnings(libxml2)
+endif()
index e7e0e28..26c4594 100644 (file)
@@ -58,3 +58,6 @@ list(APPEND SOURCE
 
 add_library(lwip ${SOURCE})
 add_dependencies(lwip bugcodes)
+if(NOT MSVC)
+    allow_warnings(lwip)
+endif()
index 0a63d5b..3fa6f71 100644 (file)
@@ -22,4 +22,5 @@ else()
     add_library(rossym ${SOURCE})
     add_pch(rossym precomp.h)
     add_dependencies(rossym psdk bugcodes)
+    allow_warnings(rossym)
 endif()
index 9bc5dd0..1ce79e1 100644 (file)
@@ -68,6 +68,7 @@ set_source_files_properties(startup/crtdll.c PROPERTIES COMPILE_DEFINITIONS CRTD
 
 if(NOT MSVC)
     target_link_libraries(msvcrtex oldnames)
+    allow_warnings(msvcrtex)
 endif()
 
 add_dependencies(msvcrtex psdk asm)