Author: tfaber
Date: Sat Feb 7 23:54:15 2015
New Revision: 66200
URL:
http://svn.reactos.org/svn/reactos?rev=66200&view=rev
Log:
[CMAKE]
- Support NO_PRIVATE_WARNINGS parameter when invoking spec2def to suppress warnings about
symbols that should be private
- Disable such warnings for msxml3, ole32 and rsaenh
CORE-8445
Modified:
trunk/reactos/cmake/gcc.cmake
trunk/reactos/cmake/msvc.cmake
trunk/reactos/dll/win32/msxml3/CMakeLists.txt
trunk/reactos/dll/win32/ole32/CMakeLists.txt
trunk/reactos/dll/win32/rsaenh/CMakeLists.txt
Modified: trunk/reactos/cmake/gcc.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/gcc.cmake?rev=66200&…
==============================================================================
--- trunk/reactos/cmake/gcc.cmake [iso-8859-1] (original)
+++ trunk/reactos/cmake/gcc.cmake [iso-8859-1] Sat Feb 7 23:54:15 2015
@@ -310,7 +310,7 @@
# Generate the def for the import lib
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_libname}_implib.def
- COMMAND native-spec2def -n=${_dllname} -a=${ARCH2} --implib
-d=${CMAKE_CURRENT_BINARY_DIR}/${_libname}_implib.def
${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file}
+ COMMAND native-spec2def -n=${_dllname} -a=${ARCH2} ${ARGN} --implib
-d=${CMAKE_CURRENT_BINARY_DIR}/${_libname}_implib.def
${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file} native-spec2def)
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${_libname}_implib.def
PROPERTIES EXTERNAL_OBJECT TRUE)
@@ -328,7 +328,7 @@
set(CMAKE_IMPLIB_DELAYED_CREATE_STATIC_LIBRARY "${CMAKE_DLLTOOL} --def
<OBJECTS> --kill-at --output-delaylib=<TARGET>")
function(spec2def _dllname _spec_file)
- cmake_parse_arguments(__spec2def "ADD_IMPORTLIB;WITH_RELAY" ""
"" ${ARGN})
+ cmake_parse_arguments(__spec2def
"ADD_IMPORTLIB;NO_PRIVATE_WARNINGS;WITH_RELAY" "" ""
${ARGN})
# Get library basename
get_filename_component(_file ${_dllname} NAME_WE)
@@ -349,7 +349,12 @@
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file} native-spec2def)
if(__spec2def_ADD_IMPORTLIB)
- generate_import_lib(lib${_file} ${_dllname} ${_spec_file})
+ set(_extraflags)
+ if(__spec2def_NO_PRIVATE_WARNINGS)
+ set(_extraflags --no-private-warnings)
+ endif()
+
+ generate_import_lib(lib${_file} ${_dllname} ${_spec_file} ${_extraflags})
endif()
endfunction()
Modified: trunk/reactos/cmake/msvc.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/msvc.cmake?rev=66200…
==============================================================================
--- trunk/reactos/cmake/msvc.cmake [iso-8859-1] (original)
+++ trunk/reactos/cmake/msvc.cmake [iso-8859-1] Sat Feb 7 23:54:15 2015
@@ -315,14 +315,8 @@
set(SPEC2DEF_ARCH i386)
endif()
function(spec2def _dllname _spec_file)
- # Do we also want to add importlib targets?
- if(${ARGC} GREATER 2)
- if(${ARGN} STREQUAL "ADD_IMPORTLIB")
- set(__add_importlib TRUE)
- else()
- message(FATAL_ERROR "Wrong argument passed to spec2def, ${ARGN}")
- endif()
- endif()
+
+ cmake_parse_arguments(__spec2def "ADD_IMPORTLIB;NO_PRIVATE_WARNINGS"
"" "" ${ARGN})
# Get library basename
get_filename_component(_file ${_dllname} NAME_WE)
@@ -338,7 +332,10 @@
COMMAND native-spec2def --ms -a=${SPEC2DEF_ARCH} -n=${_dllname}
-d=${CMAKE_CURRENT_BINARY_DIR}/${_file}.def
-s=${CMAKE_CURRENT_BINARY_DIR}/${_file}_stubs.c ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file} native-spec2def)
- if(__add_importlib)
+ if(__spec2def_ADD_IMPORTLIB)
+ # TODO: NO_PRIVATE_WARNINGS should add /IGNORE:4104 to the link command
+ # line. However that should be on all command lines outside of
+ # generate_import_lib in the first place.
generate_import_lib(lib${_file} ${_dllname} ${_spec_file})
endif()
endfunction()
Modified: trunk/reactos/dll/win32/msxml3/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/CMakeList…
==============================================================================
--- trunk/reactos/dll/win32/msxml3/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msxml3/CMakeLists.txt [iso-8859-1] Sat Feb 7 23:54:15 2015
@@ -13,7 +13,7 @@
${REACTOS_SOURCE_DIR}/include/reactos/wine
${REACTOS_SOURCE_DIR}/lib/3rdparty/libwin-iconv)
-spec2def(msxml3.dll msxml3.spec ADD_IMPORTLIB)
+spec2def(msxml3.dll msxml3.spec ADD_IMPORTLIB NO_PRIVATE_WARNINGS)
add_typelib(msxml3_v1.idl)
list(APPEND SOURCE
Modified: trunk/reactos/dll/win32/ole32/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/CMakeLists…
==============================================================================
--- trunk/reactos/dll/win32/ole32/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/ole32/CMakeLists.txt [iso-8859-1] Sat Feb 7 23:54:15 2015
@@ -11,7 +11,7 @@
-DWINE_REGISTER_DLL)
include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
-spec2def(ole32.dll ole32.spec ADD_IMPORTLIB)
+spec2def(ole32.dll ole32.spec ADD_IMPORTLIB NO_PRIVATE_WARNINGS)
generate_idl_iids(dcom.idl)
add_idl_headers(ole32idl dcom.idl irot.idl)
add_rpc_files(client irot.idl)
Modified: trunk/reactos/dll/win32/rsaenh/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/rsaenh/CMakeList…
==============================================================================
--- trunk/reactos/dll/win32/rsaenh/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/rsaenh/CMakeLists.txt [iso-8859-1] Sat Feb 7 23:54:15 2015
@@ -1,7 +1,7 @@
add_definitions(-D__WINESRC__)
include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
-spec2def(rsaenh.dll rsaenh.spec ADD_IMPORTLIB)
+spec2def(rsaenh.dll rsaenh.spec ADD_IMPORTLIB NO_PRIVATE_WARNINGS)
list(APPEND SOURCE
aes.c