CMake: Enable multi-processor compilation for MSVC

Add option wxBUILD_MSVC_MULTIPROC which defaults to ON
to add /MP the MSVC compiler options.
This commit is contained in:
Tobias Taschner
2018-02-08 21:13:44 +01:00
parent 9a3b145731
commit 623a9123a1
2 changed files with 6 additions and 0 deletions

View File

@@ -22,6 +22,11 @@ if(DEFINED wxBUILD_USE_STATIC_RUNTIME AND wxBUILD_USE_STATIC_RUNTIME)
endforeach()
endif()
if(wxBUILD_MSVC_MULTIPROC)
wx_string_append(CMAKE_C_FLAGS " /MP")
wx_string_append(CMAKE_CXX_FLAGS " /MP")
endif()
if(wxBUILD_COMPATIBILITY VERSION_LESS 3.0)
set(WXWIN_COMPATIBILITY_2_8 ON)
endif()