Index: base/applications/atactl/CMakeLists.txt =================================================================== --- base/applications/atactl/CMakeLists.txt (Revision 58318) +++ base/applications/atactl/CMakeLists.txt (Arbeitskopie) @@ -1,4 +1,5 @@ set_cpp() +set_3rd_party_source() add_definitions(-DUSER_MODE) include_directories(${REACTOS_SOURCE_DIR}/drivers/storage/ide/uniata) @@ -9,9 +10,7 @@ add_importlibs(atactl advapi32 msvcrt kernel32 ntdll) if(NOT MSVC) - # FIXME: http://www.cmake.org/Bug/view.php?id=12998 - #allow_warnings(atactl) - set_source_files_properties(atactl.cpp PROPERTIES COMPILE_FLAGS "-Wno-error") target_link_libraries(atactl gcc) endif() -add_cd_file(TARGET atactl DESTINATION reactos/system32 FOR all) \ Kein Zeilenumbruch am Ende der Datei + +add_cd_file(TARGET atactl DESTINATION reactos/system32 FOR all) Index: base/applications/network/wlanconf/CMakeLists.txt =================================================================== --- base/applications/network/wlanconf/CMakeLists.txt (Revision 58318) +++ base/applications/network/wlanconf/CMakeLists.txt (Arbeitskopie) @@ -1,15 +1,11 @@ +set_3rd_party_source() + include_directories( BEFORE include ${REACTOS_SOURCE_DIR}/include/reactos/drivers/ndisuio) add_executable(wlanconf wlanconf.c wlanconf.rc) -# FIXME: http://www.cmake.org/Bug/view.php?id=12998 -if(NOT MSVC) - #add_target_compile_flags(wlanconf "-Wno-format") - set_source_files_properties(wlanconf.c PROPERTIES COMPILE_FLAGS "-Wno-format") -endif() - set_module_type(wlanconf win32cui) add_importlibs(wlanconf msvcrt user32 iphlpapi kernel32) add_cd_file(TARGET wlanconf DESTINATION reactos/system32 FOR all) Index: base/applications/winhlp32/CMakeLists.txt =================================================================== --- base/applications/winhlp32/CMakeLists.txt (Revision 58318) +++ base/applications/winhlp32/CMakeLists.txt (Arbeitskopie) @@ -1,4 +1,6 @@ +set_3rd_party_source() + include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) add_definitions( @@ -24,8 +26,3 @@ add_importlibs(winhlp32 user32 gdi32 shell32 comctl32 comdlg32 msvcrt kernel32 ntdll) add_cd_file(TARGET winhlp32 DESTINATION reactos FOR all) -if(NOT MSVC) - # FIXME: http://www.cmake.org/Bug/view.php?id=12998 - #allow_warnings(winhlp32) - set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-Wno-error") -endif() Index: base/applications/write/CMakeLists.txt =================================================================== --- base/applications/write/CMakeLists.txt (Revision 58318) +++ base/applications/write/CMakeLists.txt (Arbeitskopie) @@ -1,11 +1,8 @@ +set_3rd_party_source() + 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) - # FIXME: http://www.cmake.org/Bug/view.php?id=12998 - #allow_warnings(write) - set_source_files_properties(write.c PROPERTIES COMPILE_FLAGS "-Wno-error") -endif() Index: base/shell/explorer/CMakeLists.txt =================================================================== --- base/shell/explorer/CMakeLists.txt (Revision 58318) +++ base/shell/explorer/CMakeLists.txt (Arbeitskopie) @@ -54,3 +54,7 @@ add_dependencies(explorer psdk) add_cd_file(TARGET explorer DESTINATION reactos FOR all) add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/explorer-cfg-template.xml DESTINATION reactos FOR all) + +if(NOT MSVC) + add_target_compile_flags(explorer "-Wno-narrowing") +endif() Index: cmake/compilerflags.cmake =================================================================== --- cmake/compilerflags.cmake (Revision 58318) +++ cmake/compilerflags.cmake (Arbeitskopie) @@ -24,6 +24,26 @@ set_property(TARGET ${_module} PROPERTY ${_propname} ${_newvalue}) endfunction() +function(remove_target_properties _module _propname) + list(APPEND _list_properties COMPILE_DEFINITIONS INCLUDE_DIRECTORIES) + get_target_property(_newvalue ${_module} ${_propname}) + if(_newvalue) + list(FIND _list_properties ${_propname} _list_index) + if(NOT _list_index EQUAL -1) + # list property + foreach(_flag ${ARGN}) + list(REMOVE_ITEM _newvalue _flag) + endforeach() + else() + # string property + foreach(_flag ${ARGN}) + strin(REPLACE ${_flag} "" _newvalue ${_newvalue}) + endforeach() + endif() + set_property(TARGET ${_module} PROPERTY ${_propname} ${_newvalue}) + endif() +endfunction() + # Wrapper functions for the important properties, using add_target_property # where appropriate. # Note that the functions for string properties take a single string @@ -51,7 +71,7 @@ if(NOT ${ARGC} EQUAL 2) message(STATUS "Wrong arguments to add_compile_flags_language! Args ${ARGN}") endif() - # Adds the compiler flag to both CMAKE_C_FLAGS and CMAKE_CXX_FLAGS + # Adds the compiler flag to language specific flags set(CMAKE_${_lang}_FLAGS "${CMAKE_${_lang}_FLAGS} ${_flags}" PARENT_SCOPE) endfunction() @@ -76,3 +96,17 @@ function(add_target_include_directories _module) add_target_property(${_module} INCLUDE_DIRECTORIES ${ARGN}) endfunction() + +macro(remove_compile_flags) + foreach(_flag ${ARGN}) + string(REPLACE ${_flag} "" CMAKE_C_FLAGS ${CMAKE_C_FLAGS}) + string(REPLACE ${_flag} "" CMAKE_C_FLAGS_RELWITHDEBINFO ${CMAKE_C_FLAGS_RELWITHDEBINFO}) + string(REPLACE ${_flag} "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) + string(REPLACE ${_flag} "" CMAKE_ASM_FLAGS ${CMAKE_ASM_FLAGS}) + endforeach() +endmacro() + +function(remove_target_compile_flags _module) + remove_target_properties(${_module} COMPILE_FLAGS) +endfunction() + Index: cmake/config.cmake =================================================================== --- cmake/config.cmake (Revision 58318) +++ cmake/config.cmake (Arbeitskopie) @@ -21,6 +21,12 @@ 6 = Optimize yet more (-O3) 7 = Disregard strict standards compliance (-Ofast)") +set(WARNING_LEVEL "1" CACHE STRING +"What level of optimization to use. + 0 = All warnings disabled + 1 = Default option, avoiding noise by disabling overzealous warnings + 2 = Verbose - enable all warnings") + set(LTCG FALSE CACHE BOOL "Whether to build with link-time code generation") Index: cmake/gcc.cmake =================================================================== --- cmake/gcc.cmake (Revision 58318) +++ cmake/gcc.cmake (Arbeitskopie) @@ -41,7 +41,13 @@ endif() # Warnings -add_compile_flags("-Werror -Wall -Wno-char-subscripts -Wpointer-arith -Wno-multichar -Wno-unused-value") +if(WARNING_LEVEL STREQUAL "1") + add_compile_flags("-Werror -Wall -Wpointer-arith -Wno-char-subscripts -Wno-multichar -Wno-unused-value -Wno-unused-but-set-variable -Wno-maybe-uninitialized") +elseif(WARNING_LEVEL STREQUAL "2") + add_compile_flags("-Werror -Wall -Wpointer-arith") +else() # 0 + add_compile_flags("-w") +endif() if(GCC_VERSION VERSION_LESS 4.6) add_compile_flags("-Wno-error=uninitialized") @@ -358,6 +364,16 @@ add_target_compile_flags(${__module} "-Wno-error") endfunction() +macro(set_3rd_party_source) + add_compile_flags("-Wno-error") + if(WARNING_LEVEL STREQUAL "1") + add_compile_flags("-Wno-format -Wno-unused-variable -Wno-unused-function -Wno-enum-compare -Wno-write-strings -Wno-narrowing -Wno-attributes") + add_compile_flags("-Wno-overflow") + add_compile_flags_language("-Wno-implicit-function-declaration -Wno-pointer-sign" C) + add_compile_flags_language("-Wno-delete-non-virtual-dtor" CXX) + endif() +endmacro() + macro(add_asm_files _target) list(APPEND ${_target} ${ARGN}) endmacro() Index: cmake/msvc.cmake =================================================================== --- cmake/msvc.cmake (Revision 58318) +++ cmake/msvc.cmake (Arbeitskopie) @@ -20,8 +20,17 @@ add_definitions(/Dinline=__inline /D__STDC__=1) -add_compile_flags("/X /GR- /GS- /Zl /W3") +add_compile_flags("/X /GR- /GS- /Zl") +# Warnings (at some point we may want /WX) +if(WARNING_LEVEL STREQUAL "1") + add_compile_flags("/W3") +elseif(WARNING_LEVEL STREQUAL "2") + add_compile_flags("/Wall") +else() # 0 + add_compile_flags("/w") +endif() + # HACK: for VS 11+ we need to explicitly disable SSE, which is off by # default for older compilers. See bug #7174 if (MSVC_VERSION GREATER 1699 AND ARCH STREQUAL "i386") @@ -130,13 +139,13 @@ set(_def_file ${CMAKE_CURRENT_BINARY_DIR}/${_libname}_exp.def) set(_asm_stubs_file ${CMAKE_CURRENT_BINARY_DIR}/${_libname}_stubs.asm) - + # Generate the asm stub file and the def file for import library add_custom_command( OUTPUT ${_asm_stubs_file} ${_def_file} COMMAND native-spec2def --ms --kill-at -a=${SPEC2DEF_ARCH} --implib -n=${_dllname} -d=${_def_file} -l=${_asm_stubs_file} ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file} native-spec2def) - + if(MSVC_IDE) # Compile the generated asm stub file add_custom_command( @@ -240,8 +249,17 @@ endfunction() function(allow_warnings __module) + #Should remove /WX, once we set it endfunction() +macro(set_3rd_party_source) + remove_compile_flags("/WX") + if(WARNING_LEVEL STREQUAL "1") + remove_compile_flags("/Wall" "/W3") + add_compile_flags("/w") + endif() +endmacro() + macro(add_asm_files _target) if(MSVC_IDE AND (CMAKE_VERSION MATCHES "ReactOS")) get_defines(_directory_defines) Index: dll/3rdparty/libtiff/CMakeLists.txt =================================================================== --- dll/3rdparty/libtiff/CMakeLists.txt (Revision 58318) +++ dll/3rdparty/libtiff/CMakeLists.txt (Arbeitskopie) @@ -1,4 +1,6 @@ +set_3rd_party_source() + add_definitions( -DWIN32 -DNDEBUG @@ -55,7 +57,3 @@ add_importlibs(libtiff user32 msvcrt kernel32 ntdll) add_dependencies(libtiff psdk) add_cd_file(TARGET libtiff DESTINATION reactos/system32 FOR all) - -if(NOT MSVC) - allow_warnings(libtiff) -endif() Index: dll/3rdparty/libxslt/CMakeLists.txt =================================================================== --- dll/3rdparty/libxslt/CMakeLists.txt (Revision 58318) +++ dll/3rdparty/libxslt/CMakeLists.txt (Arbeitskopie) @@ -1,4 +1,6 @@ +set_3rd_party_source() + include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${REACTOS_SOURCE_DIR}/include/reactos/libs/libxslt) @@ -48,5 +50,4 @@ if(NOT MSVC) add_target_compile_flags(libxslt "-Wno-pointer-sign") - allow_warnings(libxslt) endif() Index: dll/directx/ksproxy/CMakeLists.txt =================================================================== --- dll/directx/ksproxy/CMakeLists.txt (Revision 58318) +++ dll/directx/ksproxy/CMakeLists.txt (Arbeitskopie) @@ -1,4 +1,6 @@ +set_3rd_party_source() + set_cpp() spec2def(ksproxy.ax ksproxy.spec) @@ -33,9 +35,7 @@ if(MSVC) add_target_compile_flags(ksproxy "/GR-") else() - # FIXME: http://www.cmake.org/Bug/view.php?id=12998 - #add_target_compile_flags(ksproxy "-fno-exceptions -fno-rtti") - set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-fno-exceptions -fno-rtti") + add_target_compile_flags(ksproxy "-fno-exceptions -fno-rtti") endif() target_link_libraries(ksproxy strmiids) Index: dll/directx/quartz/CMakeLists.txt =================================================================== --- dll/directx/quartz/CMakeLists.txt (Revision 58318) +++ dll/directx/quartz/CMakeLists.txt (Arbeitskopie) @@ -1,4 +1,6 @@ +set_3rd_party_source() + remove_definitions(-D_WIN32_WINNT=0x502) add_definitions(-D_WIN32_WINNT=0x600) @@ -74,8 +76,3 @@ add_pch(quartz quartz_private.h) add_cd_file(TARGET quartz DESTINATION reactos/system32 FOR all) -if(NOT MSVC) - # FIXME: http://www.cmake.org/Bug/view.php?id=12998 - #allow_warnings(quartz) - set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-Wno-error") -endif() Index: dll/directx/wine/ddraw/CMakeLists.txt =================================================================== --- dll/directx/wine/ddraw/CMakeLists.txt (Revision 58318) +++ dll/directx/wine/ddraw/CMakeLists.txt (Arbeitskopie) @@ -1,4 +1,6 @@ +set_3rd_party_source() + add_definitions( -D__WINESRC__ -DUSE_WIN32_OPENGL) Index: dll/directx/wine/wined3d/CMakeLists.txt =================================================================== --- dll/directx/wine/wined3d/CMakeLists.txt (Revision 58318) +++ dll/directx/wine/wined3d/CMakeLists.txt (Arbeitskopie) @@ -1,4 +1,6 @@ +set_3rd_party_source() + add_definitions( -D__WINESRC__ -D_USE_MATH_DEFINES @@ -57,8 +59,3 @@ add_pch(wined3d wined3d_private.h) add_cd_file(TARGET wined3d DESTINATION reactos/system32 FOR all) -if(NOT MSVC) - # FIXME: http://www.cmake.org/Bug/view.php?id=12998 - #allow_warnings(wined3d) - set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-Wno-error") -endif() Index: dll/opengl/glu32/CMakeLists.txt =================================================================== --- dll/opengl/glu32/CMakeLists.txt (Revision 58318) +++ dll/opengl/glu32/CMakeLists.txt (Arbeitskopie) @@ -1,4 +1,6 @@ +set_3rd_party_source() + include_directories(BEFORE include src/include @@ -119,7 +121,6 @@ if(NOT MSVC) #FIXME: we really need a standard C++ library target_link_libraries(glu32 -lsupc++ -lgcc) - add_compile_flags("-Wno-error=write-strings") endif() add_importlibs(glu32 Index: dll/opengl/mesa/src/gallium/auxiliary/CMakeLists.txt =================================================================== --- dll/opengl/mesa/src/gallium/auxiliary/CMakeLists.txt (Revision 58318) +++ dll/opengl/mesa/src/gallium/auxiliary/CMakeLists.txt (Arbeitskopie) @@ -1,4 +1,6 @@ +set_3rd_party_source() + include_directories( indices util) @@ -161,4 +163,4 @@ vl/vl_vertex_buffers.c vl/vl_video_buffer.c) -add_library(gallium_core STATIC EXCLUDE_FROM_ALL ${SOURCE}) \ Kein Zeilenumbruch am Ende der Datei +add_library(gallium_core STATIC EXCLUDE_FROM_ALL ${SOURCE}) Index: dll/opengl/mesa/src/gallium/state_trackers/wgl/CMakeLists.txt =================================================================== --- dll/opengl/mesa/src/gallium/state_trackers/wgl/CMakeLists.txt (Revision 58318) +++ dll/opengl/mesa/src/gallium/state_trackers/wgl/CMakeLists.txt (Arbeitskopie) @@ -1,13 +1,12 @@ +set_3rd_party_source() + add_definitions( -D_GDI32_ # prevent gl* being declared __declspec(dllimport) in MS headers -DBUILD_GL32 # declare gl* as __declspec(dllexport) in Mesa headers -D_GLAPI_NO_EXPORTS # prevent _glapi_* from being declared __declspec(dllimport) -DWIN32_LEAN_AND_MEAN ) -if(NOT MSVC) - add_compile_flags("-Wno-implicit-function-declaration") -endif() include_directories( ../../../mapi @@ -31,4 +30,4 @@ stw_wgl.c ) -add_library(gallium_wgl STATIC EXCLUDE_FROM_ALL ${SOURCE}) \ Kein Zeilenumbruch am Ende der Datei +add_library(gallium_wgl STATIC EXCLUDE_FROM_ALL ${SOURCE}) Index: dll/opengl/mesa/src/gallium/targets/libgl-gdi/CMakeLists.txt =================================================================== --- dll/opengl/mesa/src/gallium/targets/libgl-gdi/CMakeLists.txt (Revision 58318) +++ dll/opengl/mesa/src/gallium/targets/libgl-gdi/CMakeLists.txt (Arbeitskopie) @@ -1,4 +1,6 @@ +set_3rd_party_source() + # we link against C++ static libs set_cpp() @@ -42,4 +44,3 @@ add_dependencies(mesa32 psdk) add_cd_file(TARGET mesa32 DESTINATION reactos/system32 FOR all) - \ Kein Zeilenumbruch am Ende der Datei Index: dll/opengl/mesa/src/glsl/CMakeLists.txt =================================================================== --- dll/opengl/mesa/src/glsl/CMakeLists.txt (Revision 58318) +++ dll/opengl/mesa/src/glsl/CMakeLists.txt (Arbeitskopie) @@ -1,4 +1,5 @@ +set_3rd_party_source() set_cpp() # From Sconscript @@ -86,5 +87,4 @@ #this is just a helper library, don't include it in the all target add_library(mesa_glsl STATIC EXCLUDE_FROM_ALL ${SOURCE}) - - \ Kein Zeilenumbruch am Ende der Datei + Index: dll/opengl/mesa/src/mapi/glapi/CMakeLists.txt =================================================================== --- dll/opengl/mesa/src/mapi/glapi/CMakeLists.txt (Revision 58318) +++ dll/opengl/mesa/src/mapi/glapi/CMakeLists.txt (Arbeitskopie) @@ -1,4 +1,6 @@ +set_3rd_party_source() + add_definitions( -DMAPI_MODE_UTIL -D_GDI32_ # prevent gl* being declared __declspec(dllimport) in MS headers @@ -29,8 +31,4 @@ ../mapi/u_execmem.c ../mapi/u_thread.c) -if(NOT MSVC) - add_compile_flags("-Wno-unused-function") -endif() - -add_library(mesa_glapi STATIC EXCLUDE_FROM_ALL ${SOURCE}) \ Kein Zeilenumbruch am Ende der Datei +add_library(mesa_glapi STATIC EXCLUDE_FROM_ALL ${SOURCE}) Index: dll/opengl/mesa/src/mesa/CMakeLists.txt =================================================================== --- dll/opengl/mesa/src/mesa/CMakeLists.txt (Revision 58318) +++ dll/opengl/mesa/src/mesa/CMakeLists.txt (Arbeitskopie) @@ -1,4 +1,6 @@ +set_3rd_party_source() + add_definitions( -DFEATURE_GL=1 -D_GDI32_ # prevent gl* being declared __declspec(dllimport) in MS headers @@ -295,9 +297,5 @@ # drivers/common/driverfuncs.c # drivers/common/meta.c ) - -if(NOT MSVC) - add_compile_flags("-Wno-format") -endif() -add_library(mesa_core STATIC EXCLUDE_FROM_ALL ${SOURCE}) \ Kein Zeilenumbruch am Ende der Datei +add_library(mesa_core STATIC EXCLUDE_FROM_ALL ${SOURCE}) Index: dll/win32/aclui/CMakeLists.txt =================================================================== --- dll/win32/aclui/CMakeLists.txt (Revision 58318) +++ dll/win32/aclui/CMakeLists.txt (Arbeitskopie) @@ -1,4 +1,6 @@ +set_3rd_party_source() + spec2def(aclui.dll aclui.spec) add_definitions(-DSUPPORT_UXTHEME) @@ -13,12 +15,6 @@ add_library(aclui SHARED ${SOURCE} aclui.rc) -if(NOT MSVC) - # FIXME: http://www.cmake.org/Bug/view.php?id=12998 - #allow_warnings(aclui) - set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-Wno-error") -endif() - set_module_type(aclui win32dll UNICODE) add_importlibs(aclui user32 gdi32 comctl32 ole32 oleaut32 advapi32 uxtheme msvcrt kernel32 ntdll) add_pch(aclui precomp.h) Index: dll/win32/advpack/CMakeLists.txt =================================================================== --- dll/win32/advpack/CMakeLists.txt (Revision 58318) +++ dll/win32/advpack/CMakeLists.txt (Arbeitskopie) @@ -1,4 +1,6 @@ +set_3rd_party_source() + add_definitions(-D__WINESRC__) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) @@ -13,7 +15,6 @@ ${CMAKE_CURRENT_BINARY_DIR}/advpack.def) add_library(advpack SHARED ${SOURCE}) -allow_warnings(advpack) set_module_type(advpack win32dll) target_link_libraries(advpack wine) add_importlibs(advpack ole32 setupapi version advapi32 msvcrt kernel32 ntdll) Index: dll/win32/browseui/CMakeLists.txt =================================================================== --- dll/win32/browseui/CMakeLists.txt (Revision 58318) +++ dll/win32/browseui/CMakeLists.txt (Arbeitskopie) @@ -1,4 +1,6 @@ +set_3rd_party_source() + set_cpp() add_definitions( @@ -43,12 +45,6 @@ ${SOURCE} browseui.rc) -if(NOT MSVC) - # FIXME: http://www.cmake.org/Bug/view.php?id=12998 - #allow_warnings(browseui) - set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-Wno-error") -endif() - set_module_type(browseui win32dll UNICODE) target_link_libraries(browseui Index: dll/win32/crypt32/CMakeLists.txt =================================================================== --- dll/win32/crypt32/CMakeLists.txt (Revision 58318) +++ dll/win32/crypt32/CMakeLists.txt (Arbeitskopie) @@ -1,4 +1,6 @@ +set_3rd_party_source() + add_definitions( -D__WINESRC__ -D_WINE) @@ -39,12 +41,6 @@ add_library(crypt32 SHARED ${SOURCE} crypt32.rc) -if(NOT MSVC) - # FIXME: http://www.cmake.org/Bug/view.php?id=12998 - #allow_warnings(crypt32) - set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-Wno-error") -endif() - set_module_type(crypt32 win32dll) target_link_libraries(crypt32 wine ${PSEH_LIB} oldnames) add_importlibs(crypt32 user32 advapi32 msvcrt kernel32 ntdll) Index: dll/win32/dbghelp/CMakeLists.txt =================================================================== --- dll/win32/dbghelp/CMakeLists.txt (Revision 58318) +++ dll/win32/dbghelp/CMakeLists.txt (Arbeitskopie) @@ -1,4 +1,6 @@ +set_3rd_party_source() + add_definitions( -D__WINESRC__ -D_WINE @@ -44,12 +46,6 @@ add_library(dbghelp SHARED ${SOURCE} version.rc) -if(NOT MSVC) - # FIXME: http://www.cmake.org/Bug/view.php?id=12998 - #allow_warnings(dbghelp) - set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-Wno-error") -endif() - set_module_type(dbghelp win32dll) target_link_libraries(dbghelp wine ${PSEH_LIB} oldnames) add_delay_importlibs(dbghelp version) Index: dll/win32/itss/CMakeLists.txt =================================================================== --- dll/win32/itss/CMakeLists.txt (Revision 58318) +++ dll/win32/itss/CMakeLists.txt (Arbeitskopie) @@ -1,4 +1,6 @@ +set_3rd_party_source() + add_definitions(-D__WINESRC__) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) @@ -22,12 +24,6 @@ set_module_type(itss win32dll) target_link_libraries(itss uuid wine) -if(NOT MSVC) - # FIXME: http://www.cmake.org/Bug/view.php?id=12998 - #allow_warnings(itss) - set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-Wno-error") -endif() - add_importlibs(itss urlmon shlwapi Index: dll/win32/localspl/CMakeLists.txt =================================================================== --- dll/win32/localspl/CMakeLists.txt (Revision 58318) +++ dll/win32/localspl/CMakeLists.txt (Arbeitskopie) @@ -1,4 +1,6 @@ +set_3rd_party_source() + remove_definitions(-D_WIN32_WINNT=0x502) add_definitions(-D_WIN32_WINNT=0x600) @@ -26,9 +28,3 @@ ntdll) add_cd_file(TARGET localspl DESTINATION reactos/system32 FOR all) - -if(NOT MSVC) - # FIXME: http://www.cmake.org/Bug/view.php?id=12998 - #allow_warnings(localspl) - set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-Wno-error") -endif() Index: dll/win32/mciseq/CMakeLists.txt =================================================================== --- dll/win32/mciseq/CMakeLists.txt (Revision 58318) +++ dll/win32/mciseq/CMakeLists.txt (Arbeitskopie) @@ -1,4 +1,6 @@ +set_3rd_party_source() + add_definitions(-D__WINESRC__) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) @@ -16,7 +18,3 @@ 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: dll/win32/mciwave/CMakeLists.txt =================================================================== --- dll/win32/mciwave/CMakeLists.txt (Revision 58318) +++ dll/win32/mciwave/CMakeLists.txt (Arbeitskopie) @@ -1,4 +1,6 @@ +set_3rd_party_source() + add_definitions( -D__WINESRC__ -D_WINE) @@ -20,6 +22,3 @@ add_dependencies(mciwave psdk) add_cd_file(TARGET mciwave DESTINATION reactos/system32 FOR all) -if(NOT MSVC) - allow_warnings(mciwave) -endif() Index: dll/win32/msxml3/CMakeLists.txt =================================================================== --- dll/win32/msxml3/CMakeLists.txt (Revision 58318) +++ dll/win32/msxml3/CMakeLists.txt (Arbeitskopie) @@ -1,4 +1,6 @@ +set_3rd_party_source() + remove_definitions(-D_WIN32_WINNT=0x502) add_definitions(-D_WIN32_WINNT=0x601) @@ -58,12 +60,6 @@ add_library(msxml3 SHARED ${SOURCE} version.rc) -if(NOT MSVC) - # FIXME: http://www.cmake.org/Bug/view.php?id=12998 - #allow_warnings(msxml3) - set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-Wno-error") -endif() - add_idl_headers(xmlparser_idlheader xmlparser.idl) add_dependencies(msxml3 xmlparser_idlheader) Index: dll/win32/rpcrt4/CMakeLists.txt =================================================================== --- dll/win32/rpcrt4/CMakeLists.txt (Revision 58318) +++ dll/win32/rpcrt4/CMakeLists.txt (Arbeitskopie) @@ -1,4 +1,6 @@ +set_3rd_party_source() + spec2def(rpcrt4.dll rpcrt4.spec ADD_IMPORTLIB) add_rpc_files(client epm.idl) @@ -53,10 +55,3 @@ 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) - - -if(NOT MSVC) - # FIXME: http://www.cmake.org/Bug/view.php?id=12998 - #allow_warnings(rpcrt4) - set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-Wno-error") -endif() Index: dll/win32/shdocvw/CMakeLists.txt =================================================================== --- dll/win32/shdocvw/CMakeLists.txt (Revision 58318) +++ dll/win32/shdocvw/CMakeLists.txt (Arbeitskopie) @@ -1,4 +1,6 @@ +set_3rd_party_source() + add_typelib(shdocvw_v1.idl) add_definitions( @@ -57,9 +59,3 @@ add_pch(shdocvw shdocvw.h) add_cd_file(TARGET shdocvw DESTINATION reactos/system32 FOR all) - -if(NOT MSVC) - # FIXME: http://www.cmake.org/Bug/view.php?id=12998 - #allow_warnings(shdocvw) - set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-Wno-error") -endif() Index: dll/win32/shell32/CMakeLists.txt =================================================================== --- dll/win32/shell32/CMakeLists.txt (Revision 58318) +++ dll/win32/shell32/CMakeLists.txt (Arbeitskopie) @@ -76,12 +76,6 @@ ${SOURCE} shell32.rc) -if(NOT MSVC) - # FIXME: http://www.cmake.org/Bug/view.php?id=12998 - #allow_warnings(shell32) - set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-Wno-error") -endif() - set_module_type(shell32 win32dll UNICODE) target_link_libraries(shell32 Index: dll/win32/spoolss/CMakeLists.txt =================================================================== --- dll/win32/spoolss/CMakeLists.txt (Revision 58318) +++ dll/win32/spoolss/CMakeLists.txt (Arbeitskopie) @@ -1,4 +1,6 @@ +set_3rd_party_source() + include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) add_definitions(-D__WINESRC__) @@ -11,7 +13,6 @@ ${CMAKE_CURRENT_BINARY_DIR}/spoolss.def) add_library(spoolss SHARED ${SOURCE}) -allow_warnings(spoolss) set_module_type(spoolss win32dll) target_link_libraries(spoolss wine) add_importlibs(spoolss winspool msvcrt kernel32 ntdll) Index: dll/win32/windowscodecs/CMakeLists.txt =================================================================== --- dll/win32/windowscodecs/CMakeLists.txt (Revision 58318) +++ dll/win32/windowscodecs/CMakeLists.txt (Arbeitskopie) @@ -1,4 +1,6 @@ +set_3rd_party_source() + add_definitions( -D__WINESRC__ -DENTRY_PREFIX=WIC_ @@ -54,12 +56,6 @@ ${CMAKE_CURRENT_BINARY_DIR}/windowscodecs.def ${CMAKE_CURRENT_BINARY_DIR}/windowscodecs_wincodec_p.c) -if(NOT MSVC) - # FIXME: http://www.cmake.org/Bug/view.php?id=12998 - #allow_warnings(windowscodecs) - set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-Wno-error") -endif() - add_library(windowscodecs SHARED ${SOURCE} version.rc) set_module_type(windowscodecs win32dll) target_link_libraries(windowscodecs wine uuid ${PSEH_LIB}) Index: dll/win32/winmm/CMakeLists.txt =================================================================== --- dll/win32/winmm/CMakeLists.txt (Revision 58318) +++ dll/win32/winmm/CMakeLists.txt (Arbeitskopie) @@ -1,4 +1,6 @@ +set_3rd_party_source() + add_definitions(-D_WINE) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) @@ -21,12 +23,6 @@ ${SOURCE} winmm_res.rc) -if(NOT MSVC) - # FIXME: http://www.cmake.org/Bug/view.php?id=12998 - #allow_warnings(winmm) - set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-Wno-error") -endif() - set_module_type(winmm win32dll) target_link_libraries(winmm wine ${PSEH_LIB}) add_importlibs(winmm advapi32 user32 msvcrt kernel32 ntdll) Index: dll/win32/xmllite/CMakeLists.txt =================================================================== --- dll/win32/xmllite/CMakeLists.txt (Revision 58318) +++ dll/win32/xmllite/CMakeLists.txt (Arbeitskopie) @@ -1,4 +1,6 @@ +set_3rd_party_source() + add_definitions(-D__WINESRC__) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) @@ -12,12 +14,6 @@ ${CMAKE_CURRENT_BINARY_DIR}/xmllite_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/xmllite.def) -if(NOT MSVC) - # FIXME: http://www.cmake.org/Bug/view.php?id=12998 - #allow_warnings(xmllite) - set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-Wno-error") -endif() - add_library(xmllite SHARED ${SOURCE}) set_module_type(xmllite win32dll) target_link_libraries(xmllite wine uuid) Index: drivers/bluetooth/fbtusb/CMakeLists.txt =================================================================== --- drivers/bluetooth/fbtusb/CMakeLists.txt (Revision 58318) +++ drivers/bluetooth/fbtusb/CMakeLists.txt (Arbeitskopie) @@ -1,4 +1,6 @@ +set_3rd_party_source() + include_directories(include) list(APPEND SOURCE @@ -13,12 +15,6 @@ ${SOURCE} fbtusb.rc) -# FIXME: http://www.cmake.org/Bug/view.php?id=12998 -if(NOT MSVC) - #allow_warnings(fbtusb) - set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-Wno-error") -endif() - set_module_type(fbtusb kernelmodedriver) add_importlibs(fbtusb ntoskrnl hal usbd) add_cd_file(TARGET fbtusb DESTINATION reactos/system32/drivers FOR all) Index: drivers/filesystems/ext2/CMakeLists.txt =================================================================== --- drivers/filesystems/ext2/CMakeLists.txt (Revision 58318) +++ drivers/filesystems/ext2/CMakeLists.txt (Arbeitskopie) @@ -1,4 +1,6 @@ +set_3rd_party_source() + include_directories(inc) list(APPEND SOURCE @@ -22,7 +24,6 @@ src/shutdown.c) add_library(ext2fs SHARED ${SOURCE}) -allow_warnings(ext2fs) target_link_libraries(ext2fs ${PSEH_LIB}) add_pch(ext2fs inc/ext2fsd.h) set_module_type(ext2fs kernelmodedriver) Index: drivers/storage/ide/uniata/CMakeLists.txt =================================================================== --- drivers/storage/ide/uniata/CMakeLists.txt (Revision 58318) +++ drivers/storage/ide/uniata/CMakeLists.txt (Arbeitskopie) @@ -1,4 +1,6 @@ +set_3rd_party_source() + include_directories( BEFORE ${CMAKE_CURRENT_SOURCE_DIR} inc) @@ -24,9 +26,8 @@ #add_target_compile_flags(uniata "/GR-") set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "/GR-") else() - #allow_warnings(uniata) #add_target_compile_flags(uniata "-fno-exceptions -fno-rtti") - set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-fno-exceptions -fno-rtti -Wno-error") + set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-fno-exceptions -fno-rtti") endif() add_pch(uniata stdafx.h) Index: lib/3rdparty/adns/CMakeLists.txt =================================================================== --- lib/3rdparty/adns/CMakeLists.txt (Revision 58318) +++ lib/3rdparty/adns/CMakeLists.txt (Arbeitskopie) @@ -1,4 +1,6 @@ +set_3rd_party_source() + include_directories( src adns_win32) @@ -22,4 +24,3 @@ add_library(adns ${SOURCE}) add_dependencies(adns psdk) -allow_warnings(adns) Index: lib/3rdparty/cardlib/CMakeLists.txt =================================================================== --- lib/3rdparty/cardlib/CMakeLists.txt (Revision 58318) +++ lib/3rdparty/cardlib/CMakeLists.txt (Arbeitskopie) @@ -1,4 +1,5 @@ +set_3rd_party_source() set_cpp() list(APPEND SOURCE @@ -15,5 +16,4 @@ dropzone.cpp) add_library(cardlib ${SOURCE}) -allow_warnings(cardlib) add_dependencies(cardlib psdk) Index: lib/3rdparty/freetype/CMakeLists.txt =================================================================== --- lib/3rdparty/freetype/CMakeLists.txt (Revision 58318) +++ lib/3rdparty/freetype/CMakeLists.txt (Arbeitskopie) @@ -1,4 +1,6 @@ +set_3rd_party_source() + add_definitions( -D__NTDRIVER__ -DFT2_BUILD_LIBRARY) @@ -49,4 +51,3 @@ src/winfonts/winfnt.c) add_library(freetype ${SOURCE}) -allow_warnings(freetype) Index: lib/3rdparty/fullfat/CMakeLists.txt =================================================================== --- lib/3rdparty/fullfat/CMakeLists.txt (Revision 58318) +++ lib/3rdparty/fullfat/CMakeLists.txt (Arbeitskopie) @@ -1,4 +1,6 @@ +set_3rd_party_source() + include_directories(${REACTOS_SOURCE_DIR}/include/reactos/libs/fullfat) add_definitions(-D__NTDRIVER__) @@ -18,5 +20,4 @@ ff_time.c) add_library(fullfat ${SOURCE}) -allow_warnings(fullfat) add_dependencies(fullfat bugcodes) Index: lib/3rdparty/libmpg123/CMakeLists.txt =================================================================== --- lib/3rdparty/libmpg123/CMakeLists.txt (Revision 58318) +++ lib/3rdparty/libmpg123/CMakeLists.txt (Arbeitskopie) @@ -1,4 +1,6 @@ +set_3rd_party_source() + add_definitions( -DOPT_I386 -DREAL_IS_FLOAT @@ -41,4 +43,3 @@ tabinit.c) add_dependencies(libmpg123 psdk) -allow_warnings(libmpg123) Index: lib/3rdparty/libxml2/CMakeLists.txt =================================================================== --- lib/3rdparty/libxml2/CMakeLists.txt (Revision 58318) +++ lib/3rdparty/libxml2/CMakeLists.txt (Arbeitskopie) @@ -1,4 +1,6 @@ +set_3rd_party_source() + include_directories(include) add_definitions( @@ -60,8 +62,3 @@ add_library(libxml2 ${SOURCE}) target_link_libraries(libxml2 oldnames) add_dependencies(libxml2 psdk) - -if(NOT MSVC) - add_target_compile_flags(libxml2 "-Wno-format -Wno-pointer-sign") - allow_warnings(libxml2) -endif() Index: lib/drivers/lwip/CMakeLists.txt =================================================================== --- lib/drivers/lwip/CMakeLists.txt (Revision 58318) +++ lib/drivers/lwip/CMakeLists.txt (Arbeitskopie) @@ -1,3 +1,6 @@ + +set_3rd_party_source() + include_directories( BEFORE include ${REACTOS_SOURCE_DIR}/drivers/network/tcpip/include @@ -58,6 +61,3 @@ add_library(lwip ${SOURCE}) add_dependencies(lwip bugcodes) -if(NOT MSVC) - allow_warnings(lwip) -endif() Index: lib/fslib/ext2lib/CMakeLists.txt =================================================================== --- lib/fslib/ext2lib/CMakeLists.txt (Revision 58318) +++ lib/fslib/ext2lib/CMakeLists.txt (Arbeitskopie) @@ -1,4 +1,6 @@ +set_3rd_party_source() + list(APPEND SOURCE Badblock.c Bitmap.c @@ -12,4 +14,3 @@ add_library(ext2lib ${SOURCE}) add_pch(ext2lib Mke2fs.h) add_dependencies(ext2lib psdk) -allow_warnings(ext2lib) Index: lib/pseh/CMakeLists.txt =================================================================== --- lib/pseh/CMakeLists.txt (Revision 58318) +++ lib/pseh/CMakeLists.txt (Arbeitskopie) @@ -18,7 +18,6 @@ endif() add_library(pseh ${SOURCE}) - allow_warnings(pseh) target_link_libraries(pseh chkstk) add_dependencies(pseh psdk) Index: lib/rossym_new/CMakeLists.txt =================================================================== --- lib/rossym_new/CMakeLists.txt (Revision 58318) +++ lib/rossym_new/CMakeLists.txt (Arbeitskopie) @@ -22,5 +22,4 @@ add_library(rossym ${SOURCE}) add_pch(rossym precomp.h) add_dependencies(rossym psdk bugcodes) - allow_warnings(rossym) endif() Index: lib/sdk/crt/msvcrtex.cmake =================================================================== --- lib/sdk/crt/msvcrtex.cmake (Revision 58318) +++ lib/sdk/crt/msvcrtex.cmake (Arbeitskopie) @@ -83,7 +83,6 @@ if(NOT MSVC) target_link_libraries(msvcrtex oldnames) - allow_warnings(msvcrtex) endif() add_dependencies(msvcrtex psdk asm) Index: win32ss/drivers/miniport/vga_new/CMakeLists.txt =================================================================== --- win32ss/drivers/miniport/vga_new/CMakeLists.txt (Revision 58318) +++ win32ss/drivers/miniport/vga_new/CMakeLists.txt (Arbeitskopie) @@ -12,12 +12,6 @@ target_link_libraries(vga libcntpr) -# FIXME: http://www.cmake.org/Bug/view.php?id=12998 -if(NOT MSVC) - #allow_warnings(vga) - set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-Wno-error") -endif() - set_module_type(vga kernelmodedriver) add_importlibs(vga videoprt)