Commit 5cf1bf71 authored by Ghislain MARY's avatar Ghislain MARY

Enable parallel build on Windows.

parent 7eb7278a
......@@ -330,28 +330,34 @@ macro(linphone_builder_apply_flags)
if(LINPHONE_BUILDER_CPPFLAGS)
set(CMAKE_C_FLAGS_${BUILD_TYPE} "${CMAKE_C_FLAGS_${BUILD_TYPE}} ${LINPHONE_BUILDER_CPPFLAGS}")
set(CMAKE_CXX_FLAGS_${BUILD_TYPE} "${CMAKE_CXX_FLAGS_${BUILD_TYPE}} ${LINPHONE_BUILDER_CPPFLAGS}")
set(AUTOTOOLS_C_FLAGS "${AUTOTOOLS_C_FLAGS} ${LINPHONE_BUILDER_CPPFLAGS}")
set(AUTOTOOLS_CXX_FLAGS "${AUTOTOOLS_CXX_FLAGS} ${LINPHONE_BUILDER_CPPFLAGS}")
set(AUTOTOOLS_C_FLAGS "${AUTOTOOLS_C_FLAGS} ${LINPHONE_BUILDER_CPPFLAGS} ")
set(AUTOTOOLS_CXX_FLAGS "${AUTOTOOLS_CXX_FLAGS} ${LINPHONE_BUILDER_CPPFLAGS} ")
endif()
if(LINPHONE_BUILDER_CFLAGS)
set(CMAKE_C_FLAGS_${BUILD_TYPE} "${CMAKE_C_FLAGS_${BUILD_TYPE}} ${LINPHONE_BUILDER_CFLAGS}")
set(AUTOTOOLS_C_FLAGS "${AUTOTOOLS_C_FLAGS} ${LINPHONE_BUILDER_CFLAGS}")
set(AUTOTOOLS_C_FLAGS "${AUTOTOOLS_C_FLAGS} ${LINPHONE_BUILDER_CFLAGS} ")
endif()
if(LINPHONE_BUILDER_CXXFLAGS)
set(CMAKE_CXX_FLAGS_${BUILD_TYPE} "${CMAKE_CXX_FLAGS_${BUILD_TYPE}} ${LINPHONE_BUILDER_CXXFLAGS}")
set(AUTOTOOLS_CXX_FLAGS "${AUTOTOOLS_CXX_FLAGS} ${LINPHONE_BUILDER_CXX_FLAGS}")
set(AUTOTOOLS_CXX_FLAGS "${AUTOTOOLS_CXX_FLAGS} ${LINPHONE_BUILDER_CXX_FLAGS} ")
endif()
if(LINPHONE_BUILDER_OBJCFLAGS)
set(CMAKE_C_FLAGS_${BUILD_TYPE} "${CMAKE_C_FLAGS_${BUILD_TYPE}} ${LINPHONE_BUILDER_OBJCFLAGS}")
set(AUTOTOOLS_OBJC_FLAGS "${AUTOTOOLS_OBJC_FLAGS} ${LINPHONE_BUILDER_OBJCFLAGS}")
set(AUTOTOOLS_OBJC_FLAGS "${AUTOTOOLS_OBJC_FLAGS} ${LINPHONE_BUILDER_OBJCFLAGS} ")
endif()
if(LINPHONE_BUILDER_LDFLAGS)
set(CMAKE_EXE_LINKER_FLAGS_${BUILD_TYPE} "${CMAKE_EXE_LINKER_FLAGS_${BUILD_TYPE}} ${LINPHONE_BUILDER_LDFLAGS}")
set(CMAKE_MODULE_LINKER_FLAGS_${BUILD_TYPE} "${CMAKE_MODULE_LINKER_FLAGS_${BUILD_TYPE}} ${LINPHONE_BUILDER_LDFLAGS}")
set(CMAKE_SHARED_LINKER_FLAGS_${BUILD_TYPE} "${CMAKE_SHARED_LINKER_FLAGS_${BUILD_TYPE}} ${LINPHONE_BUILDER_LDFLAGS}")
set(AUTOTOOLS_LINKER_FLAGS "${AUTOTOOLS_LINKER_FLAGS} ${LINPHONE_BUILDER_LDFLAGS}")
set(AUTOTOOLS_LINKER_FLAGS "${AUTOTOOLS_LINKER_FLAGS} ${LINPHONE_BUILDER_LDFLAGS} ")
endif()
unset(BUILD_TYPE)
if(WIN32)
string(REGEX REPLACE "/[a-zA-Z0-9]+ " "" AUTOTOOLS_C_FLAGS "${AUTOTOOLS_C_FLAGS}")
string(REGEX REPLACE "/[a-zA-Z0-9]+ " "" AUTOTOOLS_CXX_FLAGS "${AUTOTOOLS_CXX_FLAGS}")
string(REGEX REPLACE "/[a-zA-Z0-9]+ " "" AUTOTOOLS_OBJC_FLAGS "${AUTOTOOLS_OBJC_FLAGS}")
string(REGEX REPLACE "/[a-zA-Z0-9]+ " "" AUTOTOOLS_LINKER_FLAGS "${AUTOTOOLS_LINKER_FLAGS}")
endif()
endmacro()
......
......@@ -61,7 +61,7 @@ endif()
if(WIN32)
set(LINPHONE_BUILDER_CPPFLAGS "-D_WIN32_WINNT=0x0600 -D_CRT_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS")
if(MSVC AND MSVC_VERSION GREATER 1600) # Visual Studio 2010 defines this macro itself
set(LINPHONE_BUILDER_CPPFLAGS "${LINPHONE_BUILDER_CPPFLAGS} -D_ALLOW_KEYWORD_MACROS")
set(LINPHONE_BUILDER_CPPFLAGS "${LINPHONE_BUILDER_CPPFLAGS} -D_ALLOW_KEYWORD_MACROS /MP")
endif()
endif()
......
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