Commit 0179aad6 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

Windows, compiling : Reenable /MP for connect engine.

Remove this flag only from domdoc.cpp, which uses #import directive.
parent 460de628
...@@ -127,10 +127,6 @@ ENDIF(CONNECT_WITH_LIBXML2) ...@@ -127,10 +127,6 @@ ENDIF(CONNECT_WITH_LIBXML2)
IF(WIN32) IF(WIN32)
# /MP option of the Microsoft compiler does not work well with COM #import
string(REPLACE "/MP" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
string(REPLACE "/MP" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
OPTION(CONNECT_WITH_MSXML "Compile CONNECT storage engine with MSXML support" ON) OPTION(CONNECT_WITH_MSXML "Compile CONNECT storage engine with MSXML support" ON)
IF(CONNECT_WITH_MSXML) IF(CONNECT_WITH_MSXML)
add_definitions(-DMSX6 -DDOMDOC_SUPPORT) add_definitions(-DMSX6 -DDOMDOC_SUPPORT)
...@@ -337,6 +333,20 @@ IF(NOT TARGET connect) ...@@ -337,6 +333,20 @@ IF(NOT TARGET connect)
RETURN() RETURN()
ENDIF() ENDIF()
IF(MSVC AND (CMAKE_CXX_FLAGS MATCHES "/MP"))
# domdoc.cpp uses compiler directive #import which is not compatible
# with the /MP option, resulting in compiler error C2813.
# Remove /MP for this file.
SET(src_list ${CONNECT_SOURCES})
LIST(FIND src_list domdoc.cpp idx)
IF(idx GREATER -1)
STRING(REPLACE "/MP" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
LIST(REMOVE_AT src_list ${idx})
SET_SOURCE_FILES_PROPERTIES(${src_list} PROPERTIES COMPILE_FLAGS "/MP")
ENDIF()
ENDIF()
# Don't link with bundled zlib and systel libxml2 at the same time. # Don't link with bundled zlib and systel libxml2 at the same time.
# System libxml2 uses system zlib, might conflict with the bundled one. # System libxml2 uses system zlib, might conflict with the bundled one.
IF (XML_LIBRARY AND BUILD_BUNDLED_ZLIB) IF (XML_LIBRARY AND BUILD_BUNDLED_ZLIB)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment