1# - Compile with multiple processes on MSVC
2#
3#  include(MSVCMultipleProcessCompile)
4#
5# Requires these CMake modules:
6#  ListCombinations.cmake
7#
8# Original Author:
9# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
10# http://academic.cleardefinition.com
11# Iowa State University HCI Graduate Program/VRAC
12#
13# Copyright Iowa State University 2009-2010.
14# Distributed under the Boost Software License, Version 1.0.
15# (See accompanying file LICENSE_1_0.txt or copy at
16# http://www.boost.org/LICENSE_1_0.txt)
17
18if(MSVC AND NOT "${MSVC_VERSION}" LESS 1400)
19	# Only available in VS 2005 and newer
20	string(TOUPPER "${CMAKE_CONFIGURATION_TYPES}" _conftypesUC)
21	include(ListCombinations)
22	list_combinations(_varnames
23		PREFIXES
24		CMAKE_C_FLAGS_
25		CMAKE_CXX_FLAGS_
26		SUFFIXES
27		${_conftypesUC})
28	foreach(_var ${_varnames})
29		set(${_var} "${${_var}} /MP")
30	endforeach()
31endif()
32